diff options
author | Lutz Jänicke <jaenicke@openssl.org> | 2008-05-23 10:37:52 +0000 |
---|---|---|
committer | Lutz Jänicke <jaenicke@openssl.org> | 2008-05-23 10:37:52 +0000 |
commit | c2c2e7a438bf2876fc780cc1072941ab75769d57 (patch) | |
tree | b8790010d97f6edd7d1fbf78dceae660678620ad /ssl | |
parent | d18ef847f4c2d15fee0b69a1b331dee5c9e9b97a (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.c | 6 |
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) { |