mirror of https://github.com/wolfSSL/wolfssh.git
fix warnings for g++ build
parent
469efd6abf
commit
57f07802a2
|
@ -811,7 +811,7 @@ static int AddRestrictedCase(WOLFSSHD_CONFIG* config, const char* mtch,
|
||||||
int ret = WS_SUCCESS;
|
int ret = WS_SUCCESS;
|
||||||
char* pt;
|
char* pt;
|
||||||
|
|
||||||
pt = XSTRSTR(value, mtch);
|
pt = (char*)XSTRSTR(value, mtch);
|
||||||
if (pt != NULL) {
|
if (pt != NULL) {
|
||||||
int sz, i;
|
int sz, i;
|
||||||
|
|
||||||
|
|
|
@ -3206,7 +3206,7 @@ static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
|
||||||
|
|
||||||
if (ret == WS_SUCCESS) {
|
if (ret == WS_SUCCESS) {
|
||||||
wc_HashAlg* hash = &ssh->handshake->kexHash;
|
wc_HashAlg* hash = &ssh->handshake->kexHash;
|
||||||
enum wc_HashType hashId = ssh->handshake->kexHashId;
|
enum wc_HashType hashId = (enum wc_HashType)ssh->handshake->kexHashId;
|
||||||
byte scratchLen[LENGTH_SZ];
|
byte scratchLen[LENGTH_SZ];
|
||||||
word32 strSz;
|
word32 strSz;
|
||||||
|
|
||||||
|
@ -3917,7 +3917,7 @@ static int DoKexDhReply(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
hash = &ssh->handshake->kexHash;
|
hash = &ssh->handshake->kexHash;
|
||||||
hashId = ssh->handshake->kexHashId;
|
hashId = (enum wc_HashType)ssh->handshake->kexHashId;
|
||||||
|
|
||||||
if (ret == WS_SUCCESS) {
|
if (ret == WS_SUCCESS) {
|
||||||
/* Hash in the raw public key blob from the server including its
|
/* Hash in the raw public key blob from the server including its
|
||||||
|
@ -5277,7 +5277,7 @@ static int DoUserAuthRequestRsaCert(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk,
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ret = wc_GetPubKeyDerFromCert(&cert, NULL, &pubSz);
|
ret = wc_GetPubKeyDerFromCert(&cert, NULL, &pubSz);
|
||||||
if (ret == LENGTH_ONLY_E) {
|
if (ret == LENGTH_ONLY_E) {
|
||||||
pub = WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
|
pub = (byte*)WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
|
||||||
if (pub == NULL) {
|
if (pub == NULL) {
|
||||||
ret = WS_MEMORY_E;
|
ret = WS_MEMORY_E;
|
||||||
}
|
}
|
||||||
|
@ -5610,7 +5610,7 @@ static int DoUserAuthRequestEccCert(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk,
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ret = wc_GetPubKeyDerFromCert(&cert, NULL, &pubSz);
|
ret = wc_GetPubKeyDerFromCert(&cert, NULL, &pubSz);
|
||||||
if (ret == LENGTH_ONLY_E) {
|
if (ret == LENGTH_ONLY_E) {
|
||||||
pub = WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
|
pub = (byte*)WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
|
||||||
if (pub == NULL) {
|
if (pub == NULL) {
|
||||||
ret = WS_MEMORY_E;
|
ret = WS_MEMORY_E;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue