@@ -2364,19 +2364,25 @@ int test_wolfSSL_EVP_PKEY_ed25519(void)
23642364 WOLFSSL_EVP_PKEY * pkey = NULL ;
23652365 const unsigned char * p ;
23662366
2367+ /* Known-valid Ed25519 public key matching server_ed25519_key. The bytes
2368+ * are the raw 32-byte BIT STRING contents from
2369+ * ./certs/ed25519/server-ed25519-key.der so the import succeeds even
2370+ * under strict point-validation. */
23672371 static const unsigned char rawPub [32 ] = {
2368- 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
2369- 0x08 , 0x09 , 0x0a , 0x0b , 0x0c , 0x0d , 0x0e , 0x0f ,
2370- 0x10 , 0x11 , 0x12 , 0x13 , 0x14 , 0x15 , 0x16 , 0x17 ,
2371- 0x18 , 0x19 , 0x1a , 0x1b , 0x1c , 0x1d , 0x1e , 0x1f
2372+ 0x23 , 0xaa , 0x4d , 0x60 , 0x50 , 0xe0 , 0x13 , 0xd3 ,
2373+ 0x3a , 0xed , 0xab , 0xf6 , 0xa9 , 0xcc , 0x4a , 0xfe ,
2374+ 0xd7 , 0x4d , 0x2f , 0xd2 , 0x5b , 0x1a , 0x10 , 0x05 ,
2375+ 0xef , 0x5a , 0x41 , 0x25 , 0xce , 0x1b , 0x53 , 0x78
23722376 };
23732377
2378+ /* SPKI wrapper around the same known-valid public key (the full
2379+ * contents of ./certs/ed25519/server-ed25519-key.der). */
23742380 static const unsigned char spkiPub [] = {
23752381 0x30 , 0x2a , 0x30 , 0x05 , 0x06 , 0x03 , 0x2b , 0x65 , 0x70 , 0x03 , 0x21 , 0x00 ,
2376- 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
2377- 0x08 , 0x09 , 0x0a , 0x0b , 0x0c , 0x0d , 0x0e , 0x0f ,
2378- 0x10 , 0x11 , 0x12 , 0x13 , 0x14 , 0x15 , 0x16 , 0x17 ,
2379- 0x18 , 0x19 , 0x1a , 0x1b , 0x1c , 0x1d , 0x1e , 0x1f
2382+ 0x23 , 0xaa , 0x4d , 0x60 , 0x50 , 0xe0 , 0x13 , 0xd3 ,
2383+ 0x3a , 0xed , 0xab , 0xf6 , 0xa9 , 0xcc , 0x4a , 0xfe ,
2384+ 0xd7 , 0x4d , 0x2f , 0xd2 , 0x5b , 0x1a , 0x10 , 0x05 ,
2385+ 0xef , 0x5a , 0x41 , 0x25 , 0xce , 0x1b , 0x53 , 0x78
23802386 };
23812387
23822388 /* Exercise the WC_EVP_PKEY_ED25519 case in d2i_evp_pkey()
@@ -2448,28 +2454,33 @@ int test_wolfSSL_EVP_PKEY_ed448(void)
24482454#if defined(OPENSSL_EXTRA ) && defined(HAVE_ED448 )
24492455 WOLFSSL_EVP_PKEY * pkey = NULL ;
24502456 const unsigned char * p ;
2451- /* 57 arbitrary bytes used as a "raw Ed448 public key". */
2457+
2458+ /* Known-valid Ed448 public key: the raw 57-byte BIT STRING contents
2459+ * from ./certs/ed448/server-ed448-key.der so the import succeeds even
2460+ * under strict point-validation. */
24522461 static const unsigned char rawPub [57 ] = {
2453- 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
2454- 0x08 , 0x09 , 0x0a , 0x0b , 0x0c , 0x0d , 0x0e , 0x0f ,
2455- 0x10 , 0x11 , 0x12 , 0x13 , 0x14 , 0x15 , 0x16 , 0x17 ,
2456- 0x18 , 0x19 , 0x1a , 0x1b , 0x1c , 0x1d , 0x1e , 0x1f ,
2457- 0x20 , 0x21 , 0x22 , 0x23 , 0x24 , 0x25 , 0x26 , 0x27 ,
2458- 0x28 , 0x29 , 0x2a , 0x2b , 0x2c , 0x2d , 0x2e , 0x2f ,
2459- 0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 ,
2460- 0x38
2462+ 0x54 , 0x81 , 0x39 , 0x01 , 0xeb , 0x37 , 0xd9 , 0xa9 ,
2463+ 0x07 , 0xcd , 0x01 , 0xbc , 0x9d , 0x70 , 0x16 , 0xc2 ,
2464+ 0x2c , 0x2b , 0x75 , 0x5b , 0x63 , 0xdb , 0xee , 0x3a ,
2465+ 0x2d , 0x44 , 0x92 , 0x46 , 0xb4 , 0x7b , 0x07 , 0x03 ,
2466+ 0x4f , 0xa2 , 0xae , 0x86 , 0x86 , 0xdc , 0x8b , 0x4b ,
2467+ 0x2c , 0x7f , 0xe8 , 0x6b , 0x14 , 0x8d , 0x58 , 0xdd ,
2468+ 0x6d , 0xe7 , 0x6f , 0x3a , 0x05 , 0x95 , 0xa8 , 0xef ,
2469+ 0x00
24612470 };
24622471
2472+ /* SPKI wrapper around the same known-valid public key (the full
2473+ * contents of ./certs/ed448/server-ed448-key.der). */
24632474 static const unsigned char spkiPub [] = {
24642475 0x30 , 0x43 , 0x30 , 0x05 , 0x06 , 0x03 , 0x2b , 0x65 , 0x71 , 0x03 , 0x3a , 0x00 ,
2465- 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
2466- 0x08 , 0x09 , 0x0a , 0x0b , 0x0c , 0x0d , 0x0e , 0x0f ,
2467- 0x10 , 0x11 , 0x12 , 0x13 , 0x14 , 0x15 , 0x16 , 0x17 ,
2468- 0x18 , 0x19 , 0x1a , 0x1b , 0x1c , 0x1d , 0x1e , 0x1f ,
2469- 0x20 , 0x21 , 0x22 , 0x23 , 0x24 , 0x25 , 0x26 , 0x27 ,
2470- 0x28 , 0x29 , 0x2a , 0x2b , 0x2c , 0x2d , 0x2e , 0x2f ,
2471- 0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 ,
2472- 0x38
2476+ 0x54 , 0x81 , 0x39 , 0x01 , 0xeb , 0x37 , 0xd9 , 0xa9 ,
2477+ 0x07 , 0xcd , 0x01 , 0xbc , 0x9d , 0x70 , 0x16 , 0xc2 ,
2478+ 0x2c , 0x2b , 0x75 , 0x5b , 0x63 , 0xdb , 0xee , 0x3a ,
2479+ 0x2d , 0x44 , 0x92 , 0x46 , 0xb4 , 0x7b , 0x07 , 0x03 ,
2480+ 0x4f , 0xa2 , 0xae , 0x86 , 0x86 , 0xdc , 0x8b , 0x4b ,
2481+ 0x2c , 0x7f , 0xe8 , 0x6b , 0x14 , 0x8d , 0x58 , 0xdd ,
2482+ 0x6d , 0xe7 , 0x6f , 0x3a , 0x05 , 0x95 , 0xa8 , 0xef ,
2483+ 0x00
24732484 };
24742485
24752486 /* SPKI path. */
0 commit comments