@@ -2721,6 +2721,7 @@ static int DoKexDhInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
27212721 && ssh -> handshake -> kexIdGuess != ssh -> handshake -> kexId ) {
27222722
27232723 /* skip this message. */
2724+ WLOG (WS_LOG_DEBUG , "Skipping the client's KEX init function." );
27242725 ssh -> handshake -> kexPacketFollows = 0 ;
27252726 * idx += len ;
27262727 return WS_SUCCESS ;
@@ -6936,7 +6937,8 @@ int SendKexDhReply(WOLFSSH* ssh)
69366937 ret = WS_CRYPTO_FAILED ;
69376938 }
69386939 else {
6939- WLOG (WS_LOG_INFO , "Signing hash with RSA." );
6940+ WLOG (WS_LOG_INFO , "Signing hash with %s." ,
6941+ IdToName (ssh -> handshake -> pubKeyId ));
69406942 sigSz = wc_RsaSSL_Sign (encSig , encSigSz , sig , sizeof (sig ),
69416943 & sigKeyBlock .sk .rsa .key , ssh -> rng );
69426944 if (sigSz <= 0 ) {
@@ -6948,7 +6950,8 @@ int SendKexDhReply(WOLFSSH* ssh)
69486950 }
69496951 else {
69506952#ifndef WOLFSSH_NO_ECDSA
6951- WLOG (WS_LOG_INFO , "Signing hash with ECDSA." );
6953+ WLOG (WS_LOG_INFO , "Signing hash with %s." ,
6954+ IdToName (ssh -> handshake -> pubKeyId ));
69526955 sigSz = sizeof (sig );
69536956 ret = wc_ecc_sign_hash (digest , wc_HashGetDigestSize (sigHashId ),
69546957 sig , & sigSz ,
@@ -8360,8 +8363,9 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authId, int addSig)
83608363
83618364 if (authId == ID_USERAUTH_PASSWORD )
83628365 ret = PrepareUserAuthRequestPassword (ssh , & payloadSz , & authData );
8363- else if (authId == ID_USERAUTH_PUBLICKEY ) {
8366+ else if (authId == ID_USERAUTH_PUBLICKEY && ! ssh -> userAuthPkDone ) {
83648367 authData .sf .publicKey .hasSignature = 1 ;
8368+ ssh -> userAuthPkDone = 1 ;
83658369 ret = PrepareUserAuthRequestPublicKey (ssh , & payloadSz , & authData ,
83668370 & keySig );
83678371 }
0 commit comments