pkcs11-tool падает в модуле librtpkcs11ecp.so
# rpm -qf /usr/bin/pkcs11-tool
opensc-0.19.0-4.el7_9.x86_64
# pkcs11-tool --module=/usr/lib64/librtpkcs11ecp.so --test --login --pin 12345678
Using slot 0 with a present token (0x0)
C_SeedRandom() and C_GenerateRandom():
seeding (C_SeedRandom) not supported
ERR: C_GenerateRandom(buf1,0) failed: CKR_ARGUMENTS_BAD (0x7)
Digests:
all 4 digest functions seem to work
MD5: OK
SHA-1: OK
Signatures (currently only for RSA)
testing key 0 ()
all 4 signature functions seem to work
testing signature mechanisms:
RSA-X-509: OK
RSA-PKCS: OK
SHA1-RSA-PKCS: OK
MD5-RSA-PKCS: OK
SHA256-RSA-PKCS: OK
Verify (currently only for RSA)
testing key 0 ()
RSA-X-509: OK
RSA-PKCS: OK
SHA1-RSA-PKCS: OK
MD5-RSA-PKCS: OK
Key unwrap (currently only for RSA)
testing key 0 ()
ERR: C_UnwrapKey failed: CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2)
ERR: C_UnwrapKey failed: CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2)
ERR: C_UnwrapKey failed: CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2)
ERR: C_UnwrapKey failed: CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2)
DES-CBC: DES-EDE3-CBC: BF-CBC: CAST5-CFB: Decryption (currently only for RSA)
testing key 0 ()
Ошибка сегментирования
gdb показывает это
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6d02b48 in __memmove_ssse3_back () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6d02b48 in __memmove_ssse3_back () from /lib64/libc.so.6
#1 0x00007ffff68b91bf in ?? () from /usr/lib64/librtpkcs11ecp.so
#2 0x00007ffff68b99ed in ?? () from /usr/lib64/librtpkcs11ecp.so
#3 0x00007ffff68640ef in C_DecryptInit () from /usr/lib64/librtpkcs11ecp.so
#4 0x000000000040ebfb in encrypt_decrypt ()
#5 0x0000000000410b0a in p11_test ()
#6 0x00000000004056a2 in main ()