从PKCS11和asn1加密签名证书提取公钥时出错

2024-10-03 11:26:18 发布

您现在位置:Python中文网/ 问答频道 /正文

除了这个线程:Where is the trust chain? [python] asn1crypto and pkcs11 Aladdin USB eToken

我试过了:

openssl x509 -pubkey -noout -in cert.pem 
Error getting public key
140003854860736:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag:../crypto/asn1/tasn_dec.c:1129:
140003854860736:error:0D06C03A:asn1 encoding routines:asn1_d2i_ex_primitive:nested asn1 error:../crypto/asn1/tasn_dec.c:693:
140003854860736:error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:../crypto/asn1/tasn_dec.c:626:Field=n, Type=RSA
140003854860736:error:0408B004:rsa routines:rsa_pub_decode:RSA lib:../crypto/rsa/rsa_ameth.c:51:
140003854860736:error:0B09407D:x509 certificate routines:x509_pubkey_decode:public key decode error:../crypto/x509/x_pubkey.c:124:

此文件的内容是:

^{2}$

这个文件或者那个线程的代码有什么问题?我无法提取公钥。在


Tags: keyerrorpubliccrypto线程rsadecencoding