use ERR_peek_last_error() instead of ERR_peek_error() to ignore
authorBodo Möller <bodo@openssl.org>
Thu, 28 Feb 2002 14:03:41 +0000 (14:03 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 28 Feb 2002 14:03:41 +0000 (14:03 +0000)
any other errors that may be left in the error queue

Submitted by: Jeffrey Altman

crypto/pem/pem_info.c

index 4a1b93f808a0c568ab379e03ac139e13255b8314..453fa2db34b6dab54ac677e4a486ef180a4eaab9 100644 (file)
@@ -111,7 +111,7 @@ STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pe
                i=PEM_read_bio(bp,&name,&header,&data,&len);
                if (i == 0)
                        {
-                       error=ERR_GET_REASON(ERR_peek_error());
+                       error=ERR_GET_REASON(ERR_peek_last_error());
                        if (error == PEM_R_NO_START_LINE)
                                {
                                ERR_clear_error();