check length of private key components before setting

the card functions only accepts key components of correct size
so here we add 0 before if they're shorter (usually one byte shorter)
thus fixing the issue where the card returned 6f00
This commit is contained in:
Klas Lindfors
2014-11-12 14:08:11 +01:00
parent d0cef2f469
commit 36468219c2
3 changed files with 41 additions and 12 deletions
+1
View File
@@ -42,5 +42,6 @@ X509_NAME *parse_name(const char*);
unsigned char get_algorithm(EVP_PKEY*);
FILE *open_file(const char*, int);
int get_object_id(enum enum_slot slot);
bool set_component_with_len(unsigned char**, const BIGNUM*, int);
#endif