forked from wolfSSL/wolfssl
gurde SSL_get_peer_cert_chain->count check by macro option
This commit is contained in:
@ -162,7 +162,7 @@
|
|||||||
#include <wolfssl/wolfcrypt/srp.h>
|
#include <wolfssl/wolfcrypt/srp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SESSION_CERTS)
|
#if defined(SESSION_CERTS) && defined(TEST_PEER_CERT_CHAIN)
|
||||||
#include "wolfssl/internal.h" /* for testing SSL_get_peer_cert_chain */
|
#include "wolfssl/internal.h" /* for testing SSL_get_peer_cert_chain */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -10380,7 +10380,7 @@ static int msgCb(SSL_CTX *ctx, SSL *ssl)
|
|||||||
(void) ctx;
|
(void) ctx;
|
||||||
(void) ssl;
|
(void) ssl;
|
||||||
printf("\n===== msgcb called ====\n");
|
printf("\n===== msgcb called ====\n");
|
||||||
#if defined(SESSION_CERTS)
|
#if defined(SESSION_CERTS) && defined(TEST_PEER_CERT_CHAIN)
|
||||||
AssertTrue(SSL_get_peer_cert_chain(ssl) != NULL);
|
AssertTrue(SSL_get_peer_cert_chain(ssl) != NULL);
|
||||||
AssertIntEQ(((WOLFSSL_X509_CHAIN *)SSL_get_peer_cert_chain(ssl))->count, 1);
|
AssertIntEQ(((WOLFSSL_X509_CHAIN *)SSL_get_peer_cert_chain(ssl))->count, 1);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user