Skip to content

Commit eca0318

Browse files
committed
Rename to MAX_KEY_TO_DER_SZ, set to 130. Remove Curve448 changes.
1 parent e2a7f40 commit eca0318

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

tests/api/test_curve448.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ int test_wc_Curve448PrivateKeyToDer(void)
347347
EXPECT_DECLS;
348348
#if defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_EXPORT) && \
349349
(defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN))
350-
byte output[CURVE448_BUFSIZE];
350+
byte output[ONEK_BUF];
351351
curve448_key curve448PrivKey;
352352
WC_RNG rng;
353353
word32 inLen;

wolfcrypt/test/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35544,7 +35544,7 @@ static wc_test_ret_t curve255519_der_test(void)
3554435544
0xA2, 0x5B, 0x38, 0xFD, 0x96, 0xDB, 0x2A, 0x26
3554535545
};
3554635546
curve25519_key key;
35547-
byte output[CURVE25519_BUFSIZE];
35547+
byte output[CURVE25519_MAX_KEY_TO_DER_SZ];
3554835548
word32 outputSz = (word32)sizeof(output);
3554935549
word32 idx;
3555035550

wolfssl/wolfcrypt/curve25519.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#define CURVE25519_PUB_KEY_SIZE 32
4747

4848
enum {
49-
CURVE25519_BUFSIZE = 128, /* for exported DER keys temp buffer */
49+
CURVE25519_MAX_KEY_TO_DER_SZ = 82, /* for exported DER keys temp buffer */
5050

5151
WOLF_ENUM_DUMMY_LAST_ELEMENT(CURVE25519)
5252
};

wolfssl/wolfcrypt/curve448.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@
4343
#define CURVE448_KEY_SIZE 56
4444
#define CURVE448_PUB_KEY_SIZE 56
4545

46-
enum {
47-
CURVE448_BUFSIZE = 256, /* for DER exported keys temp buffer */
48-
49-
WOLF_ENUM_DUMMY_LAST_ELEMENT(CURVE448)
50-
};
51-
5246
#ifndef WC_CURVE448KEY_TYPE_DEFINED
5347
typedef struct curve448_key curve448_key;
5448
#define WC_CURVE448KEY_TYPE_DEFINED

0 commit comments

Comments
 (0)