Replies: 1 comment
-
You can use EVP_PKEY_private_check() to validate the private component of the key given by ctx. ...
EVP_PKEY *pkey = ...
...
EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(pkey, NULL);
if (!ctx) {
fprintf(stderr, "Failed to get a ctx\n");
return 1;
}
fprintf(stdout, "pkey is a %s key\n",
EVP_PKEY_private_check(ctx) ? "private":"public");
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all
How I can check an
EVP_PKEY
contains a private key or not? I cannot find anything corresponding to provider key management's_has()
method from public API.Beta Was this translation helpful? Give feedback.
All reactions