Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ static const char cannedKexAlgoNames[] =
#endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256
"curve25519-sha256,"
"[email protected],"
#endif
#if !defined(WOLFSSH_NO_ECDH_SHA2_NISTP521)
"ecdh-sha2-nistp521,"
Expand Down Expand Up @@ -2492,6 +2493,7 @@ static const NameIdPair NameIdMap[] = {
#ifndef WOLFSSH_NO_CURVE25519_SHA256
/* See RFC 8731 */
{ ID_CURVE25519_SHA256, TYPE_KEX, "curve25519-sha256" },
{ ID_CURVE25519_SHA256_LIBSSH, TYPE_KEX, "[email protected]" },
#endif
{ ID_EXTINFO_S, TYPE_OTHER, "ext-info-s" },
{ ID_EXTINFO_C, TYPE_OTHER, "ext-info-c" },
Expand Down Expand Up @@ -3750,6 +3752,7 @@ enum wc_HashType HashForId(byte id)
#endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256
case ID_CURVE25519_SHA256:
case ID_CURVE25519_SHA256_LIBSSH:
return WC_HASH_TYPE_SHA256;
#endif
#ifndef WOLFSSH_NO_RSA_SHA2_256
Expand Down Expand Up @@ -3827,6 +3830,7 @@ int wcPrimeForId(byte id)
#endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256
case ID_CURVE25519_SHA256:
case ID_CURVE25519_SHA256_LIBSSH:
return ECC_X25519;
#endif
#ifndef WOLFSSH_NO_ECDH_SHA2_NISTP521
Expand Down Expand Up @@ -11953,6 +11957,7 @@ int SendKexDhReply(WOLFSSH* ssh)
#endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256
case ID_CURVE25519_SHA256:
case ID_CURVE25519_SHA256_LIBSSH:
useCurve25519 = 1;
msgId = MSGID_KEXDH_REPLY;
break;
Expand Down Expand Up @@ -12535,6 +12540,7 @@ int SendKexDhInit(WOLFSSH* ssh)
#endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256
case ID_CURVE25519_SHA256:
case ID_CURVE25519_SHA256_LIBSSH:
ssh->handshake->useCurve25519 = 1;
msgId = MSGID_KEXECDH_INIT;
break;
Expand Down
3 changes: 1 addition & 2 deletions src/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -3027,10 +3027,9 @@ size_t wolfSSH_GetText(WOLFSSH *ssh, WS_Text id, char *str, size_t strSz)
case ID_ECDH_SHA2_NISTP256:
case ID_ECDH_SHA2_NISTP384:
case ID_ECDH_SHA2_NISTP521:
case ID_ECDH_SHA2_ED25519:
case ID_ECDH_SHA2_ED25519_LIBSSH:
#ifndef WOLFSSH_NO_CURVE25519_SHA256
case ID_CURVE25519_SHA256:
case ID_CURVE25519_SHA256_LIBSSH:
#endif
ret = WSNPRINTF(str, strSz, "%s", "ECDH");
break;
Expand Down
3 changes: 1 addition & 2 deletions wolfssh/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,12 @@ enum {
ID_ECDH_SHA2_NISTP256,
ID_ECDH_SHA2_NISTP384,
ID_ECDH_SHA2_NISTP521,
ID_ECDH_SHA2_ED25519,
ID_ECDH_SHA2_ED25519_LIBSSH,
#ifndef WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256
ID_ECDH_NISTP256_KYBER_LEVEL1_SHA256,
#endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256
ID_CURVE25519_SHA256,
ID_CURVE25519_SHA256_LIBSSH,
#endif
ID_EXTINFO_S, /* Pseudo-KEX to indicate server extensions. */
ID_EXTINFO_C, /* Pseudo-KEX to indicate client extensions. */
Expand Down