Hello everyone,

At our company we use identification cards as security tokens. We have successfully used those together with the pkcs11 lib that the company behind these cards deliver, however I'm getting tired of their negligent and incompetent support, therefore I would like to use opensc driver instead.

Enough with the wining, lets go down to business.

The cards we have uses SetCOS and I've successfully got them to work with opensc, however I've got some concerns.

First some outputs,
$ opensc-tool --atr
Using reader with a card: OmniKey CardMan 3121 01 00
3b:7d:96:00:00:80:31:80:65:b0:a3:11:40:a9:83:00:90:00

$ opensc-tool --name
Using reader with a card: OmniKey CardMan 3121 01 00
SetCOS

Question #1,

Try pkcs11_inspect.
$ pkcs11_inspect
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: Instruction code not supported or invalid [opensc-pkcs11] card.c:588:sc_get_challenge: returning with: Unsupported INS byte in APDU
PIN for token: xxxx
Printing data for mapper cn:
username

Works like a charm, however it gives me those two lines which is a bit worrying/annoying.
What do they mean and is there anything i can do to fix them ?

Question #2,
I'm trying to use opensc-pkcs11.so together with gdm-plugin-smartcard.

That one is failing telling me, "assertion 'slot_id >= 1' failed", obviously slot_id should be >= than 1, but it isn't and I'm not sure why.

I'm attaching my configfiles, logs.
I'm more then happy to help debugging this more if necessary.

Thanks in advance.

