如何讓Acer 桌機內建晶片讀卡機讀取自然人憑證 [論壇 - Ubuntu硬體支援]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



如何讓Acer 桌機內建晶片讀卡機讀取自然人憑證
會員三級
註冊日期:
2007/7/3 16:11
所屬群組:
已註冊使用者
等級: 13
HP : 0 / 302
MP : 66 / 14377
EXP: 11
離線
自然人憑證無法用在宏碁新桌機 M4690G正常讀取
我在新買的這部Acer Veriton M4690G電腦安裝了 Ubuntu 22.04 ,做成雙系統。
它有內建晶片讀卡機,像是通用的ccid ,在 Windows 10 不用裝區驅動程式,因為我在Ubuntu 開 Virtual box 裝的 Win 10 虛擬機也能正常讀卡可見晶片憑證卡和讀卡機都沒壞。因為工作多半在Linux 下做,我不想為了收公文,就又要切換到 Windows,
但要在 Ubuntu Linux 用自然人憑證在認證確卻有問題,我已安裝了 pcscd 及 pcsc-tools ,並在這裡下載了 內政部跨平台網頁元件 Linux 版,
https://moica.nat.gov.tw/rac_plugin.html

,我啟動了 pcscd
sudo service pcscd start

然後我進入了內政部跨平台網頁元件已下載資料夾內,並啟動服務
sh start.sh
終端機有回應了 Server has started at 127.0.0.1:61161
用 pcsc_scan 有回應 card inserted

但是當我用 http://localhost:61161/selfTest.htm
去檢測時,它回應「卡片未插」,但其實有插,因為我用 grub 啟動 Windows ,在 Windows 是正常讀取的。
請問要如何才能在 Linux 中正常使用宏碁電腦的內建讀卡機呢?

附註
1. 使用 pcsc_scan 檢測:
Using reader plug'n play mechanism
Scanning present readers...
0: Generic USB2.0-CRW [Smart Card Reader Interface] (20070818000000000) 00 00

Thu Jan 12 16:58:08 2023
Reader 0: Generic USB2.0-CRW [Smart Card Reader Interface] (20070818000000000) 00 00
Event number: 0
Card state: Card inserted,
ATR: 3B D8 96 00 81 B1 FE 45 1F 07 43 48 54 47 50 4B 49 4A DD

ATR: 3B D8 96 00 81 B1 FE 45 1F 07 43 48 54 47 50 4B 49 4A DD
+ TS = 3B --> Direct Convention
+ T0 = D8, Y(1): 1101, K: 8 (historical bytes)
TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU
250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s
TC(1) = 00 --> Extra guard time: 0
TD(1) = 81 --> Y(i+1) = 1000, Protocol T = 1
-----
TD(2) = B1 --> Y(i+1) = 1011, Protocol T = 1
-----
TA(3) = FE --> IFSC: 254
TB(3) = 45 --> Block Waiting Integer: 4 - Character Waiting Integer: 5
TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
-----
TA(4) = 07 --> Clock stop: not supported - Class accepted by the card: (3G) A 5V B 3V C 1.8V
+ Historical bytes: 43 48 54 47 50 4B 49 4A
Category indicator byte: 43 (proprietary format)
+ TCK = DD (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B D8 96 00 81 B1 FE 45 1F 07 43 48 54 47 50 4B 49 4A DD
Citizen Digital Certificate, Taiwan (PKI)
http://moica.nat.gov.tw/

2. 檢測 內政部跨平台網頁元件執行
curl -X POST http://127.0.0.1:61161/pkcs11info
回應
{"cryptokiVersion":2.04,"flags":0,"func":"pkcs11info","last_error":0,"libraryDescription":"CHT PKCS#11 3.1.0.00009","libraryVersion":3.003,"manufacturerID":"Chunghwa TeleComm TL","ret_code":0,"slots":[],"version":"2.3.3","serverVersion":"1.3.4.7","installedModule":[{"version":"1.1.9","description":"CardManagement"},{"version":"1.3.4.7","description":"HiPKILocalSignServer"}]}cashier@2023-cashier:~$

再用

curl 'http://127.0.0.1:61161/sign' --data-binary '
tbsPackage={
"tbs":"TBS",
"hashAlgorithm":"SHA256",
"pin":"1234",
"func":"MakeSignature",
"signatureType":"PKCS11",
"slotDescription":"Generic USB2.0-CRW [Smart Card Reader Interface] (20070818000000000) 00 00"
}'

得到回應
{"func":"sign","last_error":0,"ret_code":1979711494,"version":"2.5.5","message":"未插入IC卡"}

Hicos 應是有偵測到讀卡機,但沒有偵測到插在裡面卡片。請問要如何修改設定呢?

1/14 10:50:13
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.