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
a834b692
Commit
a834b692
authored
Jul 01, 2005
by
svoj@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/svoj/devel/mysql/yassl1-mysql-5.0
parents
549399ee
9359cec4
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
139 additions
and
48 deletions
+139
-48
extra/yassl/include/yassl_types.hpp
extra/yassl/include/yassl_types.hpp
+2
-1
extra/yassl/src/Makefile.am
extra/yassl/src/Makefile.am
+1
-0
extra/yassl/src/buffer.cpp
extra/yassl/src/buffer.cpp
+1
-0
extra/yassl/src/cert_wrapper.cpp
extra/yassl/src/cert_wrapper.cpp
+1
-0
extra/yassl/src/lock.cpp
extra/yassl/src/lock.cpp
+1
-0
extra/yassl/src/log.cpp
extra/yassl/src/log.cpp
+2
-0
extra/yassl/src/socket_wrapper.cpp
extra/yassl/src/socket_wrapper.cpp
+1
-0
extra/yassl/src/template_instnt.cpp
extra/yassl/src/template_instnt.cpp
+30
-2
extra/yassl/src/timer.cpp
extra/yassl/src/timer.cpp
+1
-0
extra/yassl/src/yassl_error.cpp
extra/yassl/src/yassl_error.cpp
+1
-0
extra/yassl/src/yassl_int.cpp
extra/yassl/src/yassl_int.cpp
+23
-11
extra/yassl/taocrypt/include/types.hpp
extra/yassl/taocrypt/include/types.hpp
+15
-23
extra/yassl/taocrypt/src/Makefile.am
extra/yassl/taocrypt/src/Makefile.am
+1
-0
extra/yassl/taocrypt/src/aestables.cpp
extra/yassl/taocrypt/src/aestables.cpp
+1
-0
extra/yassl/taocrypt/src/algebra.cpp
extra/yassl/taocrypt/src/algebra.cpp
+2
-0
extra/yassl/taocrypt/src/arc4.cpp
extra/yassl/taocrypt/src/arc4.cpp
+1
-0
extra/yassl/taocrypt/src/coding.cpp
extra/yassl/taocrypt/src/coding.cpp
+1
-0
extra/yassl/taocrypt/src/file.cpp
extra/yassl/taocrypt/src/file.cpp
+1
-0
extra/yassl/taocrypt/src/integer.cpp
extra/yassl/taocrypt/src/integer.cpp
+4
-2
extra/yassl/taocrypt/src/misc.cpp
extra/yassl/taocrypt/src/misc.cpp
+18
-9
extra/yassl/taocrypt/src/random.cpp
extra/yassl/taocrypt/src/random.cpp
+1
-0
extra/yassl/taocrypt/src/template_instnt.cpp
extra/yassl/taocrypt/src/template_instnt.cpp
+30
-0
No files found.
extra/yassl/include/yassl_types.hpp
View file @
a834b692
...
...
@@ -445,7 +445,7 @@ const opaque master_label[MASTER_LABEL_SZ + 1] = "master secret";
const
opaque
key_label
[
KEY_LABEL_SZ
+
1
]
=
"key expansion"
;
}
// na
me
space
}
// na
em
space
#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
/*
...
...
@@ -456,4 +456,5 @@ const opaque key_label [KEY_LABEL_SZ + 1] = "key expansion";
using
yaSSL
::
byte
;
#endif
#endif // yaSSL_TYPES_HPP
extra/yassl/src/Makefile.am
View file @
a834b692
...
...
@@ -5,3 +5,4 @@ libyassl_a_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp
\
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
EXTRA_DIST
=
../include/
*
.hpp ../include/openssl/
*
.h
AM_CXXFLAGS
=
-DYASSL_PURE_C
extra/yassl/src/buffer.cpp
View file @
a834b692
...
...
@@ -25,6 +25,7 @@
*/
#include <string.h> // memcpy
#include "runtime.hpp"
#include "buffer.hpp"
#include "yassl_types.hpp"
...
...
extra/yassl/src/cert_wrapper.cpp
View file @
a834b692
...
...
@@ -24,6 +24,7 @@
*
*/
#include "runtime.hpp"
#include "cert_wrapper.hpp"
#include "yassl_int.hpp"
...
...
extra/yassl/src/lock.cpp
View file @
a834b692
...
...
@@ -22,6 +22,7 @@
/* Locking functions
*/
#include "runtime.hpp"
#include "lock.hpp"
...
...
extra/yassl/src/log.cpp
View file @
a834b692
...
...
@@ -22,6 +22,8 @@
/* Debug logging functions
*/
#include "runtime.hpp"
#include "log.hpp"
#ifdef YASSL_LOG
...
...
extra/yassl/src/socket_wrapper.cpp
View file @
a834b692
...
...
@@ -26,6 +26,7 @@
*/
#include "runtime.hpp"
#include "socket_wrapper.hpp"
#ifndef _WIN32
...
...
extra/yassl/src/template_instnt.cpp
View file @
a834b692
/* template_instnt.cpp
*
* Copyright (C) 2003 Sawtooth Consulting Ltd.
*
* This file is part of yaSSL.
*
* yaSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* yaSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
/* Explicit template instantiation requests
*/
#include "runtime.hpp"
#include "handshake.hpp"
#include "yassl_int.hpp"
...
...
@@ -15,7 +41,7 @@ template class HMAC<MD5>;
template
class
HMAC
<
SHA
>;
template
class
HMAC
<
RIPEMD160
>;
}
#endif
#endif
// USE_CRYPTOPP_LIB
namespace
mySTL
{
template
class
list
<
unsigned
char
*
>;
...
...
@@ -64,4 +90,6 @@ template void ysDelete<Message>(Message*);
template
void
ysArrayDelete
<
unsigned
char
>(
unsigned
char
*
);
template
void
ysArrayDelete
<
char
>(
char
*
);
}
#endif
#endif // HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
extra/yassl/src/timer.cpp
View file @
a834b692
...
...
@@ -23,6 +23,7 @@
*
*/
#include "runtime.hpp"
#include "timer.hpp"
namespace
yaSSL
{
...
...
extra/yassl/src/yassl_error.cpp
View file @
a834b692
...
...
@@ -23,6 +23,7 @@
/* yaSSL error implements and an exception class
*/
#include "runtime.hpp"
#include "yassl_error.hpp"
namespace
yaSSL
{
...
...
extra/yassl/src/yassl_int.cpp
View file @
a834b692
...
...
@@ -33,28 +33,36 @@
void
*
operator
new
(
size_t
sz
,
yaSSL
::
new_t
)
{
#ifdef YASSL_PURE_C
void
*
ptr
=
malloc
(
sz
?
sz
:
1
);
if
(
!
ptr
)
abort
();
return
ptr
;
#else
return
::
operator
new
(
sz
);
#endif
}
void
*
operator
new
[](
size_t
sz
,
yaSSL
::
new_t
)
{
void
*
ptr
=
malloc
(
sz
?
sz
:
1
);
if
(
!
ptr
)
abort
();
return
ptr
;
}
void
operator
delete
(
void
*
ptr
,
yaSSL
::
new_t
)
{
#ifdef YASSL_PURE_C
if
(
ptr
)
free
(
ptr
);
#else
::
operator
delete
(
ptr
);
#endif
}
void
*
operator
new
[](
size_t
sz
,
yaSSL
::
new_t
nt
)
{
return
::
operator
new
(
sz
,
nt
);
}
void
operator
delete
[](
void
*
ptr
,
yaSSL
::
new_t
)
void
operator
delete
[](
void
*
ptr
,
yaSSL
::
new_t
nt
)
{
if
(
ptr
)
free
(
ptr
);
::
operator
delete
(
ptr
,
nt
);
}
...
...
@@ -923,7 +931,7 @@ void SSL::setKeys()
// local functors
namespace
yassl_int_cpp_local1
{
namespace
yassl_int_cpp_local1
{
// for explicit templates
struct
SumData
{
uint
total_
;
...
...
@@ -1385,7 +1393,8 @@ Sessions::~Sessions()
}
namespace
yassl_int_cpp_local2
{
// locals
// locals
namespace
yassl_int_cpp_local2
{
// for explicit templates
typedef
mySTL
::
list
<
SSL_SESSION
*>::
iterator
iterator
;
...
...
@@ -1974,6 +1983,8 @@ X509_NAME* X509::GetSubject()
return
&
subject_
;
}
}
// namespace
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
...
...
@@ -1983,3 +1994,4 @@ template yaSSL::yassl_int_cpp_local1::SumBuffer for_each<mySTL::list<yaSSL::outp
template
mySTL
::
list
<
yaSSL
::
SSL_SESSION
*
>
::
iterator
find_if
<
mySTL
::
list
<
yaSSL
::
SSL_SESSION
*>::
iterator
,
yaSSL
::
yassl_int_cpp_local2
::
sess_match
>
(
mySTL
::
list
<
yaSSL
::
SSL_SESSION
*>::
iterator
,
mySTL
::
list
<
yaSSL
::
SSL_SESSION
*>::
iterator
,
yaSSL
::
yassl_int_cpp_local2
::
sess_match
);
}
#endif
extra/yassl/taocrypt/include/types.hpp
View file @
a834b692
...
...
@@ -31,10 +31,8 @@
namespace
TaoCrypt
{
// define this if running on a big-endian CPU
#if !defined(LITTLE_ENDIAN_ORDER) && (defined(__BIG_ENDIAN__) || \
defined(__sparc) || defined(__sparc__) || defined(__hppa__) || \
defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))
#if defined(WORDS_BIGENDIAN) || (defined(__MWERKS__) && !defined(__INTEL__))
#define BIG_ENDIAN_ORDER
#endif
...
...
@@ -47,34 +45,28 @@ typedef unsigned char byte;
typedef
unsigned
short
word16
;
typedef
unsigned
int
word32
;
#if defined(__GNUC__) || defined(__MWERKS__) || defined(_LONGLONG_TYPE)
#define WORD64_AVAILABLE
#define WORD64_IS_DISTINCT_TYPE
typedef
unsigned
long
long
word64
;
#define W64LIT(x) x##LL
#elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
#if defined(_MSC_VER) || defined(__BCPLUSPLUS__)
#define WORD64_AVAILABLE
#define WORD64_IS_DISTINCT_TYPE
typedef
unsigned
__int64
word64
;
#define W64LIT(x) x##ui64
#elif defined(__DECCXX)
#elif SIZEOF_LONG == 8
#define WORD64_AVAILABLE
typedef
unsigned
long
word64
;
#elif SIZEOF_LONG_LONG == 8
#define WORD64_AVAILABLE
#define WORD64_IS_DISTINCT_TYPE
typedef
unsigned
long
long
word64
;
#endif
// define largest word type
#ifdef WORD64_AVAILABLE
typedef
word64
lword
;
#else
typedef
word32
lword
;
#endif
// compilers we've found 64-bit multiply insructions for
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__DECCXX)
#define HAVE_64_MULTIPLY
#endif
// TODO: FIXME, add asm multiply for x86_64 on Solaris and remove !__sun
#if defined(__alpha__) || (defined(__ia64__) && !defined(__INTEL_COMPILER)) || \
defined(_ARCH_PPC64) || defined(__mips64) || \
(defined(__x86_64__) && !defined(__sun))
#if defined(HAVE_64_MULTIPLY) && (defined(__alpha__) || defined(__ia64__) \
|| defined(_ARCH_PPC64) || defined(__mips64) || defined(__x86_64__))
// These platforms have 64-bit CPU registers. Unfortunately most C++ compilers
// don't allow any way to access the 64-bit by 64-bit multiply instruction
// without using assembly, so in order to use word64 as word, the assembly
...
...
extra/yassl/taocrypt/src/Makefile.am
View file @
a834b692
...
...
@@ -6,3 +6,4 @@ libtaocrypt_a_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
md2.cpp md5.cpp misc.cpp random.cpp ripemd.cpp rsa.cpp sha.cpp
\
template_instnt.cpp
EXTRA_DIST
=
../include/
*
.hpp
AM_CXXFLAGS
=
-DYASSL_PURE_C
extra/yassl/taocrypt/src/aestables.cpp
View file @
a834b692
...
...
@@ -21,6 +21,7 @@
/* based on Wei Dai's aestables.cpp from CryptoPP */
#include "runtime.hpp"
#include "aes.hpp"
...
...
extra/yassl/taocrypt/src/algebra.cpp
View file @
a834b692
...
...
@@ -319,9 +319,11 @@ void AbstractRing::SimultaneousExponentiate(Integer *results,
}
// namespace
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
namespace
mySTL
{
template
TaoCrypt
::
WindowSlider
*
uninit_copy
<
TaoCrypt
::
WindowSlider
*
,
TaoCrypt
::
WindowSlider
*
>(
TaoCrypt
::
WindowSlider
*
,
TaoCrypt
::
WindowSlider
*
,
TaoCrypt
::
WindowSlider
*
);
template
void
destroy
<
TaoCrypt
::
WindowSlider
*
>(
TaoCrypt
::
WindowSlider
*
,
TaoCrypt
::
WindowSlider
*
);
}
#endif
extra/yassl/taocrypt/src/arc4.cpp
View file @
a834b692
...
...
@@ -21,6 +21,7 @@
/* based on Wei Dai's arc4.cpp from CryptoPP */
#include "runtime.hpp"
#include "arc4.hpp"
...
...
extra/yassl/taocrypt/src/coding.cpp
View file @
a834b692
...
...
@@ -22,6 +22,7 @@
/* coding.cpp implements hex and base64 encoding/decoing
*/
#include "runtime.hpp"
#include "coding.hpp"
#include "file.hpp"
...
...
extra/yassl/taocrypt/src/file.cpp
View file @
a834b692
...
...
@@ -22,6 +22,7 @@
/* file.cpp implements File Sources and Sinks
*/
#include "runtime.hpp"
#include "file.hpp"
...
...
extra/yassl/taocrypt/src/integer.cpp
View file @
a834b692
...
...
@@ -35,8 +35,9 @@
#endif
#if defined(_MSC_VER) && defined(_WIN64) && \
!defined(__INTEL_COMPILER) // 64 bit X overflow intrinsic
// 64bit multiply overflow intrinsic
#if defined(_MSC_VER) && defined(_WIN64) && !defined(__INTEL_COMPILER) && \
!defined(TAOCRYPT_NATIVE_DWORD_AVAILABLE)
#ifdef __ia64__
#define myUMULH __UMULH
#elif __x86_64__
...
...
@@ -3957,6 +3958,7 @@ Integer CRT(const Integer &xp, const Integer &p, const Integer &xq,
return
p
*
(
u
*
(
xq
-
xp
)
%
q
)
+
xp
;
}
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
#ifndef TAOCRYPT_NATIVE_DWORD_AVAILABLE
template
hword
DivideThreeWordsByTwo
<
hword
,
Word
>(
hword
*
,
hword
,
hword
,
Word
*
);
...
...
extra/yassl/taocrypt/src/misc.cpp
View file @
a834b692
...
...
@@ -22,34 +22,43 @@
/* based on Wei Dai's misc.cpp from CryptoPP */
#include "runtime.hpp"
#include "misc.hpp"
#include <new> // for NewHandler
void
*
operator
new
(
size_t
sz
,
TaoCrypt
::
new_t
)
{
#ifdef YASSL_PURE_C
void
*
ptr
=
malloc
(
sz
?
sz
:
1
);
if
(
!
ptr
)
abort
();
return
ptr
;
#else
return
::
operator
new
(
sz
);
#endif
}
void
*
operator
new
[](
size_t
sz
,
TaoCrypt
::
new_t
)
{
void
*
ptr
=
malloc
(
sz
?
sz
:
1
);
if
(
!
ptr
)
abort
();
return
ptr
;
}
void
operator
delete
(
void
*
ptr
,
TaoCrypt
::
new_t
)
{
#ifdef YASSL_PURE_C
if
(
ptr
)
free
(
ptr
);
#else
::
operator
delete
(
ptr
);
#endif
}
void
operator
delete
[](
void
*
ptr
,
TaoCrypt
::
new_t
)
void
*
operator
new
[](
size_t
sz
,
TaoCrypt
::
new_t
nt
)
{
if
(
ptr
)
free
(
ptr
);
return
::
operator
new
(
sz
,
nt
);
}
void
operator
delete
[](
void
*
ptr
,
TaoCrypt
::
new_t
nt
)
{
::
operator
delete
(
ptr
,
nt
);
}
...
...
extra/yassl/taocrypt/src/random.cpp
View file @
a834b692
...
...
@@ -24,6 +24,7 @@
specific seed, switch to /dev/random for more security but may block
*/
#include "runtime.hpp"
#include "random.hpp"
#if defined(_WIN32)
...
...
extra/yassl/taocrypt/src/template_instnt.cpp
View file @
a834b692
/* template_instnt.cpp
*
* Copyright (C) 2003 Sawtooth Consulting Ltd.
*
* This file is part of yaSSL.
*
* yaSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* yaSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
/* Explicit template instantiation requests
*/
#include "integer.hpp"
#include "rsa.hpp"
#include "algebra.hpp"
...
...
@@ -6,9 +32,11 @@
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
namespace
TaoCrypt
{
#if defined(SSE2_INTRINSICS_AVAILABLE)
template
AlignedAllocator
<
unsigned
int
>
::
pointer
StdReallocate
<
unsigned
int
,
AlignedAllocator
<
unsigned
int
>
>
(
AlignedAllocator
<
unsigned
int
>&
,
unsigned
int
*
,
AlignedAllocator
<
unsigned
int
>::
size_type
,
AlignedAllocator
<
unsigned
int
>::
size_type
,
bool
);
#endif
template
class
RSA_Decryptor
<
RSA_BlockType2
>;
template
class
RSA_Encryptor
<
RSA_BlockType1
>;
template
class
RSA_Encryptor
<
RSA_BlockType2
>;
...
...
@@ -17,10 +45,12 @@ 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
void
tcArrayDelete
<
word
>(
word
*
);
template
AllocatorWithCleanup
<
word
>
::
pointer
StdReallocate
<
word
,
AllocatorWithCleanup
<
word
>
>
(
AllocatorWithCleanup
<
word
>&
,
word
*
,
AllocatorWithCleanup
<
word
>::
size_type
,
AllocatorWithCleanup
<
word
>::
size_type
,
bool
);
#ifndef TAOCRYPT_SLOW_WORD64 // defined when word != word32
template
void
tcArrayDelete
<
word32
>(
word32
*
);
template
AllocatorWithCleanup
<
word32
>
::
pointer
StdReallocate
<
word32
,
AllocatorWithCleanup
<
word32
>
>
(
AllocatorWithCleanup
<
word32
>&
,
word32
*
,
AllocatorWithCleanup
<
word32
>::
size_type
,
AllocatorWithCleanup
<
word32
>::
size_type
,
bool
);
#endif
template
void
tcArrayDelete
<
char
>(
char
*
);
}
...
...
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