Minor fixes.
This commit is contained in:
@@ -434,7 +434,7 @@ CK_RV do_pkcs_1_t1(CK_BYTE_PTR in, CK_ULONG in_len, CK_BYTE_PTR out, CK_ULONG_PT
|
|||||||
|
|
||||||
// TODO: rand must be seeded first (should be automatic)
|
// TODO: rand must be seeded first (should be automatic)
|
||||||
if (*out_len < key_len)
|
if (*out_len < key_len)
|
||||||
CKR_BUFFER_TOO_SMALL;
|
return CKR_BUFFER_TOO_SMALL;
|
||||||
|
|
||||||
if (RSA_padding_add_PKCS1_type_1(buffer, key_len, in, in_len) == 0)
|
if (RSA_padding_add_PKCS1_type_1(buffer, key_len, in, in_len) == 0)
|
||||||
return CKR_FUNCTION_FAILED;
|
return CKR_FUNCTION_FAILED;
|
||||||
@@ -468,7 +468,7 @@ CK_RV do_pkcs_pss(RSA *key, CK_BYTE_PTR in, CK_ULONG in_len, int nid,
|
|||||||
|
|
||||||
// TODO: rand must be seeded first (should be automatic)
|
// TODO: rand must be seeded first (should be automatic)
|
||||||
if (*out_len < (CK_ULONG)RSA_size(key))
|
if (*out_len < (CK_ULONG)RSA_size(key))
|
||||||
CKR_BUFFER_TOO_SMALL;
|
return CKR_BUFFER_TOO_SMALL;
|
||||||
|
|
||||||
DBG(("Apply PSS padding to %lu bytes and get %d\n", in_len, RSA_size(key)));
|
DBG(("Apply PSS padding to %lu bytes and get %d\n", in_len, RSA_size(key)));
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
vendor_id_t get_vendor_id(char *vendor_name) {
|
vendor_id_t get_vendor_id(char *vendor_name) {
|
||||||
vendor_id_t vid;
|
|
||||||
|
|
||||||
if (strstr(vendor_name, "Yubico") != NULL)
|
if (strstr(vendor_name, "Yubico") != NULL)
|
||||||
return YUBICO;
|
return YUBICO;
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@ CK_DEFINE_FUNCTION(CK_RV, C_Initialize)(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parse_readers(piv_state, readers, len, slots, &n_slots, &n_slots_with_token) != CK_TRUE)
|
if (parse_readers(piv_state, readers, len, slots, &n_slots, &n_slots_with_token) != CK_TRUE)
|
||||||
CKR_FUNCTION_FAILED;
|
return CKR_FUNCTION_FAILED;
|
||||||
|
|
||||||
DBG(("Found %lu slot(s) of which %lu tokenless/unsupported", n_slots, n_slots - n_slots_with_token));
|
DBG(("Found %lu slot(s) of which %lu tokenless/unsupported", n_slots, n_slots - n_slots_with_token));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user