summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_rsa.c
diff options
context:
space:
mode:
authorLutz Jänicke <jaenicke@openssl.org>2008-05-23 12:37:52 +0200
committerLutz Jänicke <jaenicke@openssl.org>2008-05-23 12:37:52 +0200
commitc2c2e7a438bf2876fc780cc1072941ab75769d57 (patch)
treeb8790010d97f6edd7d1fbf78dceae660678620ad /ssl/ssl_rsa.c
parentRemove all root CA files (beyond test CAs including private key) (diff)
downloadopenssl-c2c2e7a438bf2876fc780cc1072941ab75769d57.tar.xz
openssl-c2c2e7a438bf2876fc780cc1072941ab75769d57.zip
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)
{