List:Commits« Previous MessageNext Message »
From:msvensson Date:May 5 2006 8:33am
Subject:bk commit into 5.0 tree (msvensson:1.2113)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2113 06/05/05 10:33:04 msvensson@shellback.(none) +15 -0
  Import from yaSSL

  extra/yassl/testsuite/testsuite.cpp
    1.3 06/05/04 22:23:39 msvensson@shellback.(none)[msvensson] +1 -0
    Import patch yassl.diff

  extra/yassl/testsuite/make.bat
    1.2 06/05/04 22:23:39 msvensson@shellback.(none)[msvensson] +1 -1
    Import patch yassl.diff

  extra/yassl/taocrypt/test/make.bat
    1.2 06/05/04 22:23:39 msvensson@shellback.(none)[msvensson] +1 -1
    Import patch yassl.diff

  extra/yassl/taocrypt/src/make.bat
    1.3 06/05/04 22:23:39 msvensson@shellback.(none)[msvensson] +0 -1
    Import patch yassl.diff

  extra/yassl/taocrypt/benchmark/make.bat
    1.2 06/05/04 22:23:39 msvensson@shellback.(none)[msvensson] +2 -3
    Import patch yassl.diff

  extra/yassl/src/yassl_int.cpp
    1.16 06/05/04 22:23:10 msvensson@shellback.(none)[msvensson] +1 -1
    Import patch yassl.diff

  extra/yassl/src/yassl_imp.cpp
    1.8 06/05/04 22:23:10 msvensson@shellback.(none)[msvensson] +3 -1
    Import patch yassl.diff

  extra/yassl/src/ssl.cpp
    1.13 06/05/03 19:20:53 msvensson@shellback.(none)[msvensson] +49 -45
    Import patch yassl.diff

  extra/yassl/src/make.bat
    1.2 06/05/04 22:23:10 msvensson@shellback.(none)[msvensson] +1 -1
    Import patch yassl.diff

  extra/yassl/include/yassl_types.hpp
    1.12 06/05/04 22:23:38 msvensson@shellback.(none)[msvensson] +0 -4
    Import patch yassl.diff

  extra/yassl/include/openssl/ssl.h
    1.9 06/05/04 22:23:38 msvensson@shellback.(none)[msvensson] +6 -0
    Import patch yassl.diff

  extra/yassl/examples/server/server.cpp
    1.2 06/05/04 22:23:38 msvensson@shellback.(none)[msvensson] +2 -0
    Import patch yassl.diff

  extra/yassl/examples/echoserver/echoserver.cpp
    1.2 06/05/04 22:23:38 msvensson@shellback.(none)[msvensson] +2 -0
    Import patch yassl.diff

  extra/yassl/examples/echoclient/echoclient.cpp
    1.2 06/05/04 22:23:38 msvensson@shellback.(none)[msvensson] +1 -0
    Import patch yassl.diff

  extra/yassl/examples/client/client.cpp
    1.3 06/05/04 22:23:38 msvensson@shellback.(none)[msvensson] +2 -0
    Import patch yassl.diff

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	shellback.(none)
# Root:	/home/msvensson/mysql/my50-maint-yassl

--- 1.2/extra/yassl/examples/client/client.cpp	2006-04-27 01:56:14 +02:00
+++ 1.3/extra/yassl/examples/client/client.cpp	2006-05-04 22:23:38 +02:00
@@ -89,6 +89,8 @@
         args.argv = argv;
 
         client_test(&args);
+        yaSSL_CleanUp();
+
         return args.return_code;
     }
 

--- 1.1/extra/yassl/examples/echoclient/echoclient.cpp	2006-03-29 01:56:42 +02:00
+++ 1.2/extra/yassl/examples/echoclient/echoclient.cpp	2006-05-04 22:23:38 +02:00
@@ -82,6 +82,7 @@
         args.argv = argv;
 
         echoclient_test(&args);
+        yaSSL_CleanUp();
 
         return args.return_code;
     }

--- 1.1/extra/yassl/examples/echoserver/echoserver.cpp	2006-03-29 01:56:42 +02:00
+++ 1.2/extra/yassl/examples/echoserver/echoserver.cpp	2006-05-04 22:23:38 +02:00
@@ -15,6 +15,8 @@
         args.argv = argv;
 
         echoserver_test(&args);
+        yaSSL_CleanUp();
+
         return args.return_code;
     }
 

--- 1.1/extra/yassl/examples/server/server.cpp	2006-03-29 01:56:42 +02:00
+++ 1.2/extra/yassl/examples/server/server.cpp	2006-05-04 22:23:38 +02:00
@@ -67,6 +67,8 @@
         args.argv = argv;
 
         server_test(&args);
