mirror of https://github.com/wolfSSL/wolfssl.git
CURVE25519_MAX_KEY_TO_DER_SZ: refactor to macro like other CURVE25519_ constants, and add FIPS clause in curve255519_der_test() to accommodate FIPS v6.
parent
9106d1275f
commit
2ec8e72579
|
@ -35648,7 +35648,11 @@ static wc_test_ret_t curve255519_der_test(void)
|
||||||
0xA2, 0x5B, 0x38, 0xFD, 0x96, 0xDB, 0x2A, 0x26
|
0xA2, 0x5B, 0x38, 0xFD, 0x96, 0xDB, 0x2A, 0x26
|
||||||
};
|
};
|
||||||
curve25519_key key;
|
curve25519_key key;
|
||||||
|
#if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(7,0,0)
|
||||||
byte output[CURVE25519_MAX_KEY_TO_DER_SZ];
|
byte output[CURVE25519_MAX_KEY_TO_DER_SZ];
|
||||||
|
#else
|
||||||
|
byte output[128];
|
||||||
|
#endif
|
||||||
word32 outputSz = (word32)sizeof(output);
|
word32 outputSz = (word32)sizeof(output);
|
||||||
word32 idx;
|
word32 idx;
|
||||||
|
|
||||||
|
|
|
@ -44,12 +44,7 @@
|
||||||
|
|
||||||
#define CURVE25519_KEYSIZE 32
|
#define CURVE25519_KEYSIZE 32
|
||||||
#define CURVE25519_PUB_KEY_SIZE 32
|
#define CURVE25519_PUB_KEY_SIZE 32
|
||||||
|
#define CURVE25519_MAX_KEY_TO_DER_SZ 82 /* for exported DER keys temp buffer */
|
||||||
enum {
|
|
||||||
CURVE25519_MAX_KEY_TO_DER_SZ = 82, /* for exported DER keys temp buffer */
|
|
||||||
|
|
||||||
WOLF_ENUM_DUMMY_LAST_ELEMENT(CURVE25519)
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef WOLFSSL_NAMES_STATIC
|
#ifdef WOLFSSL_NAMES_STATIC
|
||||||
typedef char curve25519_str[12];
|
typedef char curve25519_str[12];
|
||||||
|
|
Loading…
Reference in New Issue