Lines Matching refs:cert

179 	const CERT_CONTEXT *cert;
302 if (priv->cert)
303 CertFreeCertificateContext(priv->cert);
330 if (strncmp(name, "cert://", 7) == 0) {
365 X509 *cert = NULL;
371 (strncmp(name, "cert://", 7) != 0 &&
385 priv->cert = cryptoapi_find_cert(name, CERT_SYSTEM_STORE_CURRENT_USER);
386 if (priv->cert == NULL) {
387 priv->cert = cryptoapi_find_cert(
390 if (priv->cert == NULL) {
396 cert = d2i_X509(NULL, (OPENSSL_d2i_TYPE) &priv->cert->pbCertEncoded,
397 priv->cert->cbCertEncoded);
398 if (cert == NULL) {
407 if (!CryptAcquireCertificatePrivateKey(priv->cert,
433 if (!SSL_use_certificate(ssl, cert)) {
438 pub_rsa = cert->cert_info->key->pkey->pkey.rsa;
439 X509_free(cert);
440 cert = NULL;
454 if (cert)
455 X509_free(cert);
470 X509 *cert;
495 wpa_printf(MSG_DEBUG, "%s: failed to open system cert store "
502 cert = d2i_X509(NULL, (OPENSSL_d2i_TYPE) &ctx->pbCertEncoded,
504 if (cert == NULL) {
506 "X509 DER encoding for CA cert");
510 X509_NAME_oneline(X509_get_subject_name(cert), buf,
515 if (!X509_STORE_add_cert(ssl_ctx->cert_store, cert)) {
521 X509_free(cert);
525 wpa_printf(MSG_DEBUG, "%s: failed to close system cert store "
969 static int tls_match_altsubject_component(X509 *cert, int type,
976 ext = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
991 static int tls_match_altsubject(X509 *cert, const char *match)
1025 if (tls_match_altsubject_component(cert, type, pos, len) > 0)
1101 "cert already in hash table error",
1130 X509 *cert = d2i_X509(NULL, (OPENSSL_d2i_TYPE) &ca_cert_blob,
1132 if (cert == NULL) {
1138 if (!X509_STORE_add_cert(ssl_ctx->cert_store, cert)) {
1147 "cert already in hash table error",
1150 X509_free(cert);
1154 X509_free(cert);
1430 X509 *cert;
1436 cert = NULL;
1438 if (!PKCS12_parse(p12, passwd, &pkey, &cert, &certs)) {
1446 if (cert) {
1447 X509_NAME_oneline(X509_get_subject_name(cert), buf,
1452 if (SSL_use_certificate(ssl, cert) != 1)
1455 if (SSL_CTX_use_certificate(ssl_ctx, cert) != 1)
1458 X509_free(cert);
1474 while ((cert = sk_X509_pop(certs)) != NULL) {
1475 X509_NAME_oneline(X509_get_subject_name(cert), buf,
1480 * There is no SSL equivalent for the chain cert - so
1483 if (SSL_CTX_add_extra_chain_cert(ssl_ctx, cert) != 1) {