Ignore:
Timestamp:
Jun 22, 2021, 9:00:19 PM (3 years ago)
Author:
coas-nagasima
Message:

WolfSSLとAzure IoT SDKを更新

Location:
azure_iot_hub_f767zi/trunk/wolfssl-4.7.0
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/wolfssl/wolfcrypt/wc_encrypt.h

    r457 r464  
    2929
    3030#include <wolfssl/wolfcrypt/types.h>
    31 #include <wolfssl/wolfcrypt/aes.h>
    32 #include <wolfssl/wolfcrypt/chacha.h>
    33 #include <wolfssl/wolfcrypt/des3.h>
    34 #include <wolfssl/wolfcrypt/arc4.h>
     31#ifndef NO_AES
     32    #include <wolfssl/wolfcrypt/aes.h>
     33#endif
     34#ifdef HAVE_CHACHA
     35    #include <wolfssl/wolfcrypt/chacha.h>
     36#endif
     37#ifndef NO_DES3
     38    #include <wolfssl/wolfcrypt/des3.h>
     39#endif
     40#ifndef NO_RC4
     41    #include <wolfssl/wolfcrypt/arc4.h>
     42#endif
    3543
    3644#ifdef __cplusplus
     
    3846#endif
    3947
    40 /* determine max cipher key size */
     48/* determine max cipher key size - cannot use enum values here, must be define,
     49 * since WC_MAX_SYM_KEY_SIZE is used in if macro logic. */
    4150#ifndef NO_AES
    4251    #define WC_MAX_SYM_KEY_SIZE     (AES_MAX_KEY_SIZE/8)
    4352#elif defined(HAVE_CHACHA)
    44     #define WC_MAX_SYM_KEY_SIZE     CHACHA_MAX_KEY_SZ
     53    #define WC_MAX_SYM_KEY_SIZE     32 /* CHACHA_MAX_KEY_SZ */
    4554#elif !defined(NO_DES3)
    46     #define WC_MAX_SYM_KEY_SIZE     DES3_KEY_SIZE
     55    #define WC_MAX_SYM_KEY_SIZE     24 /* DES3_KEY_SIZE */
    4756#elif !defined(NO_RC4)
    48     #define WC_MAX_SYM_KEY_SIZE     RC4_KEY_SIZE
     57    #define WC_MAX_SYM_KEY_SIZE     16 /* RC4_KEY_SIZE */
    4958#else
    5059    #define WC_MAX_SYM_KEY_SIZE     32
     60#endif
     61
     62
     63#if (defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \
     64     (HAVE_FIPS_VERSION <= 2)) || (defined(HAVE_SELFTEST) && \
     65     (!defined(HAVE_SELFTEST_VERSION) || (HAVE_SELFTEST_VERSION < 2)))
     66    /* In FIPS cert 3389 and CAVP selftest v1 build, these enums are
     67     * not in aes.h. Define them here outside the fips boundary.
     68     */
     69    #ifndef GCM_NONCE_MID_SZ
     70        /* The usual default nonce size for AES-GCM. */
     71        #define GCM_NONCE_MID_SZ 12
     72    #endif
     73    #ifndef CCM_NONCE_MIN_SZ
     74        #define CCM_NONCE_MIN_SZ 7
     75    #endif
    5176#endif
    5277
Note: See TracChangeset for help on using the changeset viewer.