forked from wolfSSL/wolfssl
Merge pull request #2476 from dgarske/pkcb_tls13
Fix for TLS v1.3 and PK callbacks
This commit is contained in:
@ -3401,7 +3401,11 @@ static int DoTls13CertificateRequest(WOLFSSL* ssl, const byte* input,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ssl->buffers.certificate && ssl->buffers.certificate->buffer &&
|
if (ssl->buffers.certificate && ssl->buffers.certificate->buffer &&
|
||||||
ssl->buffers.key && ssl->buffers.key->buffer) {
|
((ssl->buffers.key && ssl->buffers.key->buffer)
|
||||||
|
#ifdef HAVE_PK_CALLBACKS
|
||||||
|
|| wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)
|
||||||
|
#endif
|
||||||
|
)) {
|
||||||
#ifndef WOLFSSL_TLS13_DRAFT_18
|
#ifndef WOLFSSL_TLS13_DRAFT_18
|
||||||
if (PickHashSigAlgo(ssl, peerSuites.hashSigAlgo,
|
if (PickHashSigAlgo(ssl, peerSuites.hashSigAlgo,
|
||||||
peerSuites.hashSigAlgoSz) != 0) {
|
peerSuites.hashSigAlgoSz) != 0) {
|
||||||
@ -3410,8 +3414,9 @@ static int DoTls13CertificateRequest(WOLFSSL* ssl, const byte* input,
|
|||||||
#endif
|
#endif
|
||||||
ssl->options.sendVerify = SEND_CERT;
|
ssl->options.sendVerify = SEND_CERT;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
ssl->options.sendVerify = SEND_BLANK_CERT;
|
ssl->options.sendVerify = SEND_BLANK_CERT;
|
||||||
|
}
|
||||||
|
|
||||||
/* This message is always encrypted so add encryption padding. */
|
/* This message is always encrypted so add encryption padding. */
|
||||||
*inOutIdx += ssl->keys.padSz;
|
*inOutIdx += ssl->keys.padSz;
|
||||||
|
Reference in New Issue
Block a user