From e54684b9db2da78e8dd3ceebb0f4f135967f0bcb Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 20 Sep 2017 13:32:29 +0200 Subject: [PATCH] fixed documentation of GLP encoded PIN --- src/libopensc/sec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libopensc/sec.c b/src/libopensc/sec.c index ff2f650f..7cfd9fd8 100644 --- a/src/libopensc/sec.c +++ b/src/libopensc/sec.c @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H #include #endif @@ -223,7 +224,7 @@ int sc_pin_cmd(sc_card_t *card, struct sc_pin_cmd_data *data, * PIN buffers are allways 16 nibbles (8 bytes) and look like this: * 0x2 + len + pin_in_BCD + paddingnibbles * in which the paddingnibble = 0xF - * E.g. if PIN = 12345, then sbuf = {0x24, 0x12, 0x34, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF} + * E.g. if PIN = 12345, then sbuf = {0x25, 0x12, 0x34, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF} * E.g. if PIN = 123456789012, then sbuf = {0x2C, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0xFF} * Reference: Global Platform - Card Specification - version 2.0.1' - April 7, 2000 */