mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
put rsa non public enums back into c file for FIPS
This commit is contained in:
@@ -12514,8 +12514,8 @@ int wolfSSL_RSA_generate_key_ex(WOLFSSL_RSA* rsa, int bits, WOLFSSL_BIGNUM* bn,
|
|||||||
|
|
||||||
WOLFSSL_ENTER("wolfSSL_RSA_generate_key_ex");
|
WOLFSSL_ENTER("wolfSSL_RSA_generate_key_ex");
|
||||||
|
|
||||||
if (rsa == NULL || rsa->internal == NULL ||
|
if (rsa == NULL || rsa->internal == NULL) {
|
||||||
bits < RSA_MIN_SIZE || bits > RSA_MAX_SIZE) {
|
/* bit size checked during make key call */
|
||||||
WOLFSSL_MSG("bad arguments");
|
WOLFSSL_MSG("bad arguments");
|
||||||
return SSL_FAILURE;
|
return SSL_FAILURE;
|
||||||
}
|
}
|
||||||
|
@@ -144,6 +144,22 @@ int wc_RsaFlattenPublicKey(RsaKey* key, byte* a, word32* aSz, byte* b,
|
|||||||
word32 outLen, RsaKey* key);
|
word32 outLen, RsaKey* key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
enum {
|
||||||
|
RSA_PUBLIC_ENCRYPT = 0,
|
||||||
|
RSA_PUBLIC_DECRYPT = 1,
|
||||||
|
RSA_PRIVATE_ENCRYPT = 2,
|
||||||
|
RSA_PRIVATE_DECRYPT = 3,
|
||||||
|
|
||||||
|
RSA_BLOCK_TYPE_1 = 1,
|
||||||
|
RSA_BLOCK_TYPE_2 = 2,
|
||||||
|
|
||||||
|
RSA_MIN_SIZE = 512,
|
||||||
|
RSA_MAX_SIZE = 4096,
|
||||||
|
|
||||||
|
RSA_MIN_PAD_SZ = 11 /* seperator + 0 + pad value + 8 pads */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
int wc_InitRsaKey(RsaKey* key, void* heap)
|
int wc_InitRsaKey(RsaKey* key, void* heap)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CAVIUM
|
#ifdef HAVE_CAVIUM
|
||||||
|
@@ -47,19 +47,6 @@
|
|||||||
enum {
|
enum {
|
||||||
RSA_PUBLIC = 0,
|
RSA_PUBLIC = 0,
|
||||||
RSA_PRIVATE = 1,
|
RSA_PRIVATE = 1,
|
||||||
|
|
||||||
RSA_PUBLIC_ENCRYPT = 0,
|
|
||||||
RSA_PUBLIC_DECRYPT = 1,
|
|
||||||
RSA_PRIVATE_ENCRYPT = 2,
|
|
||||||
RSA_PRIVATE_DECRYPT = 3,
|
|
||||||
|
|
||||||
RSA_BLOCK_TYPE_1 = 1,
|
|
||||||
RSA_BLOCK_TYPE_2 = 2,
|
|
||||||
|
|
||||||
RSA_MIN_SIZE = 512,
|
|
||||||
RSA_MAX_SIZE = 4096,
|
|
||||||
|
|
||||||
RSA_MIN_PAD_SZ = 11 /* seperator + 0 + pad value + 8 pads */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user