+        yaSSL_CleanUp();
+
         return args.return_code;
     }
 

--- 1.1/extra/yassl/src/make.bat	2006-03-29 01:56:41 +02:00
+++ 1.2/extra/yassl/src/make.bat	2006-05-04 22:23:10 +02:00
@@ -1,4 +1,4 @@
-# quick and dirty build file for testing different MSDEVs
+REM quick and dirty build file for testing different MSDEVs
 setlocal 
 
 set myFLAGS= /I../include /I../mySTL /I../taocrypt/include /W3 /c /ZI

--- 1.1/extra/yassl/taocrypt/benchmark/make.bat	2006-03-29 01:56:38 +02:00
+++ 1.2/extra/yassl/taocrypt/benchmark/make.bat	2006-05-04 22:23:39 +02:00
@@ -1,10 +1,9 @@
-# quick and dirty build file for testing different MSDEVs
+REM quick and dirty build file for testing different MSDEVs
 setlocal 
 
 set myFLAGS= /I../include /I../../mySTL /c /W3 /G6 /O2
-#set myFLAGS= /I../include /I../../mySTL /c /W3 
 
 cl %myFLAGS% benchmark.cpp
 
-link.exe  /out:benchmark.exe ../src/taocrypt.lib benchmark.obj
+link.exe  /out:benchmark.exe ../src/taocrypt.lib benchmark.obj advapi32.lib
 

--- 1.2/extra/yassl/taocrypt/src/make.bat	2006-04-24 21:55:44 +02:00
+++ 1.3/extra/yassl/taocrypt/src/make.bat	2006-05-04 22:23:39 +02:00
@@ -2,7 +2,6 @@
 setlocal 
 
 set myFLAGS= /I../include /I../../mySTL /c /W3 /G6 /O2 
-#set myFLAGS= /I../include /I../../mySTL /c /W3 /O1
 
 cl %myFLAGS% aes.cpp
 cl %myFLAGS% aestables.cpp

--- 1.1/extra/yassl/taocrypt/test/make.bat	2006-03-29 01:56:38 +02:00
+++ 1.2/extra/yassl/taocrypt/test/make.bat	2006-05-04 22:23:39 +02:00
@@ -1,4 +1,4 @@
-# quick and dirty build file for testing different MSDEVs
+REM quick and dirty build file for testing different MSDEVs
 setlocal 
 
 set myFLAGS= /I../include /I../../mySTL /c /W3 /G6 /O2

--- 1.1/extra/yassl/testsuite/make.bat	2006-03-29 01:56:42 +02:00
+++ 1.2/extra/yassl/testsuite/make.bat	2006-05-04 22:23:39 +02:00
@@ -1,4 +1,4 @@
-# quick and dirty build file for testing different MSDEVs
+REM quick and dirty build file for testing different MSDEVs
 setlocal 
 
 set myFLAGS= /I../include /I../taocrypt/include /I../mySTL /c /W3 /G6 /O2 /MT /D"WIN32" /D"NO_MAIN_DRIVER"

--- 1.2/extra/yassl/testsuite/testsuite.cpp	2006-04-28 01:10:59 +02:00
+++ 1.3/extra/yassl/testsuite/testsuite.cpp	2006-05-04 22:23:39 +02:00
@@ -91,6 +91,7 @@
     assert(memcmp(input, output, sizeof(input)) == 0);
 
     printf("\nAll tests passed!\n");
+    yaSSL_CleanUp();
 
     return 0;
 }

--- 1.8/extra/yassl/include/openssl/ssl.h	2006-04-27 01:56:14 +02:00
+++ 1.9/extra/yassl/include/openssl/ssl.h	2006-05-04 22:23:38 +02:00
@@ -32,6 +32,12 @@
 #include "opensslv.h" /* for version number */
 #include "rsa.h"
 
