Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1ea71459
Commit
1ea71459
authored
Apr 18, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-release
parents
98ea0393
c53f2320
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
83 additions
and
30 deletions
+83
-30
extra/yassl/include/openssl/rsa.h
extra/yassl/include/openssl/rsa.h
+1
-1
extra/yassl/include/openssl/ssl.h
extra/yassl/include/openssl/ssl.h
+1
-1
extra/yassl/include/yassl_int.hpp
extra/yassl/include/yassl_int.hpp
+0
-4
extra/yassl/include/yassl_types.hpp
extra/yassl/include/yassl_types.hpp
+5
-0
extra/yassl/src/handshake.cpp
extra/yassl/src/handshake.cpp
+10
-7
extra/yassl/src/template_instnt.cpp
extra/yassl/src/template_instnt.cpp
+2
-0
extra/yassl/src/yassl_int.cpp
extra/yassl/src/yassl_int.cpp
+17
-5
extra/yassl/taocrypt/include/integer.hpp
extra/yassl/taocrypt/include/integer.hpp
+0
-2
extra/yassl/taocrypt/include/misc.hpp
extra/yassl/taocrypt/include/misc.hpp
+5
-0
extra/yassl/taocrypt/include/runtime.hpp
extra/yassl/taocrypt/include/runtime.hpp
+21
-5
extra/yassl/taocrypt/src/algebra.cpp
extra/yassl/taocrypt/src/algebra.cpp
+3
-1
extra/yassl/taocrypt/src/integer.cpp
extra/yassl/taocrypt/src/integer.cpp
+17
-4
extra/yassl/taocrypt/src/template_instnt.cpp
extra/yassl/taocrypt/src/template_instnt.cpp
+1
-0
No files found.
extra/yassl/include/openssl/rsa.h
View file @
1ea71459
/* rsa.h for openSSL */
/* rsa.h for openSSL */
#ifndef y
s
SSL_rsa_h__
#ifndef y
a
SSL_rsa_h__
#define yaSSL_rsa_h__
#define yaSSL_rsa_h__
enum
{
RSA_F4
=
1
};
enum
{
RSA_F4
=
1
};
...
...
extra/yassl/include/openssl/ssl.h
View file @
1ea71459
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
*
*
*/
*/
#ifndef y
s
SSL_openssl_h__
#ifndef y
a
SSL_openssl_h__
#define yaSSL_openssl_h__
#define yaSSL_openssl_h__
#include <stdio.h>
/* ERR_print fp */
#include <stdio.h>
/* ERR_print fp */
...
...
extra/yassl/include/yassl_int.hpp
View file @
1ea71459
...
@@ -123,8 +123,6 @@ public:
...
@@ -123,8 +123,6 @@ public:
friend
sslFactory
&
GetSSL_Factory
();
// singleton creator
friend
sslFactory
&
GetSSL_Factory
();
// singleton creator
private:
private:
static
sslFactory
instance_
;
sslFactory
(
const
sslFactory
&
);
// hide copy
sslFactory
(
const
sslFactory
&
);
// hide copy
sslFactory
&
operator
=
(
const
sslFactory
&
);
// and assign
sslFactory
&
operator
=
(
const
sslFactory
&
);
// and assign
};
};
...
@@ -216,8 +214,6 @@ public:
...
@@ -216,8 +214,6 @@ public:
friend
Sessions
&
GetSessions
();
// singleton creator
friend
Sessions
&
GetSessions
();
// singleton creator
private:
private:
static
Sessions
instance_
;
Sessions
(
const
Sessions
&
);
// hide copy
Sessions
(
const
Sessions
&
);
// hide copy
Sessions
&
operator
=
(
const
Sessions
&
);
// and assign
Sessions
&
operator
=
(
const
Sessions
&
);
// and assign
};
};
...
...
extra/yassl/include/yassl_types.hpp
View file @
1ea71459
...
@@ -34,6 +34,11 @@
...
@@ -34,6 +34,11 @@
namespace
yaSSL
{
namespace
yaSSL
{
// Delete static singleton memory holders
void
CleanUp
();
// library allocation
// library allocation
struct
new_t
{};
// yaSSL New type
struct
new_t
{};
// yaSSL New type
extern
new_t
ys
;
// pass in parameter
extern
new_t
ys
;
// pass in parameter
...
...
extra/yassl/src/handshake.cpp
View file @
1ea71459
...
@@ -648,8 +648,6 @@ void build_certHashes(SSL& ssl, Hashes& hashes)
...
@@ -648,8 +648,6 @@ void build_certHashes(SSL& ssl, Hashes& hashes)
}
}
mySTL
::
auto_ptr
<
input_buffer
>
null_buffer
(
ysDelete
);
// do process input requests
// do process input requests
mySTL
::
auto_ptr
<
input_buffer
>
mySTL
::
auto_ptr
<
input_buffer
>
DoProcessReply
(
SSL
&
ssl
,
mySTL
::
auto_ptr
<
input_buffer
>
buffered
)
DoProcessReply
(
SSL
&
ssl
,
mySTL
::
auto_ptr
<
input_buffer
>
buffered
)
...
@@ -659,7 +657,8 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr<input_buffer> buffered)
...
@@ -659,7 +657,8 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr<input_buffer> buffered)
if
(
!
ready
)
{
if
(
!
ready
)
{
// Nothing to receive after blocking wait => error
// Nothing to receive after blocking wait => error
ssl
.
SetError
(
receive_error
);
ssl
.
SetError
(
receive_error
);
return
buffered
=
null_buffer
;
buffered
.
reset
(
0
);
return
buffered
;
}
}
// add buffered data if its there
// add buffered data if its there
...
@@ -667,10 +666,10 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr<input_buffer> buffered)
...
@@ -667,10 +666,10 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr<input_buffer> buffered)
input_buffer
buffer
(
buffSz
+
ready
);
input_buffer
buffer
(
buffSz
+
ready
);
if
(
buffSz
)
{
if
(
buffSz
)
{
buffer
.
assign
(
buffered
.
get
()
->
get_buffer
(),
buffSz
);
buffer
.
assign
(
buffered
.
get
()
->
get_buffer
(),
buffSz
);
buffered
=
null_buffer
;
buffered
.
reset
(
0
)
;
}
}
// add new
(ys)
data
// add new data
uint
read
=
ssl
.
getSocket
().
receive
(
buffer
.
get_buffer
()
+
buffSz
,
ready
);
uint
read
=
ssl
.
getSocket
().
receive
(
buffer
.
get_buffer
()
+
buffSz
,
ready
);
buffer
.
add_size
(
read
);
buffer
.
add_size
(
read
);
uint
offset
=
0
;
uint
offset
=
0
;
...
@@ -703,11 +702,15 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr<input_buffer> buffered)
...
@@ -703,11 +702,15 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr<input_buffer> buffered)
mySTL
::
auto_ptr
<
Message
>
msg
(
mf
.
CreateObject
(
hdr
.
type_
),
ysDelete
);
mySTL
::
auto_ptr
<
Message
>
msg
(
mf
.
CreateObject
(
hdr
.
type_
),
ysDelete
);
if
(
!
msg
.
get
())
{
if
(
!
msg
.
get
())
{
ssl
.
SetError
(
factory_error
);
ssl
.
SetError
(
factory_error
);
return
buffered
=
null_buffer
;
buffered
.
reset
(
0
);
return
buffered
;
}
}
buffer
>>
*
msg
;
buffer
>>
*
msg
;
msg
->
Process
(
buffer
,
ssl
);
msg
->
Process
(
buffer
,
ssl
);
if
(
ssl
.
GetError
())
return
buffered
=
null_buffer
;
if
(
ssl
.
GetError
())
{
buffered
.
reset
(
0
);
return
buffered
;
}
}
}
offset
+=
hdr
.
length_
+
RECORD_HEADER
;
offset
+=
hdr
.
length_
+
RECORD_HEADER
;
}
}
...
...
extra/yassl/src/template_instnt.cpp
View file @
1ea71459
...
@@ -87,6 +87,8 @@ template void ysDelete<BulkCipher>(BulkCipher*);
...
@@ -87,6 +87,8 @@ template void ysDelete<BulkCipher>(BulkCipher*);
template
void
ysDelete
<
Digest
>(
Digest
*
);
template
void
ysDelete
<
Digest
>(
Digest
*
);
template
void
ysDelete
<
X509
>(
X509
*
);
template
void
ysDelete
<
X509
>(
X509
*
);
template
void
ysDelete
<
Message
>(
Message
*
);
template
void
ysDelete
<
Message
>(
Message
*
);
template
void
ysDelete
<
sslFactory
>(
sslFactory
*
);
template
void
ysDelete
<
Sessions
>(
Sessions
*
);
template
void
ysArrayDelete
<
unsigned
char
>(
unsigned
char
*
);
template
void
ysArrayDelete
<
unsigned
char
>(
unsigned
char
*
);
template
void
ysArrayDelete
<
char
>(
char
*
);
template
void
ysArrayDelete
<
char
>(
char
*
);
}
}
...
...
extra/yassl/src/yassl_int.cpp
View file @
1ea71459
...
@@ -1361,19 +1361,31 @@ SSL_SESSION::~SSL_SESSION()
...
@@ -1361,19 +1361,31 @@ SSL_SESSION::~SSL_SESSION()
}
}
Sessions
Sessions
::
instance_
;
// simple singleton
static
Sessions
*
sessionsInstance
=
0
;
Sessions
&
GetSessions
()
Sessions
&
GetSessions
()
{
{
return
Sessions
::
instance_
;
if
(
!
sessionsInstance
)
sessionsInstance
=
new
(
ys
)
Sessions
;
return
*
sessionsInstance
;
}
}
s
slFactory
sslFactory
::
instance_
;
// simple singleton
s
tatic
sslFactory
*
sslFactoryInstance
=
0
;
sslFactory
&
GetSSL_Factory
()
sslFactory
&
GetSSL_Factory
()
{
{
return
sslFactory
::
instance_
;
if
(
!
sslFactoryInstance
)
sslFactoryInstance
=
new
(
ys
)
sslFactory
;
return
*
sslFactoryInstance
;
}
void
CleanUp
()
{
TaoCrypt
::
CleanUp
();
ysDelete
(
sslFactoryInstance
);
ysDelete
(
sessionsInstance
);
}
}
...
...
extra/yassl/taocrypt/include/integer.hpp
View file @
1ea71459
...
@@ -275,8 +275,6 @@ private:
...
@@ -275,8 +275,6 @@ private:
AlignedWordBlock
reg_
;
AlignedWordBlock
reg_
;
Sign
sign_
;
Sign
sign_
;
static
const
Integer
zero_
;
static
const
Integer
one_
;
};
};
inline
bool
operator
==
(
const
Integer
&
a
,
const
Integer
&
b
)
inline
bool
operator
==
(
const
Integer
&
a
,
const
Integer
&
b
)
...
...
extra/yassl/taocrypt/include/misc.hpp
View file @
1ea71459
...
@@ -34,6 +34,11 @@
...
@@ -34,6 +34,11 @@
namespace
TaoCrypt
{
namespace
TaoCrypt
{
// Delete static singleton holders
void
CleanUp
();
// library allocation
// library allocation
struct
new_t
{};
// TaoCrypt New type
struct
new_t
{};
// TaoCrypt New type
extern
new_t
tc
;
// pass in parameter
extern
new_t
tc
;
// pass in parameter
...
...
extra/yassl/taocrypt/include/runtime.hpp
View file @
1ea71459
...
@@ -25,11 +25,27 @@
...
@@ -25,11 +25,27 @@
#if !defined(yaSSL_NEW_HPP) && defined(__GNUC__)
#ifndef yaSSL_NEW_HPP
#if !(defined(__ICC) || defined(__INTEL_COMPILER))
#define yaSSL_NEW_HPP
#define yaSSL_NEW_HPP
#ifdef __sun
#include <assert.h>
// Handler for pure virtual functions
namespace
__Crun
{
static
void
pure_error
(
void
)
{
assert
(
"Pure virtual method called."
==
"Aborted"
);
}
}
// namespace __Crun
#endif // __sun
#if defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
#if __GNUC__ > 2
#if __GNUC__ > 2
extern
"C"
{
extern
"C"
{
...
@@ -47,6 +63,6 @@ static int __cxa_pure_virtual()
...
@@ -47,6 +63,6 @@ static int __cxa_pure_virtual()
}
// extern "C"
}
// extern "C"
#endif // __GNUC__ > 2
#endif // __GNUC__ > 2
#endif //
! _ICC
#endif //
compiler check
#endif // yaSSL_NEW_HPP
&& __GNUC__
#endif // yaSSL_NEW_HPP
extra/yassl/taocrypt/src/algebra.cpp
View file @
1ea71459
...
@@ -76,7 +76,9 @@ const Integer& AbstractEuclideanDomain::Mod(const Element &a,
...
@@ -76,7 +76,9 @@ const Integer& AbstractEuclideanDomain::Mod(const Element &a,
const
Integer
&
AbstractEuclideanDomain
::
Gcd
(
const
Element
&
a
,
const
Integer
&
AbstractEuclideanDomain
::
Gcd
(
const
Element
&
a
,
const
Element
&
b
)
const
const
Element
&
b
)
const
{
{
Element
g
[
3
]
=
{
b
,
a
};
mySTL
::
vector
<
Element
>
g
(
3
);
g
[
0
]
=
b
;
g
[
1
]
=
a
;
unsigned
int
i0
=
0
,
i1
=
1
,
i2
=
2
;
unsigned
int
i0
=
0
,
i1
=
1
,
i2
=
2
;
while
(
!
Equal
(
g
[
i1
],
this
->
Identity
()))
while
(
!
Equal
(
g
[
i1
],
this
->
Identity
()))
...
...
extra/yassl/taocrypt/src/integer.cpp
View file @
1ea71459
...
@@ -2709,19 +2709,32 @@ unsigned int Integer::Encode(byte* output, unsigned int outputLen,
...
@@ -2709,19 +2709,32 @@ unsigned int Integer::Encode(byte* output, unsigned int outputLen,
}
}
const
Integer
Integer
::
zero_
;
static
Integer
*
zero
=
0
;
const
Integer
&
Integer
::
Zero
()
const
Integer
&
Integer
::
Zero
()
{
{
return
zero_
;
if
(
!
zero
)
zero
=
new
(
tc
)
Integer
;
return
*
zero
;
}
}
const
Integer
Integer
::
one_
(
1
,
2
)
;
static
Integer
*
one
=
0
;
const
Integer
&
Integer
::
One
()
const
Integer
&
Integer
::
One
()
{
{
return
one_
;
if
(
!
one
)
one
=
new
(
tc
)
Integer
(
1
,
2
);
return
*
one
;
}
// Clean up static singleton holders, not a leak, but helpful to have gone
// when checking for leaks
void
CleanUp
()
{
tcDelete
(
one
);
tcDelete
(
zero
);
}
}
...
...
extra/yassl/taocrypt/src/template_instnt.cpp
View file @
1ea71459
...
@@ -41,6 +41,7 @@ template class RSA_Decryptor<RSA_BlockType2>;
...
@@ -41,6 +41,7 @@ template class RSA_Decryptor<RSA_BlockType2>;
template
class
RSA_Encryptor
<
RSA_BlockType1
>;
template
class
RSA_Encryptor
<
RSA_BlockType1
>;
template
class
RSA_Encryptor
<
RSA_BlockType2
>;
template
class
RSA_Encryptor
<
RSA_BlockType2
>;
template
void
tcDelete
<
HASH
>(
HASH
*
);
template
void
tcDelete
<
HASH
>(
HASH
*
);
template
void
tcDelete
<
Integer
>(
Integer
*
);
template
void
tcArrayDelete
<
byte
>(
byte
*
);
template
void
tcArrayDelete
<
byte
>(
byte
*
);
template
AllocatorWithCleanup
<
byte
>
::
pointer
StdReallocate
<
byte
,
AllocatorWithCleanup
<
byte
>
>
(
AllocatorWithCleanup
<
byte
>&
,
byte
*
,
AllocatorWithCleanup
<
byte
>::
size_type
,
AllocatorWithCleanup
<
byte
>::
size_type
,
bool
);
template
AllocatorWithCleanup
<
byte
>
::
pointer
StdReallocate
<
byte
,
AllocatorWithCleanup
<
byte
>
>
(
AllocatorWithCleanup
<
byte
>&
,
byte
*
,
AllocatorWithCleanup
<
byte
>::
size_type
,
AllocatorWithCleanup
<
byte
>::
size_type
,
bool
);
template
void
tcArrayDelete
<
word
>(
word
*
);
template
void
tcArrayDelete
<
word
>(
word
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment