summaryrefslogtreecommitdiff
path: root/vio/viosslfactories.c
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2007-02-06 17:34:06 +0100
committermsvensson@neptunus.(none) <>2007-02-06 17:34:06 +0100
commit5f5b0e9b393479c65d53d7002e08051b8b408b57 (patch)
tree6a6ee42de2795dc3fd6a48246fbf2fa4df2bbb8c /vio/viosslfactories.c
parent72fbdf293324a50404801e787eb7bf94870e83c5 (diff)
parent6fc734a7688878ca7acf93215958613012fb482e (diff)
downloadmariadb-git-5f5b0e9b393479c65d53d7002e08051b8b408b57.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/yassL-import/my50-yassL-import
into neptunus.(none):/home/msvensson/mysql/yassL-import/my51-yassL-import
Diffstat (limited to 'vio/viosslfactories.c')
-rw-r--r--vio/viosslfactories.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 147e80aa2f4..9b407d08b3b 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -84,10 +84,10 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file)
{
if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
{
- DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file));
- fprintf(stderr,"SSL error: ");
- ERR_print_errors_fp(stderr);
- fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file);
+ DBUG_PRINT("error",("unable to get certificate from '%s'", cert_file));
+ DBUG_EXECUTE("error", ERR_print_errors_fp(DBUG_FILE););
+ fprintf(stderr, "SSL error: Unable to get certificate from '%s'\n",
+ cert_file);
fflush(stderr);
DBUG_RETURN(1);
}
@@ -97,10 +97,10 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file)
if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0)
{
- DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file));
- fprintf(stderr,"SSL error: ");
- ERR_print_errors_fp(stderr);
- fprintf(stderr,"Unable to get private key from '%s'\n", key_file);
+ DBUG_PRINT("error", ("unable to get private key from '%s'", key_file));
+ DBUG_EXECUTE("error", ERR_print_errors_fp(DBUG_FILE););
+ fprintf(stderr, "SSL error: Unable to get private key from '%s'\n",
+ key_file);
fflush(stderr);
DBUG_RETURN(1);
}
@@ -112,7 +112,12 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file)
if (!SSL_CTX_check_private_key(ctx))
{
DBUG_PRINT("error",
- ("Private key does not match the certificate public key\n"));
+ ("Private key does not match the certificate public key"));
+ DBUG_EXECUTE("error", ERR_print_errors_fp(DBUG_FILE););
+ fprintf(stderr,
+ "SSL error: "
+ "Private key does not match the certificate public key\n");
+ fflush(stderr);
DBUG_RETURN(1);
}
}