add macros for IS_ECKEY and IS_RSAKEY, also fix tag on ECCP384

This commit is contained in:
Klas Lindfors
2015-06-24 13:03:14 +02:00
parent d06852959c
commit 1541362866
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -563,7 +563,7 @@ static ykpiv_rc _general_authenticate(ykpiv_state *state,
dataptr += set_length(dataptr, in_len + bytes + 3);
*dataptr++ = 0x82;
*dataptr++ = 0x00;
*dataptr++ = algorithm == YKPIV_ALGO_ECCP256 && decipher ? 0x85 : 0x81;
*dataptr++ = IS_ECKEY(algorithm) && decipher ? 0x85 : 0x81;
dataptr += set_length(dataptr, in_len);
memcpy(dataptr, sign_in, (size_t)in_len);
dataptr += in_len;