X509_check_private_key3ssl
Check the consistency of a private key with the public key in an x509 certificate or certificate request
Usage
#include <openssl/x509.h>int X509_check_private_key(const X509 *cert, EVP_PKEY *pkey);int X509_REQ_check_private_key(X509_REQ *req, EVP_PKEY *pkey);
Overview
X509_check_private_key() function checks the consistency of private key pkey with the public key in cert.
X509_REQ_check_private_key() is equivalent to X509_check_private_key() except that req represents a certificate request of structure X509_REQ.
Return values
X509_check_private_key() and X509_REQ_check_private_key() return 1 if the keys match each other, and 0 if not.
If the key is invalid or an error occurred, the reason code can be obtained using ERR_get_error(3).
Releases
5 releases since Debian 10 (Buster); the text changed 4 times.