add touch tlv for generate and import-key

This commit is contained in:
Klas Lindfors
2015-06-25 12:04:05 +02:00
parent be8f37924d
commit ca6a355b5d
5 changed files with 35 additions and 5 deletions
+12
View File
@@ -418,3 +418,15 @@ unsigned char get_pin_policy(enum enum_pin_policy policy) {
return 0;
}
}
unsigned char get_touch_policy(enum enum_touch_policy policy) {
switch(policy) {
case touch_policy_arg_never:
return YKPIV_TOUCHPOLICY_NEVER;
case touch_policy_arg_always:
return YKPIV_TOUCHPOLICY_ALWAYS;
case touch_policy__NULL:
default:
return 0;
}
}