Skip to content

Commit

Permalink
Merge pull request wolfSSL#694 from JacobBarthelmeh/544
Browse files Browse the repository at this point in the history
Key completion callback
  • Loading branch information
ejohnstown authored and jefferyq2 committed Oct 29, 2024
1 parent 0130b65 commit e5528bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3673,6 +3673,7 @@ static INLINE byte KeySzForId(byte id)
}

enum wc_HashType HashForId(byte id)
INLINE enum wc_HashType HashForId(byte id)
{
switch (id) {

Expand Down Expand Up @@ -5677,6 +5678,15 @@ static int DoKexDhReply(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
* length which is at LENGTH_SZ offset ahead of pubKey. */
ret = HashUpdate(hash, hashId,
pubKey - LENGTH_SZ, pubKeySz + LENGTH_SZ);
ssh->rxCount = 0;
ssh->highwaterFlag = 0;
ssh->isKeying = 0;
HandshakeInfoFree(ssh->handshake, ssh->ctx->heap);
ssh->handshake = NULL;
WLOG(WS_LOG_DEBUG, "Keying completed");

if (ssh->ctx->keyingCompletionCb)
ssh->ctx->keyingCompletionCb(ssh->keyingCompletionCtx);
}

if (ret == WS_SUCCESS)
Expand Down
1 change: 1 addition & 0 deletions src/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2995,6 +2995,7 @@ size_t wolfSSH_GetText(WOLFSSH *ssh, WS_Text id, char *str, size_t strSz)
#ifndef WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256
case ID_ECDH_NISTP256_KYBER_LEVEL1_SHA256:
ret = WSNPRINTF(str, strSz, "%s", "ECDH-KYBER512");
ret = WSNPRINTF(str, strSz, "%s", "Kyber1");
break;
#endif

Expand Down

0 comments on commit e5528bd

Please sign in to comment.