Fixes for key size detection when using PK callbacks (HSM) and no private key has been loaded (affects HAVE_PK_CALLBACKS on server side only when no dummy private key is loaded). Fix for possible leak during ECC min key size failure with small stack. Added new API wc_RsaPublicKeyDecode_ex for parsing an RSA public key for the modulus and exponent. Changed wolfSSL_CTX_SetTmpEC_DHE_Sz to support a size == 0 for using the long-term private key's size. Changed ECDHE_SIZE so it can be overridden and build-time. Added tests for wolfSSL_CTX_SetTmpEC_DHE_Sz and wolfSSL_SetTmpEC_DHE_Sz.
This commit is contained in:
@@ -1433,6 +1433,17 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
/* Use ECDHE key size that matches long term key.
|
||||
* Zero means use ctx->privateKeySz.
|
||||
* Default ECDHE_SIZE is 32 bytes
|
||||
*/
|
||||
if (wolfSSL_CTX_SetTmpEC_DHE_Sz(ctx, 0) != WOLFSSL_SUCCESS){
|
||||
err_sys_ex(runWithErrors, "Error setting ECDHE size");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (useAnon) {
|
||||
#ifdef HAVE_ANON
|
||||
wolfSSL_CTX_allow_anon_cipher(ctx);
|
||||
|
||||
Reference in New Issue
Block a user