Fix for static RSA cipher suite (AES128-GCM-SHA256) with PK callbacks and no private key set. ZD 5092
This commit is contained in:
parent
651087ab5a
commit
fd50248139
@ -17030,6 +17030,15 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
|
||||
int keySz;
|
||||
word32 idx;
|
||||
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
/* allow no private key if using PK callbacks and CB is set */
|
||||
if (wolfSSL_CTX_IsPrivatePkSet(ssl->ctx)) {
|
||||
*length = GetPrivateKeySigSize(ssl);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
/* make sure private key exists */
|
||||
if (ssl->buffers.key == NULL || ssl->buffers.key->buffer == NULL) {
|
||||
WOLFSSL_MSG("Private key missing!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user