Reorder inclusion of header files:
[openssl.git] / ssl / ssl_rsa.c
index b15dd506c9d84278549fe63a19b35d30a171a7a5..03828b66326262034b515d057469bcbcdfb198da 100644 (file)
  */
 
 #include <stdio.h>
+#include "ssl_locl.h"
 #include <openssl/bio.h>
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
-#include "ssl_locl.h"
 
 static int ssl_set_cert(CERT *c, X509 *x509);
 static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
@@ -800,9 +800,9 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
                         * by SSL_CTX_use_certificate). */
                        }
                /* When the while loop ends, it's usually just EOF. */
-               err = ERR_peek_error();
+               err = ERR_peek_last_error();
                if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
-                       (void) ERR_get_error();
+                       (void)ERR_get_error();
                else 
                        ret = 0; /* some real error */
                }