VerifyCallback with any reason

This commit is contained in:
Takashi Kojo
2017-07-28 11:42:21 +09:00
committed by Jacob Barthelmeh
parent 8336e02931
commit 2f1f86d5f2

View File

@ -8939,9 +8939,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
}
#endif
if (ret != 0) {
int why = bad_certificate;
if (!ssl->options.verifyNone) {
int why = bad_certificate;
if (ret == ASN_AFTER_DATE_E || ret == ASN_BEFORE_DATE_E) {
why = certificate_expired;
}
@ -8984,11 +8983,12 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
}
#endif /* SESSION_CERTS */
}
if (ret != 0) {
SendAlert(ssl, alert_fatal, why); /* try to send */
ssl->options.isClosed = 1;
}
}
if (ret != 0) {
SendAlert(ssl, alert_fatal, why); /* try to send */
ssl->options.isClosed = 1;
}
ssl->error = ret;
}
#ifdef WOLFSSL_ALWAYS_VERIFY_CB