]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Split OCSP peer_cert/peer_issuer debug output into parts
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 24 Sep 2013 13:36:06 +0000 (16:36 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 25 Sep 2013 11:43:58 +0000 (14:43 +0300)
This makes it clearer which certificate was missing.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/crypto/tls_openssl.c

index 28b1313f8b68cfbd8217da968f10780513c22bc4..c0822407f68f329c1ea47c4e03e0c8f204fca662 100644 (file)
@@ -2862,8 +2862,15 @@ static int ocsp_resp_cb(SSL *s, void *arg)
 
        wpa_printf(MSG_DEBUG, "OpenSSL: OCSP response verification succeeded");
 
-       if (!conn->peer_cert || !conn->peer_issuer) {
-               wpa_printf(MSG_DEBUG, "OpenSSL: Peer certificate or issue certificate not available for OCSP status check");
+       if (!conn->peer_cert) {
+               wpa_printf(MSG_DEBUG, "OpenSSL: Peer certificate not available for OCSP status check");
+               OCSP_BASICRESP_free(basic);
+               OCSP_RESPONSE_free(rsp);
+               return 0;
+       }
+
+       if (!conn->peer_issuer) {
+               wpa_printf(MSG_DEBUG, "OpenSSL: Peer issuer certificate not available for OCSP status check");
                OCSP_BASICRESP_free(basic);
                OCSP_RESPONSE_free(rsp);
                return 0;