Fixed typo.

This commit is contained in:
Alessio Di Mauro
2015-09-02 11:49:17 +02:00
parent f646ec9dde
commit c13426a2e8
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -1083,7 +1083,6 @@ CK_RV check_create_rsa_key(CK_ATTRIBUTE_PTR templ, CK_ULONG n, CK_BYTE_PTR id,
case CKA_PUBLIC_EXPONENT:
has_e = CK_TRUE;
if (templ[i].ulValueLen != 3 || memcmp((CK_BYTE_PTR)templ[i].pValue, F4, 3) != 0)
return CKR_ATTRIBUTE_VALUE_INVALID;
break;
@@ -1146,7 +1145,7 @@ CK_RV check_create_rsa_key(CK_ATTRIBUTE_PTR templ, CK_ULONG n, CK_BYTE_PTR id,
has_qinv == CK_FALSE)
return CKR_TEMPLATE_INCOMPLETE;
if (p_len != 64 || p_len != 128)
if (p_len != 64 && p_len != 128)
return CKR_ATTRIBUTE_VALUE_INVALID;
*value_len = p_len;
+1 -1
View File
@@ -133,7 +133,7 @@ CK_RV COMMON_token_import_private_key(ykpiv_state *state, CK_BYTE key_id, CK_BYT
unsigned long recv_len = sizeof(data);
int sw;
if (elem_len == 128)
if (elem_len == 128) // TODO: add a flag to check algo type ?
templ[2] = YKPIV_ALGO_RSA2048;
else if (elem_len == 64)
templ[2] = YKPIV_ALGO_RSA1024;