Lines Matching refs:cpk
210 CERT_PKEY *cpk = cert->pkeys + i; in ssl_cert_dup() local
212 if (cpk->x509 != NULL) { in ssl_cert_dup()
213 rpk->x509 = X509_up_ref(cpk->x509); in ssl_cert_dup()
216 if (cpk->privatekey != NULL) { in ssl_cert_dup()
217 rpk->privatekey = EVP_PKEY_up_ref(cpk->privatekey); in ssl_cert_dup()
220 if (cpk->chain) { in ssl_cert_dup()
221 rpk->chain = X509_chain_up_ref(cpk->chain); in ssl_cert_dup()
285 CERT_PKEY *cpk = c->pkeys + i; in ssl_cert_clear_certs() local
286 if (cpk->x509) { in ssl_cert_clear_certs()
287 X509_free(cpk->x509); in ssl_cert_clear_certs()
288 cpk->x509 = NULL; in ssl_cert_clear_certs()
290 if (cpk->privatekey) { in ssl_cert_clear_certs()
291 EVP_PKEY_free(cpk->privatekey); in ssl_cert_clear_certs()
292 cpk->privatekey = NULL; in ssl_cert_clear_certs()
294 if (cpk->chain) { in ssl_cert_clear_certs()
295 sk_X509_pop_free(cpk->chain, X509_free); in ssl_cert_clear_certs()
296 cpk->chain = NULL; in ssl_cert_clear_certs()
321 CERT_PKEY *cpk = c->key; in ssl_cert_set0_chain() local
322 if (!cpk) { in ssl_cert_set0_chain()
325 sk_X509_pop_free(cpk->chain, X509_free); in ssl_cert_set0_chain()
326 cpk->chain = chain; in ssl_cert_set0_chain()
350 CERT_PKEY *cpk = c->key; in ssl_cert_add0_chain_cert() local
351 if (!cpk) { in ssl_cert_add0_chain_cert()
355 if (!cpk->chain) { in ssl_cert_add0_chain_cert()
356 cpk->chain = sk_X509_new_null(); in ssl_cert_add0_chain_cert()
358 if (!cpk->chain || !sk_X509_push(cpk->chain, x)) { in ssl_cert_add0_chain_cert()
775 int ssl_add_cert_chain(SSL *s, CERT_PKEY *cpk, unsigned long *l) { in ssl_add_cert_chain() argument
780 X509 *x = cpk->x509; in ssl_add_cert_chain()
796 if (cpk && cpk->chain) { in ssl_add_cert_chain()
797 extra_certs = cpk->chain; in ssl_add_cert_chain()
843 CERT_PKEY *cpk = c->key; in ssl_build_cert_chain() local
850 if (!cpk->x509) { in ssl_build_cert_chain()
863 for (j = 0; j < sk_X509_num(cpk->chain); j++) { in ssl_build_cert_chain()
864 x = sk_X509_value(cpk->chain, j); in ssl_build_cert_chain()
876 if (!X509_STORE_add_cert(chain_store, cpk->x509)) { in ssl_build_cert_chain()
890 untrusted = cpk->chain; in ssl_build_cert_chain()
894 if (!X509_STORE_CTX_init(&xs_ctx, chain_store, cpk->x509, untrusted)) { in ssl_build_cert_chain()
922 if (cpk->chain) { in ssl_build_cert_chain()
923 sk_X509_pop_free(cpk->chain, X509_free); in ssl_build_cert_chain()
941 cpk->chain = chain; in ssl_build_cert_chain()