summaryrefslogtreecommitdiff
path: root/extra/yassl/src
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com>2005-07-01 20:00:59 +0500
committerunknown <svoj@mysql.com>2005-07-01 20:00:59 +0500
commit672dffcaf24332626cd3abe8f4366c7c66382d43 (patch)
tree50a170b168a3f21cd4cf1e5a5c1cebfa3b8f1cdd /extra/yassl/src
parent6c8d397588722dece2803370409d4776d5ffb461 (diff)
downloadmariadb-git-672dffcaf24332626cd3abe8f4366c7c66382d43.tar.gz
WL#2286 - Compile MySQL w/YASSL support
Merge with latest yaSSL. It includes fix for bigendian/littleendian problem (fixes func_encrypt test failure). Our trees are in sync now. extra/yassl/include/yassl_types.hpp: Merge with latest yaSSL. extra/yassl/src/Makefile.am: Merge with latest yaSSL. extra/yassl/src/buffer.cpp: Merge with latest yaSSL. extra/yassl/src/cert_wrapper.cpp: Merge with latest yaSSL. extra/yassl/src/lock.cpp: Merge with latest yaSSL. extra/yassl/src/log.cpp: Merge with latest yaSSL. extra/yassl/src/socket_wrapper.cpp: Merge with latest yaSSL. extra/yassl/src/template_instnt.cpp: Merge with latest yaSSL. extra/yassl/src/timer.cpp: Merge with latest yaSSL. extra/yassl/src/yassl_error.cpp: Merge with latest yaSSL. extra/yassl/src/yassl_int.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/include/types.hpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/Makefile.am: Merge with latest yaSSL. extra/yassl/taocrypt/src/aestables.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/algebra.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/arc4.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/coding.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/file.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/integer.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/misc.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/random.cpp: Merge with latest yaSSL. extra/yassl/taocrypt/src/template_instnt.cpp: Merge with latest yaSSL.
Diffstat (limited to 'extra/yassl/src')
-rw-r--r--extra/yassl/src/Makefile.am1
-rw-r--r--extra/yassl/src/buffer.cpp1
-rw-r--r--extra/yassl/src/cert_wrapper.cpp1
-rw-r--r--extra/yassl/src/lock.cpp1
-rw-r--r--extra/yassl/src/log.cpp2
-rw-r--r--extra/yassl/src/socket_wrapper.cpp1
-rw-r--r--extra/yassl/src/template_instnt.cpp32
-rw-r--r--extra/yassl/src/timer.cpp1
-rw-r--r--extra/yassl/src/yassl_error.cpp1
-rw-r--r--extra/yassl/src/yassl_int.cpp34
10 files changed, 62 insertions, 13 deletions
diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am
index 1f5f1ee7a4e..4ebb9a2d862 100644
--- a/extra/yassl/src/Makefile.am
+++ b/extra/yassl/src/Makefile.am
@@ -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
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp
index 1da0827ac4e..56d355bea80 100644
--- a/extra/yassl/src/buffer.cpp
+++ b/extra/yassl/src/buffer.cpp
@@ -25,6 +25,7 @@
*/
#include <string.h> // memcpy
+#include "runtime.hpp"
#include "buffer.hpp"
#include "yassl_types.hpp"
diff --git a/extra/yassl/src/cert_wrapper.cpp b/extra/yassl/src/cert_wrapper.cpp
index 7a8c7dfe253..a775c366a92 100644
--- a/extra/yassl/src/cert_wrapper.cpp
+++ b/extra/yassl/src/cert_wrapper.cpp
@@ -24,6 +24,7 @@
*
*/
+#include "runtime.hpp"
#include "cert_wrapper.hpp"
#include "yassl_int.hpp"
diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp
index 8a0b66ead42..4827d396e81 100644
--- a/extra/yassl/src/lock.cpp
+++ b/extra/yassl/src/lock.cpp
@@ -22,6 +22,7 @@
/* Locking functions
*/
+#include "runtime.hpp"
#include "lock.hpp"
diff --git a/extra/yassl/src/log.cpp b/extra/yassl/src/log.cpp
index 38633cd1210..8ab351ee2b1 100644
--- a/extra/yassl/src/log.cpp
+++ b/extra/yassl/src/log.cpp
@@ -22,6 +22,8 @@
/* Debug logging functions
*/
+
+#include "runtime.hpp"
#include "log.hpp"
#ifdef YASSL_LOG
diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
index 00f9c8d170c..2252dfafdc5 100644
--- a/extra/yassl/src/socket_wrapper.cpp
+++ b/extra/yassl/src/socket_wrapper.cpp
@@ -26,6 +26,7 @@
*/
+#include "runtime.hpp"
#include "socket_wrapper.hpp"
#ifndef _WIN32
diff --git a/extra/yassl/src/template_instnt.cpp b/extra/yassl/src/template_instnt.cpp
index 5cf4f8c39f8..5ee57e76aed 100644
--- a/extra/yassl/src/template_instnt.cpp
+++ b/extra/yassl/src/template_instnt.cpp
@@ -1,3 +1,29 @@
+/* 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
+
diff --git a/extra/yassl/src/timer.cpp b/extra/yassl/src/timer.cpp
index cfa1319ae80..4fe0d3aa4f9 100644
--- a/extra/yassl/src/timer.cpp
+++ b/extra/yassl/src/timer.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "runtime.hpp"
#include "timer.hpp"
namespace yaSSL {
diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp
index 6ae5a9f6663..c53aef2068d 100644
--- a/extra/yassl/src/yassl_error.cpp
+++ b/extra/yassl/src/yassl_error.cpp
@@ -23,6 +23,7 @@
/* yaSSL error implements and an exception class
*/
+#include "runtime.hpp"
#include "yassl_error.hpp"
namespace yaSSL {
diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
index e9c1ed53816..740618ce701 100644
--- a/extra/yassl/src/yassl_int.cpp
+++ b/extra/yassl/src/yassl_int.cpp
@@ -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
+