/Patrik Martinsson,
Sweden
[opensc-pkcs11] ctx.c:735:sc_context_create: ===================================
[opensc-pkcs11] ctx.c:736:sc_context_create: opensc version: 0.11.13
[opensc-pkcs11] reader-pcsc.c:879:pcsc_detect_readers: Probing pcsc readers
[opensc-pkcs11] reader-pcsc.c:901:pcsc_detect_readers: Establish pcsc context
[opensc-pkcs11] reader-pcsc.c:951:pcsc_detect_readers: Found new pcsc reader 
'SCM SCR 3340 ExpressCard54 (21220952C00178) 00 00'
[opensc-pkcs11] reader-pcsc.c:951:pcsc_detect_readers: Found new pcsc reader 
'OmniKey CardMan 3121 01 00'
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:126:card_detect: 1: Connecting to smart card
[opensc-pkcs11] card.c:110:sc_connect_card: called
[opensc-pkcs11] reader-pcsc.c:532:pcsc_connect: After connect protocol = 1
[opensc-pkcs11] reader-pcsc.c:551:pcsc_connect: Requesting reader features ... 
[opensc-pkcs11] reader-pcsc.c:556:pcsc_connect: SCardControl failed 80100008
[opensc-pkcs11] card-gemsafeV1.c:120:gemsafe_match_card: called
[opensc-pkcs11] card.c:221:sc_connect_card: card info: SetCOS, 6102, 0x0
[opensc-pkcs11] card.c:222:sc_connect_card: returning with: 0
[opensc-pkcs11] slot.c:134:card_detect: 1: Detecting Framework
[opensc-pkcs11] pkcs15.c:700:sc_pkcs15_bind: called
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f002f00
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: File not found
[opensc-pkcs11] card.c:554:sc_select_file: returning with: -1201
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f005015
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: File not found
[opensc-pkcs11] card.c:554:sc_select_file: returning with: -1201
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f005031
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:623:sc_pkcs15_bind_internal: The following DFs were 
found:
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 8, path 
3f004401, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 0, path 
3f004402, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 0, path 
3f004407, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 4, path 
3f004403, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 6, path 
3f004405, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 7, path 
3f004406, index 0, count -1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f005032
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:172:pkcs15_bind: Binding to PKCS#15, rc=0
[opensc-pkcs11] slot.c:148:card_detect: 1: Detected framework 0. Creating 
tokens.
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004401, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004401
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:802:pkcs15_create_tokens: Found 2 
authentication objects
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004402, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004402
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004407, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004407
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 4 
private keys
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 0 
public keys
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 0 
private keys
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 0 
public keys
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004403, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004403
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004405, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004405
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 1 
certificate
[opensc-pkcs11] pkcs15-cert.c:115:sc_pkcs15_read_certificate: called
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f00433f, 
index=12, count=1869
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f00433f
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004406, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004406
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 1 
data object
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 0
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
34663831313562372d363230352d343765612d393262312d346537323762303630336561
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 1
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
33313338613237622d373964612d343732332d623765632d643430616635663735383763
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 2
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
66383630613966382d366436642d346666372d613062622d393961306230306530613835
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 3
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 4
[opensc-pkcs11] framework-pkcs15.c:545:__pkcs15_cert_bind_related: Object is a 
certificate and has id 
33313338613237622d373964612d343732332d623765632d643430616635663735383763
[opensc-pkcs11] framework-pkcs15.c:574:__pkcs15_cert_bind_related: Associating 
object 1 as private key
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 5
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 6
[opensc-pkcs11] slot.c:235:slot_allocate: Allocated slot 1
[opensc-pkcs11] framework-pkcs15.c:761:pkcs15_init_slot: Initialized token 
'Instant EID IP8 (identification)'
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
0 to PIN 0
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
1 to PIN 0
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
2 to PIN 0
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
3 to PIN 0
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:233:C_Initialize: C_Initialize: result = 0
[opensc-pkcs11] pkcs11-global.c:295:C_GetInfo: Cryptoki info query
[opensc-pkcs11] pkcs11-global.c:350:C_GetSlotList: Getting slot listing
[opensc-pkcs11] reader-pcsc.c:879:pcsc_detect_readers: Probing pcsc readers
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:366:C_GetSlotList: was only a size inquiry (16)
[opensc-pkcs11] pkcs11-global.c:350:C_GetSlotList: Getting slot listing
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:383:C_GetSlotList: returned 16 slots
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 0
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 1
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:472:C_GetTokenInfo: Getting info about token in 
slot 1
[opensc-pkcs11] pkcs11-session.c:40:C_OpenSession: Opening new session for slot 
1
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: Instruction code not supported 
or invalid
[opensc-pkcs11] card.c:588:sc_get_challenge: returning with: Unsupported INS 
byte in APDU
[opensc-pkcs11] misc.c:80:sc_to_cryptoki_error: opensc error: Unsupported INS 
byte in APDU (-1204)
[opensc-pkcs11] pkcs11-object.c:237:C_FindObjectsInit: C_FindObjectsInit(slot = 
1)
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_CLASS = 0xce534354
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/1: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/2: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/5: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/6: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:307:C_FindObjectsInit: 0 matching objects
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 2
[opensc-pkcs11] slot.c:86:card_detect: 2: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 3
[opensc-pkcs11] slot.c:86:card_detect: 3: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 4
[opensc-pkcs11] slot.c:86:card_detect: 4: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 5
[opensc-pkcs11] slot.c:86:card_detect: 5: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 6
[opensc-pkcs11] slot.c:86:card_detect: 6: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 7
[opensc-pkcs11] slot.c:86:card_detect: 7: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 8
[opensc-pkcs11] slot.c:86:card_detect: 8: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 9
[opensc-pkcs11] slot.c:86:card_detect: 9: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 10
[opensc-pkcs11] slot.c:86:card_detect: 10: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 11
[opensc-pkcs11] slot.c:86:card_detect: 11: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 12
[opensc-pkcs11] slot.c:86:card_detect: 12: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 13
[opensc-pkcs11] slot.c:86:card_detect: 13: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 14
[opensc-pkcs11] slot.c:86:card_detect: 14: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 15
[opensc-pkcs11] slot.c:86:card_detect: 15: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 0
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 1
[opensc-pkcs11] pkcs11-session.c:179:C_GetSessionInfo: C_GetSessionInfo(slot 1).
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 2
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 3
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 4
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 5
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 6
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 7
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 8
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 9
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 10
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 11
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 12
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 13
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 14
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 15
PIN for token: 
[opensc-pkcs11] pkcs11-session.c:179:C_GetSessionInfo: C_GetSessionInfo(slot 1).
[opensc-pkcs11] pkcs11-session.c:239:C_Login: Login for session 1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=0, path=3f00
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:1017:pkcs15_login: PIN verification returned 0
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 1
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-session.c:179:C_GetSessionInfo: C_GetSessionInfo(slot 1).
[opensc-pkcs11] pkcs11-session.c:179:C_GetSessionInfo: C_GetSessionInfo(slot 1).
[opensc-pkcs11] pkcs11-object.c:237:C_FindObjectsInit: C_FindObjectsInit(slot = 
1)
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_TOKEN = TRUE
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_CLASS = CKO_CERTIFICATE
[opensc-pkcs11] pkcs11-object.c:296:C_FindObjectsInit: Object 1/3 matches
[opensc-pkcs11] pkcs11-object.c:307:C_FindObjectsInit: 1 matching objects
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_TOKEN = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_LABEL = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_TOKEN = 
TRUE
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_LABEL = 
username
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_CLASS = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_TOKEN = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_LABEL = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: 
CKA_CERTIFICATE_TYPE = <size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_ID = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_VALUE = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_ISSUER = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: 
CKA_SERIAL_NUMBER = <size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_SUBJECT 
= <size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: Attribute 
0xce534352 = <size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_CLASS = 
CKO_CERTIFICATE
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_TOKEN = 
TRUE
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_LABEL = 
username
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: 
CKA_CERTIFICATE_TYPE = CKC_X_509
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_ID = 
33313338613237622D373964612D343732332D623765632D6434306166356637
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_VALUE = 
3082074930820631A003020102020A68887AD6000000000C3D300D06092A8648
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_ISSUER = 
306131123010060A0992268993F22C6401191602736531143012060A09922689
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: 
CKA_SERIAL_NUMBER = 68887AD6000000000C3D
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_SUBJECT 
= 30818B31123010060A0992268993F22C6401191602736531143012060A099226
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: Attribute 
0xce534352 = <size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: Attribute 
0xce534352 = <size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: Attribute 
0xce534352 = <size inquiry>
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 0
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] pkcs11-object.c:237:C_FindObjectsInit: C_FindObjectsInit(slot = 
1)
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_TOKEN = TRUE
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_CLASS = 0xce534353
[opensc-pkcs11] pkcs11-object.c:307:C_FindObjectsInit: 0 matching objects
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 2
[opensc-pkcs11] slot.c:86:card_detect: 2: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 3
[opensc-pkcs11] slot.c:86:card_detect: 3: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 4
[opensc-pkcs11] slot.c:86:card_detect: 4: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 5
[opensc-pkcs11] slot.c:86:card_detect: 5: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 6
[opensc-pkcs11] slot.c:86:card_detect: 6: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 7
[opensc-pkcs11] slot.c:86:card_detect: 7: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 8
[opensc-pkcs11] slot.c:86:card_detect: 8: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 9
[opensc-pkcs11] slot.c:86:card_detect: 9: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 10
[opensc-pkcs11] slot.c:86:card_detect: 10: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 11
[opensc-pkcs11] slot.c:86:card_detect: 11: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 12
[opensc-pkcs11] slot.c:86:card_detect: 12: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 13
[opensc-pkcs11] slot.c:86:card_detect: 13: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 14
[opensc-pkcs11] slot.c:86:card_detect: 14: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 15
[opensc-pkcs11] slot.c:86:card_detect: 15: Detecting smart card
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_ID = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_CLASS = 
<size inquiry>
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_ID = 
33313338613237622D373964612D343732332D623765632D6434306166356637
[opensc-pkcs11] pkcs11-object.c:151:C_GetAttributeValue: Object 3: CKA_CLASS = 
CKO_CERTIFICATE
[opensc-pkcs11] pkcs11-object.c:237:C_FindObjectsInit: C_FindObjectsInit(slot = 
1)
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_ID = 33313338613237622D373964612D343732332D623765632D6434306166356637
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_CLASS = CKO_PRIVATE_KEY
[opensc-pkcs11] pkcs11-object.c:296:C_FindObjectsInit: Object 1/2 matches
[opensc-pkcs11] pkcs11-object.c:307:C_FindObjectsInit: 1 matching objects
[opensc-pkcs11] pkcs11-object.c:237:C_FindObjectsInit: C_FindObjectsInit(slot = 
1)
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_CLASS = 0xce534351
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_SUBJECT = 306131123010060A0992268993F22C6401191602736531143012060A09922689
[opensc-pkcs11] pkcs11-object.c:307:C_FindObjectsInit: 0 matching objects
Printing data for mapper cn:
username
[opensc-pkcs11] pkcs11-session.c:276:C_Logout: Logout for session 1
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] pkcs11-session.c:115:sc_pkcs11_close_all_sessions: 
C_CloseAllSessions(slot 1).
[opensc-pkcs11] slot.c:86:card_detect: 2: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 3: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 4: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 5: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 6: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 7: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 8: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 9: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 10: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 11: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 12: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 13: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 14: Detecting smart card
[opensc-pkcs11] slot.c:86:card_detect: 15: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:264:C_Finalize: Shutting down Cryptoki
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:188:card_removed: 1: smart card removed
[opensc-pkcs11] pkcs11-session.c:115:sc_pkcs11_close_all_sessions: 
C_CloseAllSessions(slot 1).
[opensc-pkcs11] pkcs15.c:819:sc_pkcs15_unbind: called
[opensc-pkcs11] card.c:236:sc_disconnect_card: called
[opensc-pkcs11] card.c:251:sc_disconnect_card: returning with: 0
[opensc-pkcs11] ctx.c:765:sc_release_context: called
*** DEBUG: watching for smartcard insertion and removal events
*** DEBUG: initializing smartcard manager
*** DEBUG: attempting to load NSS database '/etc/pki/nssdb'
*** DEBUG: NSS database sucessfully loaded
*** DEBUG: attempting to load driver...
*** DEBUG: loading smartcard driver using spec 
'library="/usr/local/lib/opensc-pkcs11.so"'
[opensc-pkcs11] ctx.c:735:sc_context_create: ===================================
[opensc-pkcs11] ctx.c:736:sc_context_create: opensc version: 0.11.13
[opensc-pkcs11] reader-pcsc.c:879:pcsc_detect_readers: Probing pcsc readers
[opensc-pkcs11] reader-pcsc.c:901:pcsc_detect_readers: Establish pcsc context
[opensc-pkcs11] reader-pcsc.c:951:pcsc_detect_readers: Found new pcsc reader 
'SCM SCR 3340 ExpressCard54 (21220952C00178) 00 00'
[opensc-pkcs11] reader-pcsc.c:951:pcsc_detect_readers: Found new pcsc reader 
'OmniKey CardMan 3121 01 00'
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:126:card_detect: 1: Connecting to smart card
[opensc-pkcs11] card.c:110:sc_connect_card: called
[opensc-pkcs11] reader-pcsc.c:532:pcsc_connect: After connect protocol = 1
[opensc-pkcs11] reader-pcsc.c:551:pcsc_connect: Requesting reader features ... 
[opensc-pkcs11] reader-pcsc.c:556:pcsc_connect: SCardControl failed 80100008
[opensc-pkcs11] card-gemsafeV1.c:120:gemsafe_match_card: called
[opensc-pkcs11] card.c:221:sc_connect_card: card info: SetCOS, 6102, 0x0
[opensc-pkcs11] card.c:222:sc_connect_card: returning with: 0
[opensc-pkcs11] slot.c:134:card_detect: 1: Detecting Framework
[opensc-pkcs11] pkcs15.c:700:sc_pkcs15_bind: called
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f002f00
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: File not found
[opensc-pkcs11] card.c:554:sc_select_file: returning with: -1201
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f005015
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: File not found
[opensc-pkcs11] card.c:554:sc_select_file: returning with: -1201
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f005031
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:623:sc_pkcs15_bind_internal: The following DFs were 
found:
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 8, path 
3f004401, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 0, path 
3f004402, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 0, path 
3f004407, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 4, path 
3f004403, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 6, path 
3f004405, index 0, count -1
[opensc-pkcs11] pkcs15.c:633:sc_pkcs15_bind_internal:   DF type 7, path 
3f004406, index 0, count -1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f005032
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:172:pkcs15_bind: Binding to PKCS#15, rc=0
[opensc-pkcs11] slot.c:148:card_detect: 1: Detected framework 0. Creating 
tokens.
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004401, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004401
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:802:pkcs15_create_tokens: Found 2 
authentication objects
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004402, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004402
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004407, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004407
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 4 
private keys
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 0 
public keys
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 0 
private keys
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 0 
public keys
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004403, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004403
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004405, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004405
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 1 
certificate
[opensc-pkcs11] pkcs15-cert.c:115:sc_pkcs15_read_certificate: called
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f00433f, 
index=12, count=1869
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f00433f
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] pkcs15.c:1684:sc_pkcs15_read_file: called, path=3f004406, 
index=0, count=-1
[opensc-pkcs11] card.c:532:sc_select_file: called; type=2, path=3f004406
[opensc-pkcs11] card.c:554:sc_select_file: returning with: 0
[opensc-pkcs11] framework-pkcs15.c:486:pkcs15_create_pkcs11_objects: Found 1 
data object
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 0
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
34663831313562372d363230352d343765612d393262312d346537323762303630336561
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 1
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
33313338613237622d373964612d343732332d623765632d643430616635663735383763
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 2
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
66383630613966382d366436642d346666372d613062622d393961306230306530613835
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 3
[opensc-pkcs11] framework-pkcs15.c:503:__pkcs15_prkey_bind_related: Object is a 
private key and has id 
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 4
[opensc-pkcs11] framework-pkcs15.c:545:__pkcs15_cert_bind_related: Object is a 
certificate and has id 
33313338613237622d373964612d343732332d623765632d643430616635663735383763
[opensc-pkcs11] framework-pkcs15.c:574:__pkcs15_cert_bind_related: Associating 
object 1 as private key
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 5
[opensc-pkcs11] framework-pkcs15.c:595:pkcs15_bind_related_objects: Looking for 
objects related to object 6
[opensc-pkcs11] slot.c:235:slot_allocate: Allocated slot 1
[opensc-pkcs11] framework-pkcs15.c:761:pkcs15_init_slot: Initialized token 
'Instant EID IP8 (identification)'
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
0 to PIN 0
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
1 to PIN 0
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
2 to PIN 0
[opensc-pkcs11] framework-pkcs15.c:887:pkcs15_create_tokens: Adding private key 
3 to PIN 0
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:233:C_Initialize: C_Initialize: result = 0
[opensc-pkcs11] pkcs11-global.c:295:C_GetInfo: Cryptoki info query
[opensc-pkcs11] pkcs11-global.c:350:C_GetSlotList: Getting slot listing
[opensc-pkcs11] reader-pcsc.c:879:pcsc_detect_readers: Probing pcsc readers
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:366:C_GetSlotList: was only a size inquiry (16)
[opensc-pkcs11] pkcs11-global.c:350:C_GetSlotList: Getting slot listing
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:383:C_GetSlotList: returned 16 slots
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 0
[opensc-pkcs11] slot.c:86:card_detect: 0: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0
[opensc-pkcs11] slot.c:107:card_detect: 0: Card absent
[opensc-pkcs11] slot.c:188:card_removed: 0: smart card removed
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 1
[opensc-pkcs11] slot.c:86:card_detect: 1: Detecting smart card
[opensc-pkcs11] sc.c:196:sc_detect_card_presence: called
[opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1
[opensc-pkcs11] slot.c:156:card_detect: 1: Detection ended
[opensc-pkcs11] pkcs11-global.c:472:C_GetTokenInfo: Getting info about token in 
slot 1
[opensc-pkcs11] pkcs11-session.c:40:C_OpenSession: Opening new session for slot 
1
[opensc-pkcs11] iso7816.c:99:iso7816_check_sw: Instruction code not supported 
or invalid
[opensc-pkcs11] card.c:588:sc_get_challenge: returning with: Unsupported INS 
byte in APDU
[opensc-pkcs11] misc.c:80:sc_to_cryptoki_error: opensc error: Unsupported INS 
byte in APDU (-1204)
[opensc-pkcs11] pkcs11-object.c:237:C_FindObjectsInit: C_FindObjectsInit(slot = 
1)
[opensc-pkcs11] pkcs11-object.c:238:C_FindObjectsInit: C_FindObjectsInit(): 
CKA_CLASS = 0xce534354
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/1: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/2: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/5: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:267:C_FindObjectsInit: Object 1/6: Private 
object and not logged in.
[opensc-pkcs11] pkcs11-object.c:307:C_FindObjectsInit: 0 matching objects
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 2
[opensc-pkcs11] slot.c:86:card_detect: 2: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 3
[opensc-pkcs11] slot.c:86:card_detect: 3: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 4
[opensc-pkcs11] slot.c:86:card_detect: 4: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 5
[opensc-pkcs11] slot.c:86:card_detect: 5: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 6
[opensc-pkcs11] slot.c:86:card_detect: 6: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 7
[opensc-pkcs11] slot.c:86:card_detect: 7: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 8
[opensc-pkcs11] slot.c:86:card_detect: 8: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 9
[opensc-pkcs11] slot.c:86:card_detect: 9: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 10
[opensc-pkcs11] slot.c:86:card_detect: 10: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 11
[opensc-pkcs11] slot.c:86:card_detect: 11: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 12
[opensc-pkcs11] slot.c:86:card_detect: 12: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 13
[opensc-pkcs11] slot.c:86:card_detect: 13: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 14
[opensc-pkcs11] slot.c:86:card_detect: 14: Detecting smart card
[opensc-pkcs11] pkcs11-global.c:436:C_GetSlotInfo: Getting info about slot 15
[opensc-pkcs11] slot.c:86:card_detect: 15: Detecting smart card

** (process:23848): CRITICAL **: _gdm_smartcard_new: assertion `slot_id >= 1' 
failed
*** DEBUG: waiting for card event
[opensc-pkcs11] pkcs11-global.c:350:C_GetSlotList: Getting slot listing
[opensc-pkcs11] reader-pcsc.c:879:pcsc_detect_readers: Probing pcsc readers
Segmention fault
pam_pkcs11  {
        nullok = true;
        debug = true;
        card_only = true, true;
        use_first_pass = false;
        try_first_pass = false;
        use_authtok = false, false;
        use_pkcs11_module = opensc;
        screen_savers = "gnome-screensaver", xscreensaver, kscreensaver;
        enable_ocsp = false;
        wait_for_card = true;

        pkcs11_module opensc {
                #module = opensc-pkcs11.so;
                # Slot-number to use. One for the first, two for the second and 
so
                # on. The default value is zero which means to use the first 
slot
                # with an available token.
                description = "OpenSC PKCS#11 module";
                module = "/usr/local/lib/opensc-pkcs11.so";
                slot_num = 0;
                ca_dir = "/etc/pam_pkcs11/cacerts";
                nss_dir = /etc/pki/nssdb;
                crl_dir = "/etc/pam_pkcs11/crls";
                crl_policy = none;
        }

        use_mappers = cn;
        mapper cn {
                debug = false;
                module = internal;
                ignorecase = true;
                mapfile = none;
        }
}

# Configuration file for OpenSC
# Example configuration file


# NOTE: All key-value pairs must be terminated by a semicolon.

# Default values for any application
# These can be overridden by an application
# specific configuration block.
app default {
        # Amount of debug info to print
        #
        # A greater value means more debug info.
        # Default: 0
        #
        debug = 1;

        # The file to which debug output will be written
        #
        # A special value of 'stdout' is recognized.
        # Default: stdout
        #
        # debug_file = /tmp/opensc-debug.log;
        # debug_file = "C:\Documents and Settings\All 
Users\Documents\opensc-debug.log";

        # The file to which errors will be written
        #
        # A special value of 'stderr' is recognized.
        # Default: stderr
        #
        # error_file = /tmp/opensc-errors.log;
        # error_file = "C:\Documents and Settings\All 
Users\Documents\opensc-errors.log";

        # PKCS#15 initialization / personalization
        # profiles directory for pkcs15-init.
        # Default: /usr/local/share/opensc
        #
        # profile_dir = /usr/local/share/opensc;

        # What reader drivers to load at start-up
        #
        # A special value of 'internal' will load all
        # statically linked drivers. If an unknown (ie. not
        # internal) driver is supplied, a separate configuration
        # configuration block has to be written for the driver.
        # Default: internal
        # NOTE: if "internal" keyword is used, must be the
        # last entry in reader_drivers list
        #
        reader_drivers = pcsc;

        #reader_driver ctapi {
                # module /usr/local/towitoko/lib/libtowitoko.so {
                        # CT-API ports:
                        # 0..3          COM1..4
                        # 4             Printer
                        # 5             Modem
                        # 6..7          LPT1..2
                        # ports = 0;
                # }
        #}

        # Define parameters specific to your readers.
        # The following section shows definitions for PC/SC readers,
        # but the same set of variables are applicable to ctapi and
        # openct readers, simply by using "reader_driver ctapi" and
        # "reader_driver openct", respectively.
        reader_driver pcsc {
                # This sets the maximum send and receive sizes.
                # Some reader drivers have limitations, so you need
                # to set these values. For usb devices check the
                # properties with lsusb -vv for dwMaxIFSD
                #
                # max_send_size = 252;
                # max_recv_size = 252;
                
                # Connect to reader in exclusive mode.
                # Default: false
                # connect_exclusive = true;
                #
                # Reset the card after disconnect.
                # Default: true
                # connect_reset = false;
                #
                # Reset the card after each transaction.
                # Default: false
                # transaction_reset = true;
                #
                # Enable pinpad if detected (PC/SC v2.0.2 Part 10)
                # Default: false
                # enable_pinpad = true;
                #
                # Use specific pcsc provider.
                # Default: 
                provider_library = libpcsclite.so;
        }

        # Options for OpenCT support
        #reader_driver openct {
                # Virtual readers to allocate.
                # Default: 2
                # readers = 5;

                # This sets the maximum send and receive sizes.
                # Some reader drivers have limitations, so you need
                # to set these values. For usb devices check the
                # properties with lsusb -vv for dwMaxIFSD
                #
                # max_send_size = 252;
                # max_recv_size = 252;
        #};

        # What card drivers to load at start-up
        #
        # A special value of 'internal' will load all
        # statically linked drivers. If an unknown (ie. not
        # internal) driver is supplied, a separate configuration
        # configuration block has to be written for the driver.
        # Default: internal
        # NOTE: When "internal" keyword is used, must be last entry
        #
        # card_drivers = customcos, internal;

        # Card driver configuration blocks.

        # For card drivers loaded from an external shared library/DLL,
        # you need to specify the path name of the module
        #
        # card_driver customcos {
                # The location of the driver library
                # module = /usr/lib/opensc/drivers/card_customcos.so;
        # }

        # Force using specific card driver
        #
        # If this option is present, OpenSC will use the supplied
        # driver with all inserted cards.
        #
        # Default: autodetect
        #
        # force_card_driver = customcos;

        # In addition to the built-in list of known cards in the
        # card driver, you can configure a new card for the driver
        # using the card_atr block. The goal is to centralize
        # everything related to a certain card to card_atr.
        #
        # The supported internal card driver names can be retrieved
        # from the output of:
        # $ opensc-tool --list-drivers

        # Generic format: card_atr <hex encoded ATR (case-sensitive!)>

        # New card entry for the flex card driver
        # card_atr 3b:f0:0d:ca:fe {
                # All parameters for the context are
                # optional unless specified otherwise.

                # Context: global, card driver
                #
                # ATR mask value
                #
                # The mask is logically AND'd with an
                # card ATR prior to comparison with the
                # ATR reference value above. Using mask
                # allows identifying and configuring
                # multiple ATRs as the same card model.
                # atrmask = "ff:ff:ff:ff:ff";

                # Context: card driver
                #
                # Specify used card driver (REQUIRED).
                #
                # When enabled, overrides all possible
                # settings from the card drivers built-in
                # card configuration list.
                # driver = "flex";

                # Set card name for card drivers that allows it.
                # name = "My CryptoFlex card";

                # Card type as an integer value.
                #
                # Depending on card driver, this allows
                # tuning the behaviour of the card driver
                # for your card.
                # type = "2002";

                # Card flags as an hex value.
                # Multiple values are OR'd together.
                #
                # Depending on card driver, this allows
                # fine-tuning the capabilities in
                # the card driver for your card.
                #
                # Optionally, some known parameters
                # can be specified as strings:
                #
                # keygen - On-board key generation capability
                # rng - On-board random number source
                #
                # flags = "keygen", "rng", "0x80000000";

                #
                # Context: PKCS#15 emulation layer
                #
                # When using PKCS#15 emulation, force
                # the emulation driver for specific cards.
                #
                # Required for external drivers, but can
                # be used with built-in drivers, too.
                # pkcs15emu = "custom";

                #
                # Context: reader driver
                #
                # Force protocol selection for specific cards.
                # Known parameters: t0, t1, raw
                # force_protocol = "t0";
        # }

        # PIV cards need an entry similar to this one:
        # card_atr 3B:7D:96:00:00:80:31:80:65:B0:83:11:00:AC:83:00:90:00 {
                # name = "PIV-II";
                # driver = "piv";
        # }

        # Estonian ID card and Micardo driver currently play together with T=0
        # only. In theory only the 'cold' ATR should be specified, as T=0 will
        # be the preferred protocol once you boot it up with T=0, but be
        # paranoid.
        card_atr 3b:6e:00:ff:45:73:74:45:49:44:20:76:65:72:20:31:2e:30 {
                force_protocol = t0;
        }
        card_atr 
3b:fe:94:00:ff:80:b1:fa:45:1f:03:45:73:74:45:49:44:20:76:65:72:20:31:2e:30:43 {
                force_protocol = t0;
        }

        # D-Trust cards are also based on micardo and need T=0 for some reason
        card_atr 
3b:ff:94:00:ff:80:b1:fe:45:1f:03:00:68:d2:76:00:00:28:ff:05:1e:31:80:00:90:00:23
 {
                force_protocol = t0;
        }
        card_atr 
3b:ff:11:00:ff:80:b1:fe:45:1f:03:00:68:d2:76:00:00:28:ff:05:1e:31:80:00:90:00:a6
 {
                force_protocol = t0;
        }

        # Below are the framework specific configuration blocks.

        # PKCS #15
        framework pkcs15 {
                # Whether to use the cache files in the user's
                # home directory.
                #
                # At the moment you have to 'teach' the card
                # to the system by running command: pkcs15-tool -L
                #
                # WARNING: Caching shouldn't be used in setuid root
                # applications.
                # Default: false
                use_caching = true;

                # Enable pkcs15 emulation.
                # Default: yes
                # enable_pkcs15_emulation = no;
                #
                # Prefer pkcs15 emulation code before
                # the normal pkcs15 processing.
                # Default: no
                # try_emulation_first = yes;
                
                # Enable builtin emulators.
                # Default: yes
                # enable_builtin_emulation = no;
                #
                # List of the builtin pkcs15 emulators to test
                # Default: esteid, openpgp, tcos, starcert, infocamere, 
postecert, actalis, atrust-acos, gemsafeGPK, gemsafeV1, tccardos, PIV-II;
                # builtin_emulators = openpgp;

                # additional settings per driver
                #
                # For pkcs15 emulators loaded from an external shared
                # library/DLL, you need to specify the path name of the module
                # and customize the card_atr example above correctly.
                #
                # emulate custom {
                        # The location of the driver library
                        # module = /usr/lib/opensc/drivers/p15emu_custom.so;
                # }
                
                # workaround: use rsa decrypt operation for signing
                # some cardos cards need this, if initializes with certain
                # versions of the siemens software
                # we have an auto detection, but it is not 100% reliable,
                # so you can turn it off, if it misbehaves.
                # this option only affects cardos cards right now.
                # Default: yes
                # enable_sign_with_decrypt_workaround = no;

                # workaround: fix keyReference and pinReference values
                # OpenSC 0.11.4 and older have a bug: integers were not
                # properly encoded in asn.1 structures. So far only
                # starcos cards were found to have a problem with this,
                # and only these two values were found to be filled with
                # the wrong value.
                #
                # Fortunatly those values (if present) need to be positive.
                # Thus we can check if these are available and negative,
                # and if so fix them by adding 256 to get the correct value.
                #
                # To be on the safe side, this workaround/fix can be turned
                # off.
                #
                # Default: yes
                # enable_fix_asn1_integers = no;
        }
}

# Parameters for the OpenSC PKCS11 module
app opensc-pkcs11 {
        pkcs11 {
                # Should the module support hotplug of readers as per PKCS#11 
v2.20?
                # This affects slot changes and PC/SC PnP, as v2.11 applications
                # are not allowed to change the length of the slot list.
                # Default: true
                # plug_and_play = false;

                # Maximum Number of virtual slots.
                # If there are more slots than defined here,
                # the remaining slots will be hidden from PKCS#11.
                # Default: 16
                # max_virtual_slots = 1;

                # Maximum number of slots per smart card.
                # If the card has fewer keys than defined here,
                # the remaining number of slots will be empty.
                # Default: 4
                slots_per_card = 1;

                # (max_virtual_slots/slots_per_card) limits the number of 
readers
                # that can be used on the system. Default is then 16/4=4 
readers.

                # Normally, the pkcs11 module will create
                # the full number of slots defined above by
                # num_slots. If there are fewer pins/keys on
                # the card, the remaining keys will be empty
                # (and you will be able to create new objects
                # within them).
                # Default: true
                # hide_empty_tokens = false;

                # By default, the OpenSC PKCS#11 module will lock your card
                # once you authenticate to the card via C_Login.
                # This is to prevent other users or other applications
                # from connecting to the card and perform crypto operations
                # (which may be possible because you have already authenticated
                # with the card). Thus this setting is very secure.
                #
                # This behavior is a known violation of PKCS#11 specification,
                # and is forced due to limitation of the OpenSC framework.
                #
                # However now once one application has started using your
                # card with C_Login, no other application can use it, until
                # the first is done and calls C_Logout or C_Finalize.
                # In the case of many PKCS#11 application this does not happen
                # until you exit the application.  
                #
                # Thus it is impossible to use several smart card aware
                # applications at the same time, e.g. you cannot run both
                # Firefox and Thunderbird at the same time, if both are
                # configured to use your smart card.
                #
                # Default: true
                # lock_login = false;

                # Normally, the pkcs11 module will not cache PINs
                # presented via C_Login. However, some cards
                # may not work properly with OpenSC; for instance
                # when you have two keys on your card that get
                # stored in two different directories.
                #
                # In this case, you can turn on PIN caching by setting
                # cache_pins = true
                #
                # Default: true
                # cache_pins = false;

                # Set this value to true if you want to allow off-card
                # keypair generation (in software on your pc)
                #
                # Default: false
                # soft_keygen_allowed = true;
        }
}

app tokend {
        # Score for OpenSC.tokend
        framework tokend {
                score = 10;
        }
}
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to