summaryrefslogtreecommitdiff
path: root/ssl/ssl_rsa.c
diff options
context:
space:
mode:
authorLutz Jänicke <jaenicke@openssl.org>2008-05-23 10:37:52 +0000
committerLutz Jänicke <jaenicke@openssl.org>2008-05-23 10:37:52 +0000
commitc2c2e7a438bf2876fc780cc1072941ab75769d57 (patch)
treeb8790010d97f6edd7d1fbf78dceae660678620ad /ssl/ssl_rsa.c
parentd18ef847f4c2d15fee0b69a1b331dee5c9e9b97a (diff)
downloadopenssl-new-c2c2e7a438bf2876fc780cc1072941ab75769d57.tar.gz
Clear error queue when starting SSL_CTX_use_certificate_chain_file
PR: 1417, 1513 Submitted by: Erik de Castro Lopo <mle+openssl@mega-nerd.com>
Diffstat (limited to 'ssl/ssl_rsa.c')
-rw-r--r--ssl/ssl_rsa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c
index fc42dfa1ec..a7721d05e3 100644
--- a/ssl/ssl_rsa.c
+++ b/ssl/ssl_rsa.c
@@ -708,6 +708,12 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
int ret=0;
X509 *x=NULL;
+ ERR_clear_error(); /* This function needs to check the error stack
+ even if the return code(s) of called functions
+ indicate success.
+ The error stack must therefore be cleared
+ before starting. */
+
in=BIO_new(BIO_s_file_internal());
if (in == NULL)
{