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.2121 06/05/08 12:06:52 msvensson@neptunus.(none) +3 -0
Merge 192.168.0.20:mysql/my50-maint-yassl
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
extra/yassl/testsuite/test.hpp
1.4 06/05/08 12:06:46 msvensson@neptunus.(none) +0 -0
Auto merged
extra/yassl/taocrypt/src/make.bat
1.4 06/05/08 12:06:46 msvensson@neptunus.(none) +0 -0
Auto merged
extra/yassl/src/ssl.cpp
1.14 06/05/08 12:06:46 msvensson@neptunus.(none) +0 -1
Auto merged
# 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/mysql-5.0-maint/RESYNC
--- 1.3/extra/yassl/taocrypt/src/make.bat 2006-05-03 13:23:12 +02:00
+++ 1.4/extra/yassl/taocrypt/src/make.bat 2006-05-08 12:06:46 +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.3/extra/yassl/testsuite/test.hpp 2006-05-03 13:23:12 +02:00
+++ 1.4/extra/yassl/testsuite/test.hpp 2006-05-08 12:06:46 +02:00
@@ -27,7 +27,7 @@
#endif /* _WIN32 */
-#if defined(__MACH__) || defined(_WIN32)
+#if !defined(_SOCKLEN_T) && (defined(__MACH__) || defined(_WIN32))
typedef int socklen_t;
#endif
--- 1.13/extra/yassl/src/ssl.cpp 2006-05-03 17:55:25 +02:00
+++ 1.14/extra/yassl/src/ssl.cpp 2006-05-08 12:06:46 +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);
@@ -1401,4 +1404,5 @@
// end stunnel needs
+} // extern "C"
} // namespace
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2121) | msvensson | 8 May |