mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #5572 from tim-weller-wolfssl/zd14615-config-updates
Configuration consistency fixes for RSA keys and way to force disable of private keys
This commit is contained in:
@ -6309,14 +6309,16 @@ static int DecodeRsaPssParams(const byte* params, word32 sz,
|
|||||||
size_t rsaIntOffset[] = {
|
size_t rsaIntOffset[] = {
|
||||||
OFFSETOF(RsaKey, n),
|
OFFSETOF(RsaKey, n),
|
||||||
OFFSETOF(RsaKey, e),
|
OFFSETOF(RsaKey, e),
|
||||||
#if !defined(WOLFSSL_RSA_PUBLIC_ONLY) || defined(WOLFSSL_KEY_GEN)
|
#ifndef WOLFSSL_RSA_PUBLIC_ONLY
|
||||||
OFFSETOF(RsaKey, d),
|
OFFSETOF(RsaKey, d),
|
||||||
OFFSETOF(RsaKey, p),
|
OFFSETOF(RsaKey, p),
|
||||||
OFFSETOF(RsaKey, q),
|
OFFSETOF(RsaKey, q),
|
||||||
|
#if defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA) || !defined(RSA_LOW_MEM)
|
||||||
OFFSETOF(RsaKey, dP),
|
OFFSETOF(RsaKey, dP),
|
||||||
OFFSETOF(RsaKey, dQ),
|
OFFSETOF(RsaKey, dQ),
|
||||||
OFFSETOF(RsaKey, u)
|
OFFSETOF(RsaKey, u)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Get a number from the RSA key based on an index.
|
/* Get a number from the RSA key based on an index.
|
||||||
|
@ -878,7 +878,13 @@ enum Misc_ASN {
|
|||||||
#else
|
#else
|
||||||
KEYID_SIZE = WC_SHA_DIGEST_SIZE,
|
KEYID_SIZE = WC_SHA_DIGEST_SIZE,
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(WOLFSSL_RSA_PUBLIC_ONLY) && (defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA) || !defined(RSA_LOW_MEM))
|
||||||
RSA_INTS = 8, /* RSA ints in private key */
|
RSA_INTS = 8, /* RSA ints in private key */
|
||||||
|
#elif !defined(WOLFSSL_RSA_PUBLIC_ONLY)
|
||||||
|
RSA_INTS = 5, /* RSA ints in private key */
|
||||||
|
#else
|
||||||
|
RSA_INTS = 2, /* RSA ints in private key */
|
||||||
|
#endif
|
||||||
DSA_PARAM_INTS = 3, /* DSA paramater ints */
|
DSA_PARAM_INTS = 3, /* DSA paramater ints */
|
||||||
RSA_PUB_INTS = 2, /* RSA ints in public key */
|
RSA_PUB_INTS = 2, /* RSA ints in public key */
|
||||||
DSA_PUB_INTS = 4, /* DSA ints in public key */
|
DSA_PUB_INTS = 4, /* DSA ints in public key */
|
||||||
|
@ -2752,15 +2752,14 @@ extern void uITRON4_free(void *p) ;
|
|||||||
|
|
||||||
/* Are we using an external private key store like:
|
/* Are we using an external private key store like:
|
||||||
* PKCS11 / HSM / crypto callback / PK callback */
|
* PKCS11 / HSM / crypto callback / PK callback */
|
||||||
#if !defined(WOLF_PRIVATE_KEY_ID) && \
|
#if !defined(WOLF_PRIVATE_KEY_ID) && !defined(NO_WOLF_PRIVATE_KEY_ID) && \
|
||||||
(defined(HAVE_PKCS11) || defined(HAVE_PK_CALLBACKS) || \
|
(defined(HAVE_PKCS11) || defined(HAVE_PK_CALLBACKS) || \
|
||||||
defined(WOLF_CRYPTO_CB) || defined(WOLFSSL_KCAPI))
|
defined(WOLF_CRYPTO_CB) || defined(WOLFSSL_KCAPI))
|
||||||
/* Enables support for using wolfSSL_CTX_use_PrivateKey_Id and
|
/* Enables support for using wolfSSL_CTX_use_PrivateKey_Id and
|
||||||
* wolfSSL_CTX_use_PrivateKey_Label */
|
* wolfSSL_CTX_use_PrivateKey_Label */
|
||||||
#define WOLF_PRIVATE_KEY_ID
|
#define WOLF_PRIVATE_KEY_ID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* With titan cache size there is too many sessions to fit with the default
|
/* With titan cache size there is too many sessions to fit with the default
|
||||||
* multiplier of 8 */
|
* multiplier of 8 */
|
||||||
#if defined(TITAN_SESSION_CACHE) && !defined(NO_SESSION_CACHE_REF)
|
#if defined(TITAN_SESSION_CACHE) && !defined(NO_SESSION_CACHE_REF)
|
||||||
|
Reference in New Issue
Block a user