diff --git a/examples/server/server.c b/examples/server/server.c index 9aecae2..289b714 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -34,6 +34,9 @@ #include #include #include +#ifndef SO_NOSIGPIPE + #include +#endif typedef int SOCKET_T; diff --git a/src/internal.c b/src/internal.c index c39ab46..5f7ad6d 100644 --- a/src/internal.c +++ b/src/internal.c @@ -527,8 +527,9 @@ static int DoNameList(uint8_t* idList, uint32_t* idListSz, id = NameToId((char*)name, nameSz); { const char* displayName = IdToName(id); - if (displayName) + if (displayName) { WLOG(WS_LOG_DEBUG, "DNL: name ID = %s", displayName); + } } if (id != ID_UNKNOWN) idList[idListIdx++] = id; @@ -1295,6 +1296,8 @@ int SendKexDhReply(WOLFSSH* ssh) /* Hash in the server's RSA key. */ InitRsaKey(&rsaKey, ssh->ctx->heap); ret = RsaPrivateKeyDecode(ssh->ctx->privateKey, &scratch, &rsaKey, (int)ssh->ctx->privateKeySz); + if (ret < 0) + return ret; RsaFlattenPublicKey(&rsaKey, rsaE, &rsaESz, rsaN, &rsaNSz); if (rsaE[0] & 0x80) rsaEPad = 1; if (rsaN[0] & 0x80) rsaNPad = 1; diff --git a/wolfssh/internal.h b/wolfssh/internal.h index 1c0a95b..71c0594 100644 --- a/wolfssh/internal.h +++ b/wolfssh/internal.h @@ -262,10 +262,6 @@ enum WS_MessageIds { }; -WOLFSSH_LOCAL int ProcessClientVersion(WOLFSSH*); -WOLFSSH_LOCAL int SendServerVersion(WOLFSSH*); - - /* dynamic memory types */ enum WS_DynamicTypes { DYNTYPE_CTX,