Merge pull request #6117 from SparkiDev/priv_key_id_fix

Private Key ID: change to always set priv key type and size
This commit is contained in:
David Garske 2023-02-21 19:23:51 -08:00 committed by GitHub
commit 74bad76707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7673,11 +7673,11 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
}
#ifdef WOLF_PRIVATE_KEY_ID
if (ssl != NULL && ssl->buffers.keyType == 0) {
if (ssl != NULL) {
ssl->buffers.keyType = keyType;
ssl->buffers.keySz = keySz;
}
else if (ctx != NULL && ctx->privateKeyType == 0) {
else if (ctx != NULL) {
ctx->privateKeyType = keyType;
ctx->privateKeySz = keySz;
}