_S пишет:Приведите пожалуйста результаты выполнения команды (на библиотеках PKCS#11, которые у Вас не работают)
$ pkcs11-tool --module /home/james/librtpkcs11ecp.so -O --login
на librtpkcs11ecp.so актуальной версии и ubuntu 14.04.1:
$ pkcs11-tool --module /usr/lib/librtpkcs11ecp.so -O --login
Using slot 0 with a present token (0x0)
Logging in to "my".
Please enter User PIN:
Private Key Object; RSA
label: ********-****-****-722553062220_E
ID: *******************************************************92d3732323535333036323232305f45
Usage: decrypt, sign, derive
Public Key Object; RSA 1024 bits
label: ********-****-****-722553062220_E
ID: *******************************************************92d3732323535333036323232305f45
Usage: encrypt, verify
Certificate Object, type = X.509 cert
label: ********-****-****-722553062220_E
ID: *******************************************************92d3732323535333036323232305f45
# openvpn --verb 11 --show-pkcs11-ids /usr/lib/librtpkcs11ecp.so
Wed Feb 25 11:01:23 2015 us=436622 PKCS#11: pkcs11h_addProvider entry version='1.11', pid=7237, reference='/usr/lib/librtpkcs11ecp.so', provider_location='/usr/lib/librtpkcs11ecp.so', allow_protected_auth=1, mask_private_mode=00000000, cert_is_private=0
Wed Feb 25 11:01:23 2015 us=436693 PKCS#11: Adding provider '/usr/lib/librtpkcs11ecp.so'-'/usr/lib/librtpkcs11ecp.so'
Wed Feb 25 11:01:23 2015 us=439422 PKCS#11: __pkcs11h_forkFixup entry pid=7239, activate_slotevent=0
Wed Feb 25 11:01:23 2015 us=439498 PKCS#11: __pkcs11h_forkFixup return
Wed Feb 25 11:01:23 2015 us=439508 PKCS#11: pkcs11h_terminate entry
Wed Feb 25 11:01:23 2015 us=439515 PKCS#11: Terminating openssl
Wed Feb 25 11:01:23 2015 us=439522 PKCS#11: _pkcs11h_openssl_terminate
Wed Feb 25 11:01:23 2015 us=439529 PKCS#11: Removing providers
Wed Feb 25 11:01:23 2015 us=439536 PKCS#11: Releasing sessions
Wed Feb 25 11:01:23 2015 us=439543 PKCS#11: Terminating slotevent
Wed Feb 25 11:01:23 2015 us=439550 PKCS#11: _pkcs11h_slotevent_terminate entry
Wed Feb 25 11:01:23 2015 us=439557 PKCS#11: _pkcs11h_slotevent_terminate return
Wed Feb 25 11:01:23 2015 us=439564 PKCS#11: Marking as uninitialized
Wed Feb 25 11:01:23 2015 us=468311 PKCS#11: pkcs11h_addProvider Provider '/usr/lib/librtpkcs11ecp.so' manufacturerID 'Aktiv Co.'
Wed Feb 25 11:01:23 2015 us=468341 PKCS#11: _pkcs11h_slotevent_notify entry
Wed Feb 25 11:01:23 2015 us=468349 PKCS#11: _pkcs11h_slotevent_notify return
Wed Feb 25 11:01:23 2015 us=468357 PKCS#11: Provider '/usr/lib/librtpkcs11ecp.so' added rv=0-'CKR_OK'
Wed Feb 25 11:01:23 2015 us=468364 PKCS#11: pkcs11h_addProvider return rv=0-'CKR_OK'
Wed Feb 25 11:01:23 2015 us=468373 PKCS#11: pkcs11h_certificate_enumCertificateIds entry method=1, mask_prompt=00000003, p_cert_id_issuers_list=(nil), p_cert_id_end_list=0x7fffe3909758
Wed Feb 25 11:01:23 2015 us=468383 PKCS#11: _pkcs11h_session_getSlotList entry provider=0x7ffea0533620, token_present=1, pSlotList=0x7fffe39095f0, pulCount=0x7fffe39095f8
Wed Feb 25 11:01:23 2015 us=468791 PKCS#11: __pkcs11h_forkFixup entry pid=7247, activate_slotevent=0
Wed Feb 25 11:01:23 2015 us=468886 PKCS#11: __pkcs11h_forkFixup return
Wed Feb 25 11:01:23 2015 us=468895 PKCS#11: pkcs11h_terminate entry
Wed Feb 25 11:01:23 2015 us=468902 PKCS#11: Terminating openssl
Wed Feb 25 11:01:23 2015 us=468909 PKCS#11: _pkcs11h_openssl_terminate
Wed Feb 25 11:01:23 2015 us=468916 PKCS#11: Removing providers
Wed Feb 25 11:01:23 2015 us=468924 PKCS#11: pkcs11h_removeProvider entry reference='/usr/lib/librtpkcs11ecp.so'
Wed Feb 25 11:01:23 2015 us=468931 PKCS#11: Removing provider '/usr/lib/librtpkcs11ecp.so'
Wed Feb 25 11:01:23 2015 us=469896 PKCS#11: _pkcs11h_slotevent_notify entry
Wed Feb 25 11:01:23 2015 us=469910 PKCS#11: _pkcs11h_slotevent_notify return
Wed Feb 25 11:01:23 2015 us=469928 PKCS#11: pkcs11h_removeProvider return rv=0-'CKR_OK'
Wed Feb 25 11:01:23 2015 us=469936 PKCS#11: Releasing sessions
Wed Feb 25 11:01:23 2015 us=469943 PKCS#11: Terminating slotevent
Wed Feb 25 11:01:23 2015 us=469950 PKCS#11: _pkcs11h_slotevent_terminate entry
Wed Feb 25 11:01:23 2015 us=469957 PKCS#11: _pkcs11h_slotevent_terminate return
Wed Feb 25 11:01:23 2015 us=469964 PKCS#11: Marking as uninitialized
Wed Feb 25 11:01:23 2015 us=484493 PKCS#11: _pkcs11h_session_getSlotList return rv=0-'CKR_OK' *pulCount=0
Wed Feb 25 11:01:23 2015 us=484576 PKCS#11: __pkcs11h_certificate_splitCertificateIdList entry cert_id_all=(nil), p_cert_id_issuers_list=(nil), p_cert_id_end_list=0x7fffe3909758
Wed Feb 25 11:01:23 2015 us=484613 PKCS#11: __pkcs11h_certificate_splitCertificateIdList return rv=0-'CKR_OK'
Wed Feb 25 11:01:23 2015 us=484648 PKCS#11: pkcs11h_certificate_enumCertificateIds return rv=0-'CKR_OK'
The following objects are available for use.
Each object shown below may be used as parameter to
--pkcs11-id option please remember to use single quote mark.
Wed Feb 25 11:01:23 2015 us=484769 PKCS#11: pkcs11h_terminate entry
Wed Feb 25 11:01:23 2015 us=484804 PKCS#11: Terminating openssl
Wed Feb 25 11:01:23 2015 us=484842 PKCS#11: _pkcs11h_openssl_terminate
Wed Feb 25 11:01:23 2015 us=484875 PKCS#11: Removing providers
Wed Feb 25 11:01:23 2015 us=484930 PKCS#11: pkcs11h_removeProvider entry reference='/usr/lib/librtpkcs11ecp.so'
Wed Feb 25 11:01:23 2015 us=484965 PKCS#11: Removing provider '/usr/lib/librtpkcs11ecp.so'
Wed Feb 25 11:01:23 2015 us=486923 PKCS#11: _pkcs11h_slotevent_notify entry
Wed Feb 25 11:01:23 2015 us=487053 PKCS#11: _pkcs11h_slotevent_notify return
Wed Feb 25 11:01:23 2015 us=487097 PKCS#11: pkcs11h_removeProvider return rv=0-'CKR_OK'
Wed Feb 25 11:01:23 2015 us=487126 PKCS#11: Releasing sessions
Wed Feb 25 11:01:23 2015 us=487155 PKCS#11: Terminating slotevent
Wed Feb 25 11:01:23 2015 us=487185 PKCS#11: _pkcs11h_slotevent_terminate entry
Wed Feb 25 11:01:23 2015 us=487218 PKCS#11: _pkcs11h_slotevent_terminate return
Wed Feb 25 11:01:23 2015 us=487250 PKCS#11: Marking as uninitialized
для библиотеки версии 1.1.4.0 вывод pkcs11-tool аналогичный. вывод openvpn --show-pkcs11-ids:
# openvpn --verb 11 --show-pkcs11-ids /home/ubuntu/Downloads/librtpkcs11ecp.so
Wed Feb 25 11:12:53 2015 us=953969 PKCS#11: pkcs11h_addProvider entry version='1.11', pid=7945, reference='/home/ubuntu/Downloads/librtpkcs11ecp.so', provider_location='/home/ubuntu/Downloads/librtpkcs11ecp.so', allow_protected_auth=1, mask_private_mode=00000000, cert_is_private=0
Wed Feb 25 11:12:53 2015 us=954049 PKCS#11: Adding provider '/home/ubuntu/Downloads/librtpkcs11ecp.so'-'/home/ubuntu/Downloads/librtpkcs11ecp.so'
Wed Feb 25 11:12:53 2015 us=956817 PKCS#11: __pkcs11h_forkFixup entry pid=7947, activate_slotevent=0
Wed Feb 25 11:12:53 2015 us=956884 PKCS#11: __pkcs11h_forkFixup return
Wed Feb 25 11:12:53 2015 us=956893 PKCS#11: pkcs11h_terminate entry
Wed Feb 25 11:12:53 2015 us=956900 PKCS#11: Terminating openssl
Wed Feb 25 11:12:53 2015 us=956909 PKCS#11: _pkcs11h_openssl_terminate
Wed Feb 25 11:12:53 2015 us=956917 PKCS#11: Removing providers
Wed Feb 25 11:12:53 2015 us=956923 PKCS#11: Releasing sessions
Wed Feb 25 11:12:53 2015 us=956930 PKCS#11: Terminating slotevent
Wed Feb 25 11:12:53 2015 us=956936 PKCS#11: _pkcs11h_slotevent_terminate entry
Wed Feb 25 11:12:53 2015 us=956943 PKCS#11: _pkcs11h_slotevent_terminate return
Wed Feb 25 11:12:53 2015 us=956950 PKCS#11: Marking as uninitialized
Wed Feb 25 11:12:53 2015 us=978995 PKCS#11: pkcs11h_addProvider Provider '/home/ubuntu/Downloads/librtpkcs11ecp.so' manufacturerID 'Aktiv Co.'
Wed Feb 25 11:12:53 2015 us=979032 PKCS#11: _pkcs11h_slotevent_notify entry
Wed Feb 25 11:12:53 2015 us=979040 PKCS#11: _pkcs11h_slotevent_notify return
Wed Feb 25 11:12:53 2015 us=979048 PKCS#11: Provider '/home/ubuntu/Downloads/librtpkcs11ecp.so' added rv=0-'CKR_OK'
Wed Feb 25 11:12:53 2015 us=979055 PKCS#11: pkcs11h_addProvider return rv=0-'CKR_OK'
Wed Feb 25 11:12:53 2015 us=979065 PKCS#11: pkcs11h_certificate_enumCertificateIds entry method=1, mask_prompt=00000003, p_cert_id_issuers_list=(nil), p_cert_id_end_list=0x7fff93284338
Wed Feb 25 11:12:53 2015 us=979074 PKCS#11: _pkcs11h_session_getSlotList entry provider=0x7f2e25ece620, token_present=1, pSlotList=0x7fff932841d0, pulCount=0x7fff932841d8
Wed Feb 25 11:12:53 2015 us=979497 PKCS#11: __pkcs11h_forkFixup entry pid=7953, activate_slotevent=0
Wed Feb 25 11:12:53 2015 us=979577 PKCS#11: __pkcs11h_forkFixup return
Wed Feb 25 11:12:53 2015 us=979587 PKCS#11: pkcs11h_terminate entry
Wed Feb 25 11:12:53 2015 us=979594 PKCS#11: Terminating openssl
Wed Feb 25 11:12:53 2015 us=979603 PKCS#11: _pkcs11h_openssl_terminate
Wed Feb 25 11:12:53 2015 us=979610 PKCS#11: Removing providers
Wed Feb 25 11:12:53 2015 us=979622 PKCS#11: pkcs11h_removeProvider entry reference='/home/ubuntu/Downloads/librtpkcs11ecp.so'
Wed Feb 25 11:12:53 2015 us=979632 PKCS#11: Removing provider '/home/ubuntu/Downloads/librtpkcs11ecp.so'
и процесс виснет, прервать невозможно