forked from wolfSSL/wolfssl
Fix for TLS anonymous cipher and PKCS11 cast warnings. (author=dgarske)
This commit is contained in:
@ -18999,6 +18999,8 @@ const char* GetCipherAuthStr(char n[][MAX_SEGMENT_SZ]) {
|
|||||||
authStr = "SRP";
|
authStr = "SRP";
|
||||||
else if (XSTRNCMP(n1,"ECDSA",5) == 0)
|
else if (XSTRNCMP(n1,"ECDSA",5) == 0)
|
||||||
authStr = "ECDSA";
|
authStr = "ECDSA";
|
||||||
|
else if (XSTRNCMP(n0,"ADH",3) == 0)
|
||||||
|
authStr = "None";
|
||||||
else
|
else
|
||||||
authStr = "unknown";
|
authStr = "unknown";
|
||||||
|
|
||||||
|
@ -1061,8 +1061,8 @@ static int Pkcs11GetRsaPublicKey(RsaKey* key, Pkcs11Session* session,
|
|||||||
ret = WC_HW_E;
|
ret = WC_HW_E;
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
modSz = tmpl[0].ulValueLen;
|
modSz = (int)tmpl[0].ulValueLen;
|
||||||
expSz = tmpl[1].ulValueLen;
|
expSz = (int)tmpl[1].ulValueLen;
|
||||||
mod = (unsigned char*)XMALLOC(modSz, key->heap,
|
mod = (unsigned char*)XMALLOC(modSz, key->heap,
|
||||||
DYNAMIC_TYPE_TMP_BUFFER);
|
DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
if (mod == NULL)
|
if (mod == NULL)
|
||||||
@ -1162,9 +1162,9 @@ static int Pkcs11RsaKeyGen(Pkcs11Session* session, wc_CryptoInfo* info)
|
|||||||
ret = Pkcs11GetRsaPublicKey(key, session, pubKey);
|
ret = Pkcs11GetRsaPublicKey(key, session, pubKey);
|
||||||
|
|
||||||
if (pubKey != NULL_PTR)
|
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)
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user