summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorLutz Jänicke <jaenicke@openssl.org>2008-05-23 10:37:22 +0000
committerLutz Jänicke <jaenicke@openssl.org>2008-05-23 10:37:22 +0000
commit5f23288692fcefe8bbc17e1e5c874fc28e00a522 (patch)
tree78f13d9c531e1b5303d64f311707ed33e4de9321 /ssl
parent45c58c7d103cced0d0e1b1c71210dbbe8e004877 (diff)
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')
-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)
{