Merge pull request #70 from mscherer/add_constant

Add YKPIV_ALGO_TAG
This commit is contained in:
Klas Lindfors
2016-05-09 08:56:45 +02:00
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -110,6 +110,7 @@ extern "C"
const unsigned char *ec_data, unsigned char ec_data_len, const unsigned char *ec_data, unsigned char ec_data_len,
const unsigned char pin_policy, const unsigned char touch_policy); const unsigned char pin_policy, const unsigned char touch_policy);
#define YKPIV_ALGO_TAG 0x80
#define YKPIV_ALGO_3DES 0x03 #define YKPIV_ALGO_3DES 0x03
#define YKPIV_ALGO_RSA1024 0x06 #define YKPIV_ALGO_RSA1024 0x06
#define YKPIV_ALGO_RSA2048 0x07 #define YKPIV_ALGO_RSA2048 0x07
+1 -1
View File
@@ -145,7 +145,7 @@ static bool generate_key(ykpiv_state *state, const char *slot,
*in_ptr++ = 0xac; *in_ptr++ = 0xac;
*in_ptr++ = 3; *in_ptr++ = 3;
*in_ptr++ = 0x80; *in_ptr++ = YKPIV_ALGO_TAG;
*in_ptr++ = 1; *in_ptr++ = 1;
*in_ptr++ = get_piv_algorithm(algorithm); *in_ptr++ = get_piv_algorithm(algorithm);
if(in_data[4] == 0) { if(in_data[4] == 0) {
+1 -1
View File
@@ -67,7 +67,7 @@ static CK_RV COMMON_token_generate_key(ykpiv_state *state, CK_BBOOL rsa,
*in_ptr++ = 0xac; *in_ptr++ = 0xac;
*in_ptr++ = 3; *in_ptr++ = 3;
*in_ptr++ = 0x80; *in_ptr++ = YKPIV_ALGO_TAG;
*in_ptr++ = 1; *in_ptr++ = 1;
switch(key_len) { switch(key_len) {