forked from wolfSSL/wolfssl
Merge pull request #8651 from billphipps/fix_curve25519_enums
Update to expose reasonable DER buffer sizes for Curve25519
This commit is contained in:
@@ -35648,8 +35648,8 @@ 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;
|
||||||
byte output[128];
|
byte output[CURVE25519_MAX_KEY_TO_DER_SZ];
|
||||||
word32 outputSz = 128;
|
word32 outputSz = (word32)sizeof(output);
|
||||||
word32 idx;
|
word32 idx;
|
||||||
|
|
||||||
ret = wc_curve25519_init_ex(&key, HEAP_HINT, devId);
|
ret = wc_curve25519_init_ex(&key, HEAP_HINT, devId);
|
||||||
|
@@ -45,6 +45,12 @@
|
|||||||
#define CURVE25519_KEYSIZE 32
|
#define CURVE25519_KEYSIZE 32
|
||||||
#define CURVE25519_PUB_KEY_SIZE 32
|
#define CURVE25519_PUB_KEY_SIZE 32
|
||||||
|
|
||||||
|
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];
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user