summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-05-15 13:18:42 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-05-15 13:18:42 +0300
commit22e4b62e03da4290f0a40739914e4d0257990d50 (patch)
tree189fa89f8104578f49995870f0decd93b5327b0a
parent375afcf1df5e5227e1f1835f1106b496c2ff8b95 (diff)
parente4e19015692e727be655ce287f8cd6018d7fc6b2 (diff)
downloadmariadb-git-22e4b62e03da4290f0a40739914e4d0257990d50.tar.gz
merge 5.1->5.5
-rw-r--r--extra/yassl/taocrypt/src/asn.cpp4
-rw-r--r--vio/viosslfactories.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp
index a502666d15b..5ec4cac1c44 100644
--- a/extra/yassl/taocrypt/src/asn.cpp
+++ b/extra/yassl/taocrypt/src/asn.cpp
@@ -758,6 +758,10 @@ void CertDecoder::GetName(NameType nt)
while (source_.get_index() < length) {
GetSet();
+ if (source_.GetError().What() == SET_E) {
+ source_.SetError(NO_ERROR_E); // extensions may only have sequence
+ source_.prev();
+ }
GetSequence();
byte b = source_.next();
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index d71021452d1..fd797e297ab 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -164,8 +164,8 @@ static void check_ssl_init()
static struct st_VioSSLFd *
new_VioSSLFd(const char *key_file, const char *cert_file,
const char *ca_file, const char *ca_path,
- const char *cipher, SSL_METHOD *method,
- enum enum_ssl_init_error *error)
+ const char *cipher, my_bool is_client_method,
+ enum enum_ssl_init_error* error)
{
DH *dh;
struct st_VioSSLFd *ssl_fd;
@@ -185,7 +185,9 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
my_malloc(sizeof(struct st_VioSSLFd),MYF(0)))))
DBUG_RETURN(0);
- if (!(ssl_fd->ssl_context= SSL_CTX_new(method)))
+ if (!(ssl_fd->ssl_context= SSL_CTX_new(is_client_method ?
+ TLSv1_client_method() :
+ TLSv1_server_method())))
{
*error= SSL_INITERR_MEMFAIL;
DBUG_PRINT("error", ("%s", sslGetErrString(*error)));
@@ -262,7 +264,7 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
verify= SSL_VERIFY_NONE;
if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
- ca_path, cipher, TLSv1_client_method(), error)))
+ ca_path, cipher, TRUE, error)))
{
return 0;
}
@@ -284,7 +286,7 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
struct st_VioSSLFd *ssl_fd;
int verify= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file,
- ca_path, cipher, TLSv1_server_method(), error)))
+ ca_path, cipher, FALSE, error)))
{
return 0;
}