Skip to content

Commit 738bf12

Browse files
committed
Add support for x448.
1 parent 997956a commit 738bf12

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

examples/middlebox/decrypt.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ static int myKeyCb(void* vSniffer, int namedGroup,
8181
#ifdef HAVE_CURVE25519
8282
static EtsKey keyX25519;
8383
#endif
84+
#ifdef HAVE_CURVE448
85+
static EtsKey keyX448;
86+
#endif
8487

8588
/* lookup based on key type */
8689
keyType = wolfEtsGetPkType(namedGroup);
@@ -101,7 +104,10 @@ static int myKeyCb(void* vSniffer, int namedGroup,
101104
#endif
102105
break;
103106
case WC_PK_TYPE_CURVE448:
104-
/* curve448 not yet supported in sniffer */
107+
#ifdef HAVE_CURVE448
108+
key = &keyX448;
109+
#endif
110+
break;
105111
default:
106112
/* not supported */
107113
key = NULL;

src/mod_tls.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ static int wolfTlsInitSslDefaults(WOLFSSL_CTX* ctx, WOLFSSL** ssl)
233233
wolfSSL_SetIOReadCtx(tssl, cbCtx);
234234
wolfSSL_SetIOWriteCtx(tssl, cbCtx);
235235

236+
#if 0
237+
/* example for forcing a key share type (see ssl.h Named Groups enum) */
238+
wolfSSL_UseKeyShare(tssl, WOLFSSL_ECC_X448);
239+
#endif
240+
236241
*ssl = tssl;
237242
}
238243
return 0;

0 commit comments

Comments
 (0)