Home
last modified time | relevance | path

Searched refs:cert (Results 1 – 25 of 38) sorted by relevance

12

/hal_espressif-3.4.0/components/wpa_supplicant/src/tls/
Dx509v3.c46 void x509_certificate_free(struct x509_certificate *cert) in x509_certificate_free() argument
48 if (cert == NULL) in x509_certificate_free()
50 if (cert->next) { in x509_certificate_free()
53 cert, cert->next); in x509_certificate_free()
55 x509_free_name(&cert->issuer); in x509_certificate_free()
56 x509_free_name(&cert->subject); in x509_certificate_free()
57 os_free(cert->public_key); in x509_certificate_free()
58 os_free(cert->sign_value); in x509_certificate_free()
59 os_free(cert); in x509_certificate_free()
67 void x509_certificate_chain_free(struct x509_certificate *cert) in x509_certificate_chain_free() argument
[all …]
Dtlsv1_cred.c31 x509_certificate_chain_free(cred->cert); in tlsv1_cred_free()
42 struct x509_certificate *cert, *p; in tlsv1_add_cert_der() local
45 cert = x509_certificate_parse(buf, len); in tlsv1_add_cert_der()
46 if (cert == NULL) { in tlsv1_add_cert_der()
55 if (p && x509_name_compare(&cert->subject, &p->issuer) == 0) { in tlsv1_add_cert_der()
60 p->next = cert; in tlsv1_add_cert_der()
63 cert->next = *chain; in tlsv1_add_cert_der()
64 *chain = cert; in tlsv1_add_cert_der()
67 x509_name_string(&cert->subject, name, sizeof(name)); in tlsv1_add_cert_der()
152 const char *cert, const u8 *cert_blob, in tlsv1_set_cert_chain() argument
[all …]
Dtlsv1_server_write.c28 struct x509_certificate *cert; in tls_server_cert_chain_der_len() local
30 cert = conn->cred->cert; in tls_server_cert_chain_der_len()
31 while (cert) { in tls_server_cert_chain_der_len()
32 len += 3 + cert->cert_len; in tls_server_cert_chain_der_len()
33 if (x509_certificate_self_signed(cert)) in tls_server_cert_chain_der_len()
35 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_server_cert_chain_der_len()
36 &cert->issuer); in tls_server_cert_chain_der_len()
162 struct x509_certificate *cert; in tls_write_server_certificate() local
191 cert = conn->cred->cert; in tls_write_server_certificate()
192 while (cert) { in tls_write_server_certificate()
[all …]
Dtlsv1_client_write.c28 struct x509_certificate *cert; in tls_client_cert_chain_der_len() local
33 cert = conn->cred->cert; in tls_client_cert_chain_der_len()
34 while (cert) { in tls_client_cert_chain_der_len()
35 len += 3 + cert->cert_len; in tls_client_cert_chain_der_len()
36 if (x509_certificate_self_signed(cert)) in tls_client_cert_chain_der_len()
38 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_client_cert_chain_der_len()
39 &cert->issuer); in tls_client_cert_chain_der_len()
166 struct x509_certificate *cert; in tls_write_client_certificate() local
187 cert = conn->cred ? conn->cred->cert : NULL; in tls_write_client_certificate()
188 while (cert) { in tls_write_client_certificate()
[all …]
Dx509v3.h108 void x509_certificate_free(struct x509_certificate *cert);
112 void x509_certificate_chain_free(struct x509_certificate *cert);
114 struct x509_certificate *cert);
121 int x509_certificate_self_signed(struct x509_certificate *cert);
Dtlsv1_cred.h14 struct x509_certificate *cert; member
27 int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert,
30 int tlsv1_set_cert(struct tlsv1_credentials *cred, const char *cert,
Dtlsv1_common.c168 struct x509_certificate *cert; in tls_parse_cert() local
177 cert = x509_certificate_parse(buf, len); in tls_parse_cert()
178 if (cert == NULL) { in tls_parse_cert()
196 *pk = crypto_public_key_import(cert->public_key, cert->public_key_len); in tls_parse_cert()
197 x509_certificate_free(cert); in tls_parse_cert()
Dtlsv1_client_read.c221 struct x509_certificate *chain = NULL, *last = NULL, *cert; in tls_process_certificate() local
347 cert = x509_certificate_parse(pos, cert_len); in tls_process_certificate()
348 if (cert == NULL) { in tls_process_certificate()
358 chain = cert; in tls_process_certificate()
360 last->next = cert; in tls_process_certificate()
361 last = cert; in tls_process_certificate()
/hal_espressif-3.4.0/components/openssl/library/
Dssl_cert.c26 CERT *cert; in __ssl_cert_new() local
31 cert = ssl_mem_zalloc(sizeof(CERT)); in __ssl_cert_new()
32 if (!cert) { in __ssl_cert_new()
45 cert->pkey = __EVP_PKEY_new(ipk); in __ssl_cert_new()
46 if (!cert->pkey) { in __ssl_cert_new()
51 cert->x509 = __X509_new(ix); in __ssl_cert_new()
52 if (!cert->x509) { in __ssl_cert_new()
57 return cert; in __ssl_cert_new()
60 EVP_PKEY_free(cert->pkey); in __ssl_cert_new()
62 ssl_mem_free(cert); in __ssl_cert_new()
[all …]
Dssl_x509.c84 X509* d2i_X509(X509 **cert, const unsigned char *buffer, long len) in d2i_X509() argument
93 if (cert && *cert) { in d2i_X509()
94 x = *cert; in d2i_X509()
194 if (ctx->cert->x509 == x) in SSL_CTX_use_certificate()
197 X509_free(ctx->cert->x509); in SSL_CTX_use_certificate()
199 ctx->cert->x509 = x; in SSL_CTX_use_certificate()
213 if (ssl->cert->x509 == x) in SSL_use_certificate()
216 X509_free(ssl->cert->x509); in SSL_use_certificate()
218 ssl->cert->x509 = x; in SSL_use_certificate()
235 return ssl->cert->x509; in SSL_get_certificate()
[all …]
Dssl_pkey.c190 if (ctx->cert->pkey == pkey) in SSL_CTX_use_PrivateKey()
193 if (ctx->cert->pkey) in SSL_CTX_use_PrivateKey()
194 EVP_PKEY_free(ctx->cert->pkey); in SSL_CTX_use_PrivateKey()
197 ctx->cert->pkey = pkey; in SSL_CTX_use_PrivateKey()
210 if (ssl->cert->pkey == pkey) in SSL_use_PrivateKey()
213 if (ssl->cert->pkey) in SSL_use_PrivateKey()
214 EVP_PKEY_free(ssl->cert->pkey); in SSL_use_PrivateKey()
216 ssl->cert->pkey = pkey; in SSL_use_PrivateKey()
Dssl_lib.c174 CERT *cert; in SSL_CTX_new() local
188 cert = ssl_cert_new(); in SSL_CTX_new()
189 if (!cert) { in SSL_CTX_new()
202 ctx->cert = cert; in SSL_CTX_new()
209 ssl_cert_free(cert); in SSL_CTX_new()
223 ssl_cert_free(ctx->cert); in SSL_CTX_free()
284 ssl->cert = __ssl_cert_new(ctx->cert); in SSL_new()
285 if (!ssl->cert) { in SSL_new()
317 ssl_cert_free(ssl->cert); in SSL_new()
337 ssl_cert_free(ssl->cert); in SSL_free()
[all …]
/hal_espressif-3.4.0/components/wpa_supplicant/src/crypto/
Dcrypto_mbedtls-rsa.c53 mbedtls_x509_crt *cert = os_zalloc(sizeof(mbedtls_x509_crt)); in crypto_verify_cert() local
56 if (!cert || !ca_cert) { in crypto_verify_cert()
57 if (cert) in crypto_verify_cert()
58 os_free(cert); in crypto_verify_cert()
64 mbedtls_x509_crt_init(cert); in crypto_verify_cert()
66 ret = mbedtls_x509_crt_parse(cert, cert_start, certlen); in crypto_verify_cert()
77 ret = mbedtls_x509_crt_verify(cert, ca_cert, NULL, NULL, &flags, NULL, NULL ); in crypto_verify_cert()
84 mbedtls_x509_crt_free(cert); in crypto_verify_cert()
87 os_free(cert); in crypto_verify_cert()
139 mbedtls_x509_crt *cert; in crypto_public_key_from_cert() local
[all …]
/hal_espressif-3.4.0/examples/protocols/https_server/simple/main/
Dmain.c48 const mbedtls_x509_crt *cert; in https_server_user_callback() local
57 cert = mbedtls_ssl_get_peer_cert(&user_cb->tls->ssl); in https_server_user_callback()
58 if (cert != NULL) { in https_server_user_callback()
59 mbedtls_x509_crt_info((char *) buf, buf_size - 1, " ", cert); in https_server_user_callback()
/hal_espressif-3.4.0/components/bt/common/btc/profile/esp/blufi/
Dblufi_prf.c459 dst->ca.cert = osi_malloc(src->ca.cert_len); in btc_blufi_cb_deep_copy()
460 if (dst->ca.cert == NULL) { in btc_blufi_cb_deep_copy()
463 memcpy(dst->ca.cert, src->ca.cert, src->ca.cert_len); in btc_blufi_cb_deep_copy()
466 dst->client_cert.cert = osi_malloc(src->client_cert.cert_len); in btc_blufi_cb_deep_copy()
467 if (dst->client_cert.cert == NULL) { in btc_blufi_cb_deep_copy()
470 memcpy(dst->client_cert.cert, src->client_cert.cert, src->client_cert.cert_len); in btc_blufi_cb_deep_copy()
473 dst->server_cert.cert = osi_malloc(src->server_cert.cert_len); in btc_blufi_cb_deep_copy()
474 if (dst->server_cert.cert == NULL) { in btc_blufi_cb_deep_copy()
477 memcpy(dst->server_cert.cert, src->server_cert.cert, src->server_cert.cert_len); in btc_blufi_cb_deep_copy()
527 osi_free(param->ca.cert); in btc_blufi_cb_deep_free()
[all …]
Dblufi_protocol.c203 param.ca.cert = &data[0]; in btc_blufi_protocol_handler()
212 param.client_cert.cert = &data[0]; in btc_blufi_protocol_handler()
221 param.client_cert.cert = &data[0]; in btc_blufi_protocol_handler()
/hal_espressif-3.4.0/components/mbedtls/port/dynamic/
Desp_mbedtls_dynamic_impl.c446 size_t esp_mbedtls_get_crt_size(mbedtls_x509_crt *cert, size_t *num) in esp_mbedtls_get_crt_size() argument
451 while (cert) { in esp_mbedtls_get_crt_size()
452 bytes += cert->raw.len; in esp_mbedtls_get_crt_size()
455 cert = cert->next; in esp_mbedtls_get_crt_size()
506 if (keycert->cert) { in esp_mbedtls_free_keycert_cert()
507 mbedtls_x509_crt_free(keycert->cert); in esp_mbedtls_free_keycert_cert()
508 keycert->cert = NULL; in esp_mbedtls_free_keycert_cert()
Desp_ssl_srv.c54 while (key_cert && key_cert->cert) { in manage_resource()
57 buffer_len += esp_mbedtls_get_crt_size(key_cert->cert, &num); in manage_resource()
Desp_ssl_cli.c96 while (key_cert && key_cert->cert) { in manage_resource()
99 buffer_len += esp_mbedtls_get_crt_size(key_cert->cert, &num); in manage_resource()
/hal_espressif-3.4.0/components/mbedtls/test/
Dtest_esp_crt_bundle.c72 mbedtls_x509_crt cert; member
101 mbedtls_x509_crt_init( &server->cert ); in server_setup()
107 ret = mbedtls_x509_crt_parse( &server->cert, server_cert_chain_pem_start, in server_setup()
147 if (( ret = mbedtls_ssl_conf_own_cert( &server->conf, &server->cert, &server->pkey ) ) != 0 ) { in server_setup()
205 mbedtls_x509_crt_free( &endpoint->cert ); in endpoint_teardown()
222 mbedtls_x509_crt_init( &client->cert ); in client_setup()
Dtest_rsa.c320 static void test_cert(const char *cert, const uint8_t *expected_output, size_t output_len);
341 static void test_cert(const char *cert, const uint8_t *expected_output, size_t output_len) in test_cert() argument
354 (const uint8_t *)cert, in test_cert()
355 strlen(cert)+1), in test_cert()
/hal_espressif-3.4.0/components/esp-tls/
DKconfig89 regarding server cert verification. The default behaviour should only be applicable when
90 no other option regarding the server cert verification is opted in the esp-tls config
101 Enables server verification with Intermediate CA cert, does not authenticate full chain
102 … of trust upto the root CA cert (After Enabling this option client only needs to have Intermediate
103 CA certificate of the server to authenticate server, root CA cert is not necessary).
/hal_espressif-3.4.0/components/openssl/include/internal/
Dssl_x509.h55 X509* d2i_X509(X509 **cert, const unsigned char *buffer, long len);
145 X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **cert, pem_password_cb *cb, void *u);
/hal_espressif-3.4.0/components/bt/common/api/include/api/
Desp_blufi_api.h241 uint8_t *cert; /*!< CA certificate point */ member
249 uint8_t *cert; /*!< Client certificate point */ member
257 uint8_t *cert; /*!< Client certificate point */ member
/hal_espressif-3.4.0/examples/protocols/https_server/simple/
Dexample_test.py129 with open(CLIENT_CERT_FILE, 'w') as cert, open(CLIENT_KEY_FILE, 'w') as key:
130 cert.write(client_cert_pem)

12