Fix for Windows FIPS build in current master. Resolves issue with missing DES/AES key size enums.

This commit is contained in:
David Garske
2018-04-10 19:59:11 -07:00
parent 565f394972
commit 38aa56cc40
3 changed files with 19 additions and 19 deletions

View File

@ -1153,15 +1153,6 @@ enum Misc {
SESSION_FLUSH_COUNT = 256, /* Flush session cache unless user turns off */
#ifdef HAVE_FIPS
/* these moved into wolfCrypt, but kept here for backwards compatibility with FIPS */
DES_KEY_SIZE = 8, /* des */
DES3_KEY_SIZE = 24, /* 3 des ede */
DES_IV_SIZE = DES_BLOCK_SIZE,
AES_256_KEY_SIZE = 32, /* for 256 bit */
AES_192_KEY_SIZE = 24, /* for 192 bit */
AES_IV_SIZE = 16, /* always block size */
AES_128_KEY_SIZE = 16, /* for 128 bit */
MAX_SYM_KEY_SIZE = AES_256_KEY_SIZE,
#else
MAX_SYM_KEY_SIZE = WC_MAX_SYM_KEY_SIZE,

View File

@ -62,6 +62,16 @@
extern "C" {
#endif
/* these are required for FIPS and non-FIPS */
enum {
AES_128_KEY_SIZE = 16, /* for 128 bit */
AES_192_KEY_SIZE = 24, /* for 192 bit */
AES_256_KEY_SIZE = 32, /* for 256 bit */
AES_IV_SIZE = 16, /* always block size */
};
#ifndef HAVE_FIPS /* to avoid redefinition of structures */
#ifdef WOLFSSL_ASYNC_CRYPT
@ -74,13 +84,8 @@ enum {
AES_DECRYPTION = 1,
AES_BLOCK_SIZE = 16,
AES_IV_SIZE = AES_BLOCK_SIZE,
KEYWRAP_BLOCK_SIZE = 8,
AES_128_KEY_SIZE = 16, /* for 128 bit */
AES_192_KEY_SIZE = 24, /* for 192 bit */
AES_256_KEY_SIZE = 32, /* for 256 bit */
KEYWRAP_BLOCK_SIZE = 8,
};

View File

@ -39,6 +39,14 @@
extern "C" {
#endif
/* these are required for FIPS and non-FIPS */
enum {
DES_KEY_SIZE = 8, /* des */
DES3_KEY_SIZE = 24, /* 3 des ede */
DES_IV_SIZE = 16,
};
#ifndef HAVE_FIPS /* to avoid redefinition of macros */
#ifdef WOLFSSL_ASYNC_CRYPT
@ -52,10 +60,6 @@ enum {
DES_BLOCK_SIZE = 8,
DES_KS_SIZE = 32, /* internal DES key buffer size */
DES_KEY_SIZE = 8, /* des */
DES3_KEY_SIZE = 24, /* 3 des ede */
DES_IV_SIZE = DES_BLOCK_SIZE,
DES_ENCRYPTION = 0,
DES_DECRYPTION = 1
};