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, 2006-09-27 14:36:12+02:00, msvensson@neptunus.(none) +7 -0
Import yaSSL version 1.4.3
extra/yassl/examples/echoserver/echoserver.cpp@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +17 -24
Import patch yassl.diff
extra/yassl/examples/server/server.cpp@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +12 -15
Import patch yassl.diff
extra/yassl/include/openssl/ssl.h@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +1 -1
Import patch yassl.diff
extra/yassl/src/template_instnt.cpp@stripped, 2006-09-27 14:27:49+02:00, msvensson@neptunus.(none) +1 -0
Import patch yassl.diff
extra/yassl/taocrypt/src/crypto.cpp@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +39 -0
Import patch yassl.diff
extra/yassl/taocrypt/src/crypto.cpp@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +0 -0
extra/yassl/taocrypt/src/misc.cpp@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +1 -0
Import patch yassl.diff
extra/yassl/testsuite/test.hpp@stripped, 2006-09-26 23:09:44+02:00, msvensson@neptunus.(none) +1 -1
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: neptunus.(none)
# Root: /home/msvensson/mysql/yassl_import/my50-yassl_import
--- New file ---
+++ extra/yassl/taocrypt/src/crypto.cpp 06/09/26 23:09:44
/* crypto.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.
*
* There are special exceptions to the terms and conditions of the GPL as it
* is applied to yaSSL. View the full text of the exception in the file
* FLOSS-EXCEPTIONS in the directory of this software distribution.
*
* 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
*/
/* put features that other apps expect from OpenSSL type crypto */
extern "C" {
// for libcurl configure test, these are the signatures they use
// locking handled internally by library
char CRYPTO_lock() { return 0;}
char CRYPTO_add_lock() { return 0;}
} // extern "C"
--- 1.4/extra/yassl/examples/echoserver/echoserver.cpp 2006-09-27 14:36:18 +02:00
+++ 1.5/extra/yassl/examples/echoserver/echoserver.cpp 2006-09-27 14:36:18 +02:00
@@ -23,6 +23,18 @@
#endif // NO_MAIN_DRIVER
+
+void EchoError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& s1, SOCKET_T& s2,
+ const char* msg)
+{
+ SSL_CTX_free(ctx);
+ SSL_free(ssl);
+ tcp_close(s1);
+ tcp_close(s2);
+ err_sys(msg);
+}
+
+
THREAD_RETURN YASSL_API echoserver_test(void* args)
{
#ifdef _WIN32
@@ -65,10 +77,9 @@
while (!shutdown) {
sockaddr_in client;
socklen_t client_len = sizeof(client);
- int clientfd = accept(sockfd, (sockaddr*)&client,
+ SOCKET_T clientfd = accept(sockfd, (sockaddr*)&client,
(ACCEPT_THIRD_T)&client_len);
- if (clientfd == -1)
- {
+ if (clientfd == -1) {
SSL_CTX_free(ctx);
tcp_close(sockfd);
err_sys("tcp accept failed");
@@ -77,13 +88,7 @@
SSL* ssl = SSL_new(ctx);
SSL_set_fd(ssl, clientfd);
if (SSL_accept(ssl) != SSL_SUCCESS)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- tcp_close(clientfd);
- err_sys("SSL_accept failed");
- }
+ EchoError(ctx, ssl, sockfd, clientfd, "SSL_accept failed");
char command[1024];
int echoSz(0);
@@ -112,13 +117,7 @@
echoSz += sizeof(footer);
if (SSL_write(ssl, command, echoSz) != echoSz)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- tcp_close(clientfd);
- err_sys("SSL_write failed");
- }
+ EchoError(ctx, ssl, sockfd, clientfd, "SSL_write failed");
break;
}
@@ -129,13 +128,7 @@
#endif
if (SSL_write(ssl, command, echoSz) != echoSz)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- tcp_close(clientfd);
- err_sys("SSL_write failed");
- }
+ EchoError(ctx, ssl, sockfd, clientfd, "SSL_write failed");
}
SSL_free(ssl);
tcp_close(clientfd);
--- 1.3/extra/yassl/examples/server/server.cpp 2006-09-27 14:36:18 +02:00
+++ 1.4/extra/yassl/examples/server/server.cpp 2006-09-27 14:36:18 +02:00
@@ -4,6 +4,15 @@
#include "../../testsuite/test.hpp"
+void ServerError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
+{
+ SSL_CTX_free(ctx);
+ SSL_free(ssl);
+ tcp_close(sockfd);
+ err_sys(msg);
+}
+
+
THREAD_RETURN YASSL_API server_test(void* args)
{
#ifdef _WIN32
@@ -12,7 +21,7 @@
#endif
SOCKET_T sockfd = 0;
- int clientfd = 0;
+ SOCKET_T clientfd = 0;
int argc = 0;
char** argv = 0;
@@ -33,13 +42,7 @@
SSL_set_fd(ssl, clientfd);
if (SSL_accept(ssl) != SSL_SUCCESS)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- tcp_close(clientfd);
- err_sys("SSL_accept failed");
- }
+ ServerError(ctx, ssl, clientfd, "SSL_accept failed");
showPeer(ssl);
printf("Using Cipher Suite: %s\n", SSL_get_cipher(ssl));
@@ -50,13 +53,7 @@
char msg[] = "I hear you, fa shizzle!";
if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- tcp_close(clientfd);
- err_sys("SSL_write failed");
- }
+ ServerError(ctx, ssl, clientfd, "SSL_write failed");
DH_free(dh);
SSL_CTX_free(ctx);
--- 1.7/extra/yassl/testsuite/test.hpp 2006-09-27 14:36:18 +02:00
+++ 1.8/extra/yassl/testsuite/test.hpp 2006-09-27 14:36:18 +02:00
@@ -312,7 +312,7 @@
}
-inline void tcp_accept(SOCKET_T& sockfd, int& clientfd, func_args& args)
+inline void tcp_accept(SOCKET_T& sockfd, SOCKET_T& clientfd, func_args& args)
{
tcp_listen(sockfd);
--- 1.16/extra/yassl/include/openssl/ssl.h 2006-09-27 14:36:18 +02:00
+++ 1.17/extra/yassl/include/openssl/ssl.h 2006-09-27 14:36:18 +02:00
@@ -41,7 +41,7 @@
#include "rsa.h"
-#define YASSL_VERSION "1.4.2"
+#define YASSL_VERSION "1.4.3"
#if defined(__cplusplus)
--- 1.12/extra/yassl/src/template_instnt.cpp 2006-09-27 14:36:18 +02:00
+++ 1.13/extra/yassl/src/template_instnt.cpp 2006-09-27 14:36:18 +02:00
@@ -109,6 +109,7 @@
template int min<int>(int, int);
template unsigned int min<unsigned int>(unsigned int, unsigned int);
+template unsigned long min<unsigned long>(unsigned long, unsigned long);
}
#endif // HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
--- 1.16/extra/yassl/taocrypt/src/misc.cpp 2006-09-27 14:36:18 +02:00
+++ 1.17/extra/yassl/taocrypt/src/misc.cpp 2006-09-27 14:36:18 +02:00
@@ -29,6 +29,7 @@
#include "runtime.hpp"
#include "misc.hpp"
+
#ifdef YASSL_PURE_C
void* operator new(size_t sz, TaoCrypt::new_t)
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2273) | msvensson | 27 Sep |