Skip to content

Why is the value of public key type -1 after loading the SM2 certificate? #23993

Answered by t8m
liu-allen asked this question in Q&A
Discussion options

You must be logged in to vote

This is expected. The -1 value is EVP_PKEY_KEYMGMT which means the key is held by a provider. You can check if it has SM2 type by using the EVP_PKEY_is_a() function.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by t8m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants