Lines Matching refs:privatekey

131     EVP_PKEY_free(c->pkeys[i].privatekey);  in ssl_set_pkey()
133 c->pkeys[i].privatekey = pkey; in ssl_set_pkey()
248 if (c->pkeys[i].privatekey != NULL) { in ssl_set_cert()
253 EVP_PKEY_copy_parameters(pkey, c->pkeys[i].privatekey); in ssl_set_cert()
256 if (!X509_check_private_key(x, c->pkeys[i].privatekey)) { in ssl_set_cert()
262 EVP_PKEY_free(c->pkeys[i].privatekey); in ssl_set_cert()
263 c->pkeys[i].privatekey = NULL; in ssl_set_cert()
884 static int ssl_set_cert_and_key(SSL *ssl, SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey, in ssl_set_cert_and_key() argument
912 if (privatekey == NULL) { in ssl_set_cert_and_key()
913 privatekey = pubkey; in ssl_set_cert_and_key()
916 if (EVP_PKEY_missing_parameters(privatekey)) { in ssl_set_cert_and_key()
923 EVP_PKEY_copy_parameters(privatekey, pubkey); in ssl_set_cert_and_key()
927 EVP_PKEY_copy_parameters(pubkey, privatekey); in ssl_set_cert_and_key()
931 if (EVP_PKEY_eq(pubkey, privatekey) != 1) { in ssl_set_cert_and_key()
942 || c->pkeys[i].privatekey != NULL in ssl_set_cert_and_key()
964 EVP_PKEY_free(c->pkeys[i].privatekey); in ssl_set_cert_and_key()
965 EVP_PKEY_up_ref(privatekey); in ssl_set_cert_and_key()
966 c->pkeys[i].privatekey = privatekey; in ssl_set_cert_and_key()
976 int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey, in SSL_use_cert_and_key() argument
979 return ssl_set_cert_and_key(ssl, NULL, x509, privatekey, chain, override); in SSL_use_cert_and_key()
982 int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey, in SSL_CTX_use_cert_and_key() argument
985 return ssl_set_cert_and_key(NULL, ctx, x509, privatekey, chain, override); in SSL_CTX_use_cert_and_key()