List:Commits« Previous MessageNext Message »
From:msvensson Date:August 28 2007 8:35am
Subject:bk commit into 5.0 tree (msvensson:1.2503) BUG#27265
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@stripped, 2007-08-28 10:35:55+02:00, msvensson@pilot.(none) +15 -0
  Import yaSSL version 1.7.2
  - Fix bug#27265
  - Support for fixing bug#18441

  extra/yassl/include/openssl/crypto.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +1 -0
    Import patch yassl.diff

  extra/yassl/include/openssl/des_old.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +1 -0
    Import patch yassl.diff

  extra/yassl/include/openssl/des_old.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +0 -0

  extra/yassl/include/openssl/evp.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +10 -0
    Import patch yassl.diff

  extra/yassl/include/openssl/evp.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +0 -0

  extra/yassl/include/openssl/hmac.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +1 -0
    Import patch yassl.diff

  extra/yassl/include/openssl/hmac.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +0 -0

  extra/yassl/include/openssl/objects.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +1 -0
    Import patch yassl.diff

  extra/yassl/include/openssl/objects.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +0 -0

  extra/yassl/include/openssl/prefix_ssl.h@stripped, 2007-08-28 10:35:54+02:00, msvensson@pilot.(none) +3 -0
    Update prefixes

  extra/yassl/include/openssl/sha.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +1 -0
    Import patch yassl.diff

  extra/yassl/include/openssl/sha.h@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +0 -0

  extra/yassl/include/openssl/ssl.h@stripped, 2007-08-28 09:45:25+02:00, msvensson@pilot.(none) +2 -1
    Import patch yassl.diff

  extra/yassl/include/yassl_int.hpp@stripped, 2007-08-06 10:02:27+02:00, msvensson@pilot.(none) +1 -1
    Import patch yassl.diff

  extra/yassl/src/handshake.cpp@stripped, 2007-08-28 09:57:52+02:00, msvensson@pilot.(none) +4 -0
    Import patch yassl.diff

  extra/yassl/src/socket_wrapper.cpp@stripped, 2007-08-28 10:03:04+02:00, msvensson@pilot.(none) +0 -4
    Import patch yassl.diff

  extra/yassl/src/ssl.cpp@stripped, 2007-08-28 09:45:26+02:00, msvensson@pilot.(none) +6 -0
    Import patch yassl.diff

  extra/yassl/src/yassl_int.cpp@stripped, 2007-08-20 21:54:45+02:00, msvensson@pilot.(none) +1 -0
    Import patch yassl.diff

  extra/yassl/taocrypt/src/coding.cpp@stripped, 2007-05-03 19:31:49+02:00, msvensson@pilot.(none) +3 -2
    Import patch yassl.diff

  extra/yassl/taocrypt/src/crypto.cpp@stripped, 2007-08-21 00:31:31+02:00, msvensson@pilot.(none) +5 -0
    Import patch yassl.diff

diff -Nrup a/extra/yassl/include/openssl/crypto.h b/extra/yassl/include/openssl/crypto.h
--- a/extra/yassl/include/openssl/crypto.h	2006-05-31 22:14:47 +02:00
+++ b/extra/yassl/include/openssl/crypto.h	2007-08-21 00:31:31 +02:00
@@ -9,6 +9,7 @@
 
 const char* SSLeay_version(int type);
 
+#define SSLEAY_NUMBER_DEFINED
 #define SSLEAY_VERSION 0x0900L
 #define SSLEAY_VERSION_NUMBER SSLEAY_VERSION
 
