mirror of https://github.com/wolfSSL/wolfssh.git
warning fixes and windows build
parent
a9224993fd
commit
5971e8a4fa
|
|
@ -509,6 +509,9 @@ THREAD_RETURN WOLFSSH_THREAD client_test(void* args)
|
|||
break;
|
||||
|
||||
case 'p':
|
||||
if (myoptarg == NULL) {
|
||||
err_sys("port number cannot be NULL");
|
||||
}
|
||||
port = (word16)atoi(myoptarg);
|
||||
#if !defined(NO_MAIN_DRIVER) || defined(USE_WINDOWS_API)
|
||||
if (port == 0)
|
||||
|
|
@ -603,7 +606,10 @@ THREAD_RETURN WOLFSSH_THREAD client_test(void* args)
|
|||
err_sys("If setting priv key, need pub key.");
|
||||
}
|
||||
|
||||
ClientSetPrivateKey(privKeyName, userEcc);
|
||||
ret = ClientSetPrivateKey(privKeyName, userEcc);
|
||||
if (ret != 0) {
|
||||
err_sys("Error setting private key");
|
||||
}
|
||||
|
||||
#ifdef WOLFSSH_CERTS
|
||||
/* passed in certificate to use */
|
||||
|
|
@ -613,7 +619,10 @@ THREAD_RETURN WOLFSSH_THREAD client_test(void* args)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
ClientUsePubKey(pubKeyName, userEcc);
|
||||
ret = ClientUsePubKey(pubKeyName, userEcc);
|
||||
}
|
||||
if (ret != 0) {
|
||||
err_sys("Error setting public key");
|
||||
}
|
||||
|
||||
ctx = wolfSSH_CTX_new(WOLFSSH_ENDPOINT_CLIENT, NULL);
|
||||
|
|
|
|||
|
|
@ -606,6 +606,8 @@ int ClientSetEcho(int type)
|
|||
}
|
||||
|
||||
|
||||
/* Set certificate to use and public key.
|
||||
* returns 0 on success */
|
||||
int ClientUseCert(const char* certName)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
@ -626,6 +628,8 @@ int ClientUseCert(const char* certName)
|
|||
}
|
||||
|
||||
|
||||
/* Reads the private key to use from file name privKeyName.
|
||||
* returns 0 on success */
|
||||
int ClientSetPrivateKey(const char* privKeyName, int userEcc)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -666,6 +670,8 @@ int ClientSetPrivateKey(const char* privKeyName, int userEcc)
|
|||
}
|
||||
|
||||
|
||||
/* Set public key to use
|
||||
* returns 0 on success */
|
||||
int ClientUsePubKey(const char* pubKeyName, int userEcc)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,10 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
|
|||
err_sys("Empty path values");
|
||||
}
|
||||
|
||||
ClientSetPrivateKey(privKeyName, 0);
|
||||
ret = ClientSetPrivateKey(privKeyName, 0);
|
||||
if (ret != 0) {
|
||||
err_sys("Error setting private key");
|
||||
}
|
||||
|
||||
#ifdef WOLFSSH_CERTS
|
||||
/* passed in certificate to use */
|
||||
|
|
@ -226,7 +229,10 @@ THREAD_RETURN WOLFSSH_THREAD scp_client(void* args)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
ClientUsePubKey(pubKeyName, 0);
|
||||
ret = ClientUsePubKey(pubKeyName, 0);
|
||||
}
|
||||
if (ret != 0) {
|
||||
err_sys("Error setting public key");
|
||||
}
|
||||
|
||||
ctx = wolfSSH_CTX_new(WOLFSSH_ENDPOINT_CLIENT, NULL);
|
||||
|
|
|
|||
|
|
@ -1197,7 +1197,10 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
|
|||
}
|
||||
#endif
|
||||
|
||||
ClientSetPrivateKey(privKeyName, 0);
|
||||
ret = ClientSetPrivateKey(privKeyName, 0);
|
||||
if (ret != 0) {
|
||||
err_sys("Error setting private key");
|
||||
}
|
||||
|
||||
#ifdef WOLFSSH_CERTS
|
||||
/* passed in certificate to use */
|
||||
|
|
@ -1207,7 +1210,10 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
ClientUsePubKey(pubKeyName, 0);
|
||||
ret = ClientUsePubKey(pubKeyName, 0);
|
||||
}
|
||||
if (ret != 0) {
|
||||
err_sys("Error setting public key");
|
||||
}
|
||||
|
||||
ctx = wolfSSH_CTX_new(WOLFSSH_ENDPOINT_CLIENT, NULL);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\client\client.c" />
|
||||
<ClCompile Include="..\..\..\examples\client\common.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\wolfssh\wolfssh.vcxproj">
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\client\common.c" />
|
||||
<ClCompile Include="..\..\..\examples\client\client.c" />
|
||||
<ClCompile Include="..\..\..\examples\echoserver\echoserver.c" />
|
||||
<ClCompile Include="..\..\..\tests\testsuite.c" />
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\client\common.c" />
|
||||
<ClCompile Include="..\..\..\examples\sftpclient\sftpclient.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue