fix WOLFSSH_NO_RSA

pull/650/head
Hideki Miyazaki 2024-01-27 13:03:10 +09:00
parent dce3cf09e9
commit b256522f5b
No known key found for this signature in database
GPG Key ID: 4EE161CA873C6418
5 changed files with 8 additions and 4 deletions

View File

@ -642,7 +642,7 @@ int ClientUseCert(const char* certName)
* returns 0 on success */
int ClientSetPrivateKey(const char* privKeyName, int userEcc)
{
int ret;
int ret = 0;
if (privKeyName == NULL) {
if (userEcc) {
@ -682,7 +682,7 @@ int ClientSetPrivateKey(const char* privKeyName, int userEcc)
* returns 0 on success */
int ClientUsePubKey(const char* pubKeyName, int userEcc)
{
int ret;
int ret = 0;
if (pubKeyName == NULL) {
byte* p = userPublicKey;

View File

@ -1128,6 +1128,7 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
socklen_t clientAddrSz = sizeof(clientAddr);
int ret;
int ch;
int userEcc = 0;
/* int peerEcc = 0; */
word16 port = wolfSshPort;
char* host = (char*)wolfSshIp;
@ -1262,7 +1263,7 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
}
#endif
ret = ClientSetPrivateKey(privKeyName, 0);
ret = ClientSetPrivateKey(privKeyName, userEcc);
if (ret != 0) {
err_sys("Error setting private key");
}

View File

@ -6829,7 +6829,7 @@ static int DoChannelOpen(WOLFSSH* ssh,
word32 typeSz;
char type[32];
byte typeId = ID_UNKNOWN;
word32 peerChannelId;
word32 peerChannelId = 0;
word32 peerInitialWindowSz;
word32 peerMaxPacketSz;
#ifdef WOLFSSH_FWD

View File

@ -746,6 +746,7 @@ static void test_wolfSSH_ReadKey(void)
#ifndef WOLFSSH_NO_ECDSA_SHA2_NISTP256
/* OpenSSH Format, ecdsa-sha2-nistp256, private, need alloc */
(void)keyCheck;
key = NULL;
keySz = 0;
keyType = NULL;

View File

@ -1204,9 +1204,11 @@ WOLFSSH_LOCAL int wsScpSendCallback(WOLFSSH*, int, const char*, char*, word32,
WOLFSSH_LOCAL int wolfSSH_CleanPath(WOLFSSH* ssh, char* in);
#ifndef WOLFSSH_NO_RSA
WOLFSSH_LOCAL int wolfSSH_RsaVerify(byte *sig, word32 sigSz,
const byte* digest, word32 digestSz,
RsaKey* key, void* heap, const char* loc);
#endif
WOLFSSH_LOCAL void DumpOctetString(const byte*, word32);
WOLFSSH_LOCAL int wolfSSH_oct2dec(WOLFSSH* ssh, byte* oct, word32 octSz);
WOLFSSH_LOCAL void AddAssign64(word32*, word32);