diff -Nrup a/extra/yassl/include/openssl/des_old.h b/extra/yassl/include/openssl/des_old.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/extra/yassl/include/openssl/des_old.h	2007-08-21 00:31:31 +02:00
@@ -0,0 +1 @@
+/* des_old.h  for openvn */
diff -Nrup a/extra/yassl/include/openssl/evp.h b/extra/yassl/include/openssl/evp.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/extra/yassl/include/openssl/evp.h	2007-08-21 00:31:31 +02:00
@@ -0,0 +1,10 @@
+/* evp.h for openSSL */
+
+#ifndef SSLEAY_NUMBER_DEFINED
+#define SSLEAY_NUMBER_DEFINED
+
+/* for OpenVPN */
+#define SSLEAY_VERSION_NUMBER 0x0090700f
+
+
+#endif /* SSLEAY_NUMBER_DEFINED */
diff -Nrup a/extra/yassl/include/openssl/hmac.h b/extra/yassl/include/openssl/hmac.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/extra/yassl/include/openssl/hmac.h	2007-08-21 00:31:31 +02:00
@@ -0,0 +1 @@
+/* hmac.h  for openvpn */
diff -Nrup a/extra/yassl/include/openssl/objects.h b/extra/yassl/include/openssl/objects.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/extra/yassl/include/openssl/objects.h	2007-08-21 00:31:31 +02:00
@@ -0,0 +1 @@
+/* objects.h  for openvpn */
diff -Nrup a/extra/yassl/include/openssl/prefix_ssl.h b/extra/yassl/include/openssl/prefix_ssl.h
--- a/extra/yassl/include/openssl/prefix_ssl.h	2006-11-29 09:21:33 +01:00
+++ b/extra/yassl/include/openssl/prefix_ssl.h	2007-08-28 10:35:54 +02:00
@@ -30,6 +30,7 @@
 #define SSL_CTX_new yaSSL_CTX_new
 #define SSL_new yaSSL_new
 #define SSL_set_fd yaSSL_set_fd
+#define SSL_get_fd yaSSL_get_fd
 #define SSL_connect yaSSL_connect
 #define SSL_write yaSSL_write
 #define SSL_read yaSSL_read
@@ -91,6 +92,8 @@
 #define SSL_set_rfd yaSSL_set_rfd
 #define SSL_set_wfd yaSSL_set_wfd
 #define SSL_set_shutdown yaSSL_set_shutdown
+#define SSL_set_quiet_shutdown yaSSL_set_quiet_shutdown
+#define SSL_get_quiet_shutdown yaSSL_get_quiet_shutdown
 #define SSL_want_read yaSSL_want_read
 #define SSL_want_write yaSSL_want_write
 #define SSL_pending yaSSL_pending
diff -Nrup a/extra/yassl/include/openssl/sha.h b/extra/yassl/include/openssl/sha.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/extra/yassl/include/openssl/sha.h	2007-08-21 00:31:31 +02:00
@@ -0,0 +1 @@
+/* sha.h  for openvpn */
diff -Nrup a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
--- a/extra/yassl/include/openssl/ssl.h	2007-07-13 04:06:31 +02:00
+++ b/extra/yassl/include/openssl/ssl.h	2007-08-28 09:45:25 +02:00
@@ -34,7 +34,7 @@
 #include "rsa.h"
 
 
-#define YASSL_VERSION "1.6.5"
+#define YASSL_VERSION "1.7.2"
 
 
 #if defined(__cplusplus)
@@ -201,6 +201,7 @@ typedef int YASSL_SOCKET_T;
 SSL_CTX* SSL_CTX_new(SSL_METHOD*);
 SSL* SSL_new(SSL_CTX*);
 int  SSL_set_fd (SSL*, YASSL_SOCKET_T);
+YASSL_SOCKET_T SSL_get_fd(const SSL*);
 int  SSL_connect(SSL*);
 int  SSL_write(SSL*, const void*, int);
 int  SSL_read(SSL*, void*, int);
