Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sm2双证书的EC格式签名私钥,转为pkcs#8格式报错 #664

Open
Smiliny opened this issue Nov 2, 2024 · 0 comments
Open

sm2双证书的EC格式签名私钥,转为pkcs#8格式报错 #664

Smiliny opened this issue Nov 2, 2024 · 0 comments

Comments

@Smiliny
Copy link

Smiliny commented Nov 2, 2024

此国密站点双证书为四川CA所颁发。
国密的签名EC格式私钥开头都带了如下参数:

ASN1 OID: sm2p256v1
NIST CURVE: SM2
-----BEGIN EC PARAMETERS-----
BggqgRzPVQGCLQ==
-----END EC PARAMETERS-----

用openssl转换格式到pkcs8时报错,用tongsuo转换时也报了一样的错。
openssl pkcs8 -topk8 -in sign.key -out enc_pkcs8.pem -nocrypt

Could not read key from sign.key
4087A30EDC7F0000:error:1608010C:STORE routines:ossl_store_handle_load_result:unsupported:../crypto/store/store_result.c:151:
4087A30EDC7F0000:error:1608010C:STORE routines:ossl_store_handle_load_result:unsupported:../crypto/store/store_result.c:151:
4087A30EDC7F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode.

请问用tongsuo怎样才能转换国密的EC格式密钥?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant