mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +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");
|
||||
|
||||
if (rsa == NULL || rsa->internal == NULL ||
|
||||
bits < RSA_MIN_SIZE || bits > RSA_MAX_SIZE) {
|
||||
if (rsa == NULL || rsa->internal == NULL) {
|
||||
/* bit size checked during make key call */
|
||||
WOLFSSL_MSG("bad arguments");
|
||||
return SSL_FAILURE;
|
||||
}
|
||||
|
@@ -144,6 +144,22 @@ int wc_RsaFlattenPublicKey(RsaKey* key, byte* a, word32* aSz, byte* b,
|
||||
word32 outLen, RsaKey* key);
|
||||
#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)
|
||||
{
|
||||
#ifdef HAVE_CAVIUM
|
||||
|
@@ -47,19 +47,6 @@
|
||||
enum {
|
||||
RSA_PUBLIC = 0,
|
||||
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