mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Fix DecodePrivateKey to return NOT_COMPILED_IN with PKCS#11
This commit is contained in:
@ -17016,6 +17016,8 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
|
||||
/* Return the maximum signature length. */
|
||||
*length = (word16)wc_ecc_sig_size_calc(ssl->buffers.keySz);
|
||||
}
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
else if (ssl->buffers.keyType == ecc_dsa_sa_algo) {
|
||||
@ -17032,6 +17034,8 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
|
||||
/* Return the maximum signature length. */
|
||||
*length = (word16)wc_ecc_sig_size_calc(ssl->buffers.keySz);
|
||||
}
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
goto exit_dpk;
|
||||
|
@ -11168,7 +11168,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
||||
|
||||
FreeDer(&ctx->privateKey);
|
||||
if (AllocDer(&ctx->privateKey, (word32)sz, PRIVATEKEY_TYPE,
|
||||
ctx->heap) == 0) {
|
||||
ctx->heap) == 0) {
|
||||
XMEMCPY(ctx->privateKey->buffer, id, sz);
|
||||
ctx->privateKeyId = 1;
|
||||
ctx->privateKeySz = (word32)keySz;
|
||||
|
Reference in New Issue
Block a user