+
+extern "C" void yaSSL_CleanUp();   /* call once at end of application use to
+                                      free static singleton memory holders,
+                                      not a leak per se, but helpful when 
+                                      looking for them                      */
+
 #if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE)
 namespace yaSSL {
 extern "C" {

--- 1.11/extra/yassl/include/yassl_types.hpp	2006-04-27 17:20:40 +02:00
+++ 1.12/extra/yassl/include/yassl_types.hpp	2006-05-04 22:23:38 +02:00
@@ -35,10 +35,6 @@
 namespace yaSSL {
 
 
-// Delete static singleton memory holders
-void CleanUp();
-
-
 #ifdef YASSL_PURE_C
 
     // library allocation

--- 1.12/extra/yassl/src/ssl.cpp	2006-04-28 01:10:59 +02:00
+++ 1.13/extra/yassl/src/ssl.cpp	2006-05-03 19:20:53 +02:00
@@ -53,6 +53,53 @@
 using mySTL::min;
 
 
+int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
+{
+    if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)
+        return SSL_BAD_FILETYPE;
+
+    FILE* input = fopen(file, "rb");
+    if (!input)
+        return SSL_BAD_FILE;
+
+    if (type == CA) {
+        x509* ptr = PemToDer(file, Cert);
+        if (!ptr) {
+            fclose(input);
+            return SSL_BAD_FILE;
+        }
+        ctx->AddCA(ptr);  // takes ownership
+    }
+    else {
+        x509*& x = (type == Cert) ? ctx->certificate_ : ctx->privateKey_;
+
+        if (format == SSL_FILETYPE_ASN1) {
+            fseek(input, 0, SEEK_END);
+            long sz = ftell(input);
+            rewind(input);
+            x = NEW_YS x509(sz); // takes ownership
+            size_t bytes = fread(x->use_buffer(), sz, 1, input);
+            if (bytes != 1) {
+                fclose(input);
+                return SSL_BAD_FILE;
+            }
+        }
+        else {
+            x = PemToDer(file, type);
+            if (!x) {
+                fclose(input);
+                return SSL_BAD_FILE;
+            }
+        }
+    }
+    fclose(input);
+    return SSL_SUCCESS;
+}
+
+
+extern "C" {
+
+
 SSL_METHOD* SSLv3_method()
 {
     return SSLv3_client_method();
@@ -449,50 +496,6 @@
 }
 
 
-int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
-{
-    if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)
-        return SSL_BAD_FILETYPE;
-
-    FILE* input = fopen(file, "rb");
-    if (!input)
-        return SSL_BAD_FILE;
-
-    if (type == CA) {
-        x509* ptr = PemToDer(file, Cert);
-        if (!ptr) {
-            fclose(input);
-            return SSL_BAD_FILE;
-        }
-        ctx->AddCA(ptr);  // takes ownership
-    }
-    else {
-        x509*& x = (type == Cert) ? ctx->certificate_ : ctx->privateKey_;
-
-        if (format == SSL_FILETYPE_ASN1) {
-            fseek(input, 0, SEEK_END);
-            long sz = ftell(input);
-            rewind(input);
-            x = NEW_YS x509(sz); // takes ownership
-            size_t bytes = fread(x->use_buffer(), sz, 1, input);
-            if (bytes != 1) {
-                fclose(input);
-                return SSL_BAD_FILE;
-            }
-        }
-        else {
-            x = PemToDer(file, type);
-            if (!x) {
-                fclose(input);
-                return SSL_BAD_FILE;
-            }
-        }
-    }
-    fclose(input);
-    return SSL_SUCCESS;
-}
-
-
 int SSL_CTX_use_certificate_file(SSL_CTX* ctx, const char* file, int format)
 {
     return read_file(ctx, file, format, Cert);
@@ -1080,7 +1083,7 @@
 
     switch (nid) {
     case NID_commonName:
-        char* found = strstr(start, "/CN=");
+        const char* found = strstr(start, "/CN=");
         if (found) {
             found += 4;  // advance to str
             idx = found - start + lastpos + 1;
@@ -1401,4 +1404,5 @@
     // end stunnel needs
 
 
+} // extern "C"
 } // namespace

--- 1.7/extra/yassl/src/yassl_imp.cpp	2006-04-11 22:34:30 +02:00
+++ 1.8/extra/yassl/src/yassl_imp.cpp	2006-05-04 22:23:10 +02:00
@@ -1975,7 +1975,9 @@
     : pre_master_secret_(0), sequence_number_(0), peer_sequence_number_(0),
       pre_secret_len_(0), send_server_key_(false), master_clean_(false),
       TLS_(v.major_ >= 3 && v.minor_ >= 1), version_(v), random_(ran) 
-{}
+{
+    memset(sessionID_, 0, sizeof(sessionID_));
+}
 
 
 Connection::~Connection() 

--- 1.15/extra/yassl/src/yassl_int.cpp	2006-04-28 01:10:59 +02:00
+++ 1.16/extra/yassl/src/yassl_int.cpp	2006-05-04 22:23:10 +02:00
@@ -1415,7 +1415,7 @@
 }
 
 
-void CleanUp()
+extern "C" void yaSSL_CleanUp()
 {
     TaoCrypt::CleanUp();
     ysDelete(cryptProviderInstance);
Thread
bk commit into 5.0 tree (msvensson:1.2113)msvensson5 May