我正在尝试在 CentOS 上使用智能卡,但遇到了问题。我正在使用 OpenSC,我需要实现一个特殊模块来使用我的智能卡(libgtop11dotnet)。它在 CentOS 上不起作用,但我在 Ubuntu 上测试过,它可以工作。我更改了 opensc.conf 和 pam_pkcs11.conf 以便能够使用我的模块 (libgtop11donet)。命令“pklogin_finder debug”返回有关卡的信息(但在 CentOS 上没有)。我试图在 CentOS 上实现相同的修改,但我认为 NSS 数据库 (/etc/pki/nssdb) 阻止了我(Ubuntu 不需要它)。我尝试使用 modutil 实现模块,但它没有改变任何东西。
以下是两个 [pklogin_finder debug] 命令之间的区别:
乌本图:
DEBUG:pam_config.c:248: Using config file /etc/pam_pkcs11/pam_pkcs11.conf
DEBUG:pklogin_finder.c:71: loading pkcs #11 module...
DEBUG:pkcs11_lib.c:973: PKCS #11 module = [/usr/local/lib/libgtop11dotnet.so]
DEBUG:pkcs11_lib.c:990: module permissions: uid = 0, gid = 0, mode = 755
DEBUG:pkcs11_lib.c:999: loading module /usr/local/lib/libgtop11dotnet.so
DEBUG:pkcs11_lib.c:1007: getting function list
DEBUG:pklogin_finder.c:79: initialising pkcs #11 module...
DEBUG:pkcs11_lib.c:1155: module information:
DEBUG:pkcs11_lib.c:1156: - version: 2.20
DEBUG:pkcs11_lib.c:1157: - manufacturer: Gemalto
DEBUG:pkcs11_lib.c:1158: - flags: 0000
DEBUG:pkcs11_lib.c:1159: - library description: Gemalto .NET PKCS11
DEBUG:pkcs11_lib.c:1160: - library version: 2.2
DEBUG:pkcs11_lib.c:1050: number of slots (a): 5
DEBUG:pkcs11_lib.c:1073: number of slots (b): 5
DEBUG:pkcs11_lib.c:1086: slot 1:
DEBUG:pkcs11_lib.c:1096: - description: Precise Biometrics Sense MC 00 00
DEBUG:pkcs11_lib.c:1097: - manufacturer: Unknown
DEBUG:pkcs11_lib.c:1098: - flags: 0006
DEBUG:pkcs11_lib.c:1086: slot 2:
DEBUG:pkcs11_lib.c:1096: - description: empty
DEBUG:pkcs11_lib.c:1097: - manufacturer: Unknown
DEBUG:pkcs11_lib.c:1098: - flags: 0006
DEBUG:pkcs11_lib.c:1086: slot 3:
DEBUG:pkcs11_lib.c:1096: - description: empty
DEBUG:pkcs11_lib.c:1097: - manufacturer: Unknown
DEBUG:pkcs11_lib.c:1098: - flags: 0006
DEBUG:pkcs11_lib.c:1086: slot 4:
DEBUG:pkcs11_lib.c:1096: - description: empty
DEBUG:pkcs11_lib.c:1097: - manufacturer: Unknown
DEBUG:pkcs11_lib.c:1098: - flags: 0006
DEBUG:pkcs11_lib.c:1086: slot 5:
DEBUG:pkcs11_lib.c:1096: - description: empty
DEBUG:pkcs11_lib.c:1097: - manufacturer: Unknown
DEBUG:pkcs11_lib.c:1098: - flags: 0006
DEBUG:pklogin_finder.c:95: no token available ***(or certificate's infos if the card is INSERTED)***
CentOS:
DEBUG:pam_config.c:238: Using config file /etc/pam_pkcs11/pam_pkcs11.conf
DEBUG:pkcs11_lib.c:182: Initializing NSS ...
DEBUG:pkcs11_lib.c:192: Initializing NSS ... database=/etc/pki/nssdb
DEBUG:pkcs11_lib.c:210: ... NSS Complete
DEBUG:pklogin_finder.c:71: loading pkcs #11 module...
DEBUG:pkcs11_lib.c:235: Looking up module in list
DEBUG:pkcs11_lib.c:238: modList = 0x18bddf0 next = 0x0
DEBUG:pkcs11_lib.c:239: dllName= <null>
DEBUG:pkcs11_lib.c:285: loading Module explictly, moduleSpec=<library="/usr/local/lib/libgtop11dotnet.so" name="SmartCard"> module=/usr/local/lib/libgtop11dotnet.so
DEBUG:pkcs11_lib.c:299: load module complete
DEBUG:pklogin_finder.c:79: initialising pkcs #11 module...
***(pklogin_finder is pending or print "DEBUG:pklogin_finder.c:95: no token available" if the card is INSERTED)***
为什么它在 Ubuntu (18.4) 上运行,但在 CentOS (7.4) 上运行不出来?
提前致谢,