diff -Nrup a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp
--- a/extra/yassl/include/yassl_int.hpp	2007-07-13 06:45:51 +02:00
+++ b/extra/yassl/include/yassl_int.hpp	2007-08-06 10:02:27 +02:00
@@ -584,7 +584,7 @@ class SSL {
     Socket              socket_;                // socket wrapper
     Buffers             buffers_;               // buffered handshakes and data
     Log                 log_;                   // logger
-    bool                quietShutdown_;         // shutdown without handshakes
+    bool                quietShutdown_;
 
     // optimization variables
     bool                has_data_;              // buffered data ready?
diff -Nrup a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp
--- a/extra/yassl/src/handshake.cpp	2007-01-25 19:34:38 +01:00
+++ b/extra/yassl/src/handshake.cpp	2007-08-28 09:57:52 +02:00
@@ -719,6 +719,10 @@ int DoProcessReply(SSL& ssl)
 
     // add new data
     uint read  = ssl.useSocket().receive(buffer.get_buffer() + buffSz, ready);
+    if (read == static_cast<uint>(-1)) {
+        ssl.SetError(receive_error);
+        return 0;
+    }
     buffer.add_size(read);
     uint offset = 0;
     const MessageFactory& mf = ssl.getFactory().getMessage();
diff -Nrup a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
--- a/extra/yassl/src/socket_wrapper.cpp	2007-01-25 19:39:15 +01:00
+++ b/extra/yassl/src/socket_wrapper.cpp	2007-08-28 10:03:04 +02:00
@@ -114,8 +114,6 @@ uint Socket::send(const byte* buf, unsig
     const byte* pos = buf;
     const byte* end = pos + sz;
 
-    assert(socket_ != INVALID_SOCKET);
-
     while (pos != end) {
         int sent = ::send(socket_, reinterpret_cast<const char *>(pos),
                           static_cast<int>(end - pos), flags);
@@ -132,7 +130,6 @@ uint Socket::send(const byte* buf, unsig
 
 uint Socket::receive(byte* buf, unsigned int sz, int flags)
 {
-    assert(socket_ != INVALID_SOCKET);
     wouldBlock_ = false;
 
     int recvd = ::recv(socket_, reinterpret_cast<char *>(buf), sz, flags);
@@ -163,7 +160,6 @@ bool Socket::wait()
 
 void Socket::shutDown(int how)
 {
-    assert(socket_ != INVALID_SOCKET);
     shutdown(socket_, how);
 }
 
diff -Nrup a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
--- a/extra/yassl/src/ssl.cpp	2007-07-13 04:06:31 +02:00
+++ b/extra/yassl/src/ssl.cpp	2007-08-28 09:45:26 +02:00
@@ -239,6 +239,12 @@ int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T 
 }
 
 
+YASSL_SOCKET_T SSL_get_fd(const SSL* ssl)
+{
+    return ssl->getSocket().get_fd();
+}
+
+
 int SSL_connect(SSL* ssl)
 {
     if (ssl->GetError() == YasslError(SSL_ERROR_WANT_READ))
diff -Nrup a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
--- a/extra/yassl/src/yassl_int.cpp	2007-07-13 06:45:51 +02:00
+++ b/extra/yassl/src/yassl_int.cpp	2007-08-20 21:54:45 +02:00
@@ -773,6 +773,7 @@ void SSL::SetError(YasslError ye)
     // TODO: add string here
 }
 
+
 // set the quiet shutdown mode (close_nofiy not sent or received on shutdown)
 void SSL::SetQuietShutdown(bool mode)
 {
diff -Nrup a/extra/yassl/taocrypt/src/coding.cpp b/extra/yassl/taocrypt/src/coding.cpp
--- a/extra/yassl/taocrypt/src/coding.cpp	2007-07-17 20:43:44 +02:00
+++ b/extra/yassl/taocrypt/src/coding.cpp	2007-05-03 19:31:49 +02:00
@@ -107,11 +107,12 @@ void HexDecoder::Decode()
         // sanity checks
         assert( b  < sizeof(hexDecode)/sizeof(hexDecode[0]) );
         assert( b2 < sizeof(hexDecode)/sizeof(hexDecode[0]) );
-        assert( b != bad && b2 != bad );
 
         b  = hexDecode[b];
         b2 = hexDecode[b2];
         
+        assert( b != bad && b2 != bad );
+        
         decoded_[i++] = (b << 4) | b2;
         bytes -= 2;
     }
@@ -184,7 +185,7 @@ void Base64Decoder::Decode()
 {
     word32 bytes = coded_.size();
     word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz); 
-    plainSz = ((plainSz * 3) / 4) + 3;
+    plainSz = (plainSz * 3 + 3) / 4;
     decoded_.New(plainSz);
 
     word32 i = 0;
diff -Nrup a/extra/yassl/taocrypt/src/crypto.cpp b/extra/yassl/taocrypt/src/crypto.cpp
--- a/extra/yassl/taocrypt/src/crypto.cpp	2006-09-26 23:09:44 +02:00
+++ b/extra/yassl/taocrypt/src/crypto.cpp	2007-08-21 00:31:31 +02:00
@@ -26,6 +26,11 @@ extern "C" {
     // locking handled internally by library
     char CRYPTO_lock() { return 0;}
     char CRYPTO_add_lock() { return 0;}
+
+
+    // for openvpn, test are the signatures they use
+    char EVP_CIPHER_CTX_init() { return 0; }
+    char CRYPTO_mem_ctrl() { return 0; }
 }  // extern "C"
 
 
Thread
bk commit into 5.0 tree (msvensson:1.2503) BUG#27265msvensson28 Aug