Minor fixes.

This commit is contained in:
Alessio Di Mauro
2015-09-17 17:05:29 +02:00
parent bae1005fb4
commit 4b668502ee
3 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -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)
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)
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)
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)));
-1
View File
@@ -2,7 +2,6 @@
#include <string.h>
vendor_id_t get_vendor_id(char *vendor_name) {
vendor_id_t vid;
if (strstr(vendor_name, "Yubico") != NULL)
return YUBICO;
+1 -1
View File
@@ -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)
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));