]> git.pld-linux.org Git - packages/mysql.git/blame - mysql-chain-certs.patch
adjust for 5.6.14
[packages/mysql.git] / mysql-chain-certs.patch
CommitLineData
fc032bd9
AM
1Fix things so that chains of certificates work in the server and client
2certificate files.
3
4This only really works for OpenSSL-based builds, as yassl is unable to read
5multiple certificates from a file. The patch below to yassl/src/ssl.cpp
6doesn't fix that, but just arranges that the viosslfactories.c patch won't
7have any ill effects in a yassl build. Since we don't use yassl in Red Hat/
8Fedora builds, I'm not feeling motivated to try to fix yassl for this.
9
10See RH bug #598656. Filed upstream at http://bugs.mysql.com/bug.php?id=54158
11
12
13diff -Naur mysql-5.1.47.orig/vio/viosslfactories.c mysql-5.1.47/vio/viosslfactories.c
14--- mysql-5.1.47.orig/vio/viosslfactories.c 2010-05-06 11:28:07.000000000 -0400
15+++ mysql-5.1.47/vio/viosslfactories.c 2010-05-26 23:23:46.000000000 -0400
d79171ec
AM
16@@ -106,7 +106,7 @@
17 key_file= cert_file;
18
19 if (cert_file &&
20- SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
21+ SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0)
fc032bd9 22 {
d79171ec
AM
23 *error= SSL_INITERR_CERT;
24 DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file));
fc032bd9
AM
25diff -Naur mysql-5.1.47.orig/extra/yassl/src/ssl.cpp mysql-5.1.47/extra/yassl/src/ssl.cpp
26--- mysql-5.1.47.orig/extra/yassl/src/ssl.cpp 2010-05-06 11:24:26.000000000 -0400
27+++ mysql-5.1.47/extra/yassl/src/ssl.cpp 2010-05-26 23:29:13.000000000 -0400
28@@ -1606,10 +1606,10 @@
29 }
30
31
32- int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*)
33+ int SSL_CTX_use_certificate_chain_file(SSL_CTX* ctx, const char* file)
34 {
35- // TDOD:
36- return SSL_SUCCESS;
37+ // For the moment, treat like use_certificate_file
38+ return read_file(ctx, file, SSL_FILETYPE_PEM, Cert);
39 }
40
41
This page took 0.030584 seconds and 4 git commands to generate.