Fix for TLS anonymous cipher and PKCS11 cast warnings. (author=dgarske)

pull/3200/head
Daniel Pouzzner 2020-08-06 17:49:55 -05:00
parent 52a2222c79
commit 758665e347
2 changed files with 6 additions and 4 deletions

View File

@ -18999,6 +18999,8 @@ const char* GetCipherAuthStr(char n[][MAX_SEGMENT_SZ]) {
authStr = "SRP";
else if (XSTRNCMP(n1,"ECDSA",5) == 0)
authStr = "ECDSA";
else if (XSTRNCMP(n0,"ADH",3) == 0)
authStr = "None";
else
authStr = "unknown";

View File

@ -1061,8 +1061,8 @@ static int Pkcs11GetRsaPublicKey(RsaKey* key, Pkcs11Session* session,
ret = WC_HW_E;
if (ret == 0) {
modSz = tmpl[0].ulValueLen;
expSz = tmpl[1].ulValueLen;
modSz = (int)tmpl[0].ulValueLen;
expSz = (int)tmpl[1].ulValueLen;
mod = (unsigned char*)XMALLOC(modSz, key->heap,
DYNAMIC_TYPE_TMP_BUFFER);
if (mod == NULL)
@ -1162,9 +1162,9 @@ static int Pkcs11RsaKeyGen(Pkcs11Session* session, wc_CryptoInfo* info)
ret = Pkcs11GetRsaPublicKey(key, session, pubKey);
if (pubKey != NULL_PTR)
ret = session->func->C_DestroyObject(session->handle, pubKey);
ret = (int)session->func->C_DestroyObject(session->handle, pubKey);
if (ret != 0 && privKey != NULL_PTR)
ret = session->func->C_DestroyObject(session->handle, privKey);
ret = (int)session->func->C_DestroyObject(session->handle, privKey);
return ret;
}