summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2007-02-06 17:33:11 +0100
committerunknown <msvensson@neptunus.(none)>2007-02-06 17:33:11 +0100
commit5ccb23ae89d6892dba40402d6e0f97cd9ca74f92 (patch)
treee550b921f8333c9969c13806c8b3ae5ee2573a95 /vio
parent2544aa7b9fa21a3fd6fd09a9fbaeee399d4c663d (diff)
downloadmariadb-git-5ccb23ae89d6892dba40402d6e0f97cd9ca74f92.tar.gz
Bug#24157 openssl_1 regression test is broken two different ways
- Send output from 'ERR_print_errors_fp' to DBUG_FILE if --debug is used vio/viosslfactories.c: Send output from 'ERR_print_errors_fp' to DBUG_FILE if --debug is used
Diffstat (limited to 'vio')
-rw-r--r--vio/viosslfactories.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 422745e6d75..55d3792365f 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);
}
}