/hal_espressif-3.6.0/components/mbedtls/port/dynamic/ |
D | esp_mbedtls_dynamic_impl.c | 45 static void esp_mbedtls_parse_record_header(mbedtls_ssl_context *ssl) in esp_mbedtls_parse_record_header() argument 47 ssl->in_msgtype = ssl->in_hdr[0]; in esp_mbedtls_parse_record_header() 48 ssl->in_msglen = (ssl->in_len[0] << 8) | ssl->in_len[1]; in esp_mbedtls_parse_record_header() 51 static int tx_buffer_len(mbedtls_ssl_context *ssl, int len) in tx_buffer_len() argument 53 (void)ssl; in tx_buffer_len() 66 static void init_tx_buffer(mbedtls_ssl_context *ssl, unsigned char *buf) in init_tx_buffer() argument 72 int out_msg_off = (int)ssl->out_msg - (int)ssl->out_buf; in init_tx_buffer() 78 ssl->out_buf = NULL; in init_tx_buffer() 79 ssl->out_ctr = NULL; in init_tx_buffer() 80 ssl->out_hdr = NULL; in init_tx_buffer() [all …]
|
D | esp_ssl_tls.c | 10 int __real_mbedtls_ssl_write(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len); 11 int __real_mbedtls_ssl_read(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len); 12 void __real_mbedtls_ssl_free(mbedtls_ssl_context *ssl); 13 int __real_mbedtls_ssl_session_reset(mbedtls_ssl_context *ssl); 14 int __real_mbedtls_ssl_setup(mbedtls_ssl_context *ssl, const mbedtls_ssl_config *conf); 15 int __real_mbedtls_ssl_send_alert_message(mbedtls_ssl_context *ssl, unsigned char level, unsigned c… 16 int __real_mbedtls_ssl_close_notify(mbedtls_ssl_context *ssl); 18 int __wrap_mbedtls_ssl_write(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len); 19 int __wrap_mbedtls_ssl_read(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len); 20 void __wrap_mbedtls_ssl_free(mbedtls_ssl_context *ssl); [all …]
|
D | esp_ssl_cli.c | 10 int __real_mbedtls_ssl_handshake_client_step(mbedtls_ssl_context *ssl); 12 int __wrap_mbedtls_ssl_handshake_client_step(mbedtls_ssl_context *ssl); 16 static int manage_resource(mbedtls_ssl_context *ssl, bool add) in manage_resource() argument 18 int state = add ? ssl->state : ssl->state - 1; in manage_resource() 20 if (ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->handshake == NULL) { in manage_resource() 25 if (!ssl->out_left) { in manage_resource() 26 CHECK_OK(esp_mbedtls_free_tx_buffer(ssl)); in manage_resource() 37 CHECK_OK(esp_mbedtls_add_tx_buffer(ssl, buffer_len)); in manage_resource() 44 CHECK_OK(esp_mbedtls_add_rx_buffer(ssl)); in manage_resource() 46 CHECK_OK(esp_mbedtls_free_rx_buffer(ssl)); in manage_resource() [all …]
|
D | esp_ssl_srv.c | 9 int __real_mbedtls_ssl_handshake_server_step(mbedtls_ssl_context *ssl); 11 int __wrap_mbedtls_ssl_handshake_server_step(mbedtls_ssl_context *ssl); 15 static int manage_resource(mbedtls_ssl_context *ssl, bool add) in manage_resource() argument 17 int state = add ? ssl->state : ssl->state - 1; in manage_resource() 19 if (ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->handshake == NULL) { in manage_resource() 24 if (!ssl->out_left) { in manage_resource() 25 CHECK_OK(esp_mbedtls_free_tx_buffer(ssl)); in manage_resource() 31 ssl->major_ver = MBEDTLS_SSL_MAJOR_VERSION_3; in manage_resource() 35 CHECK_OK(esp_mbedtls_add_rx_buffer(ssl)); in manage_resource() 37 CHECK_OK(esp_mbedtls_free_rx_buffer(ssl)); in manage_resource() [all …]
|
D | esp_mbedtls_dynamic_impl.h | 53 int esp_mbedtls_setup_tx_buffer(mbedtls_ssl_context *ssl); 55 void esp_mbedtls_setup_rx_buffer(mbedtls_ssl_context *ssl); 57 int esp_mbedtls_reset_add_tx_buffer(mbedtls_ssl_context *ssl); 59 int esp_mbedtls_reset_add_rx_buffer(mbedtls_ssl_context *ssl); 61 int esp_mbedtls_reset_free_tx_buffer(mbedtls_ssl_context *ssl); 63 void esp_mbedtls_reset_free_rx_buffer(mbedtls_ssl_context *ssl); 65 int esp_mbedtls_add_tx_buffer(mbedtls_ssl_context *ssl, size_t buffer_len); 67 int esp_mbedtls_add_rx_buffer(mbedtls_ssl_context *ssl); 69 int esp_mbedtls_free_tx_buffer(mbedtls_ssl_context *ssl); 71 int esp_mbedtls_free_rx_buffer(mbedtls_ssl_context *ssl); [all …]
|
/hal_espressif-3.6.0/components/openssl/library/ |
D | ssl_lib.c | 63 int ossl_statem_in_error(const SSL *ssl) in ossl_statem_in_error() argument 65 SSL_ASSERT1(ssl); in ossl_statem_in_error() 67 if (ssl->statem.state == MSG_FLOW_ERROR) in ossl_statem_in_error() 76 int SSL_want(const SSL *ssl) in SSL_want() argument 78 SSL_ASSERT1(ssl); in SSL_want() 80 return ssl->rwstate; in SSL_want() 86 int SSL_want_nothing(const SSL *ssl) in SSL_want_nothing() argument 88 SSL_ASSERT1(ssl); in SSL_want_nothing() 90 return (SSL_want(ssl) == SSL_NOTHING); in SSL_want_nothing() 96 int SSL_want_read(const SSL *ssl) in SSL_want_read() argument [all …]
|
D | ssl_x509.c | 123 X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl) in SSL_get0_param() argument 125 return &ssl->param; in SSL_get0_param() 171 int SSL_add_client_CA(SSL *ssl, X509 *x) in SSL_add_client_CA() argument 173 SSL_ASSERT1(ssl); in SSL_add_client_CA() 176 if (ssl->client_CA == x) in SSL_add_client_CA() 179 X509_free(ssl->client_CA); in SSL_add_client_CA() 181 ssl->client_CA = x; in SSL_add_client_CA() 208 int SSL_use_certificate(SSL *ssl, X509 *x) in SSL_use_certificate() argument 210 SSL_ASSERT1(ssl); in SSL_use_certificate() 213 if (ssl->cert->x509 == x) in SSL_use_certificate() [all …]
|
D | ssl_pkey.c | 205 int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) in SSL_use_PrivateKey() argument 207 SSL_ASSERT1(ssl); in SSL_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() 253 int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, in SSL_use_PrivateKey_ASN1() argument 265 ret = SSL_use_PrivateKey(ssl, pk); in SSL_use_PrivateKey_ASN1()
|
/hal_espressif-3.6.0/components/tcp_transport/ |
D | transport_ssl.c | 20 #define GET_SSL_FROM_TRANSPORT_OR_RETURN(ssl, t) \ argument 21 transport_esp_tls_t *ssl = ssl_get_context_data(t); \ 22 if (!ssl) { return; } 55 transport_esp_tls_t *ssl = esp_transport_esp_tls_create(); in ssl_get_context_data() local 56 ESP_TRANSPORT_MEM_CHECK(TAG, ssl, return NULL) in ssl_get_context_data() 57 t->data = ssl; in ssl_get_context_data() 58 return ssl; in ssl_get_context_data() 63 transport_esp_tls_t *ssl = ssl_get_context_data(t); in esp_tls_connect_async() local 64 if (ssl->conn_state == TRANS_SSL_INIT) { in esp_tls_connect_async() 65 ssl->cfg.timeout_ms = timeout_ms; in esp_tls_connect_async() [all …]
|
/hal_espressif-3.6.0/components/openssl/include/openssl/ |
D | ssl.h | 69 void SSL_free(SSL *ssl); 80 int SSL_connect(SSL *ssl); 91 int SSL_accept(SSL *ssl); 105 int SSL_read(SSL *ssl, void *buffer, int len); 119 int SSL_write(SSL *ssl, const void *buffer, int len); 128 long SSL_get_verify_result(const SSL *ssl); 140 int SSL_shutdown(SSL *ssl); 152 int SSL_set_fd(SSL *ssl, int fd); 164 int SSL_set_tlsext_host_name(SSL* ssl, const char *hostname); 370 int (*cb) (SSL *ssl, [all …]
|
/hal_espressif-3.6.0/components/openssl/platform/ |
D | ssl_pm.c | 43 mbedtls_ssl_context ssl; member 112 static int ssl_pm_reload_crt(SSL *ssl); 128 int ssl_pm_new(SSL *ssl) in ssl_pm_new() argument 138 const SSL_METHOD *method = ssl->method; in ssl_pm_new() 147 max_content_len = ssl->ctx->read_buffer_len; in ssl_pm_new() 155 mbedtls_ssl_init(&ssl_pm->ssl); in ssl_pm_new() 176 if (TLS_ANY_VERSION != ssl->version) { in ssl_pm_new() 177 int min_version = ssl->ctx->min_version ? ssl->ctx->min_version : ssl->version; in ssl_pm_new() 178 int max_version = ssl->ctx->max_version ? ssl->ctx->max_version : ssl->version; in ssl_pm_new() 187 if (ssl->ctx->ssl_alpn.alpn_status == ALPN_ENABLE) { in ssl_pm_new() [all …]
|
/hal_espressif-3.6.0/docs/en/api-reference/protocols/ |
D | openssl_apis.rst | 392 SSL *ssl; 397 ssl = SSL_new(ctx); 401 3.2 void ``SSL_free`` (SSL * ssl) 405 ssl - SSL point 419 SSL *ssl; 423 SSL_free(ssl); 427 3.3 int ``SSL_do_handshake`` (SSL * ssl) 431 ssl - SSL point 447 SSL *ssl; 452 ret = SSL_do_handshake(ssl); [all …]
|
/hal_espressif-3.6.0/components/openssl/include/platform/ |
D | ssl_pm.h | 28 int ssl_pm_new(SSL *ssl); 29 void ssl_pm_free(SSL *ssl); 31 int ssl_pm_handshake(SSL *ssl); 32 int ssl_pm_shutdown(SSL *ssl); 33 int ssl_pm_clear(SSL *ssl); 35 int ssl_pm_read(SSL *ssl, void *buffer, int len); 36 int ssl_pm_send(SSL *ssl, const void *buffer, int len); 37 int ssl_pm_pending(const SSL *ssl); 39 void ssl_pm_set_fd(SSL *ssl, int fd, int mode); 40 int ssl_pm_get_fd(const SSL *ssl, int mode); [all …]
|
/hal_espressif-3.6.0/components/tcp_transport/test/ |
D | test_transport_connect.c | 56 esp_transport_handle_t ssl = esp_transport_ssl_init(); 57 esp_transport_list_add(transport_list, ssl, "ssl"); 59 tcp_transport_test_connection_timeout(ssl); 61 esp_transport_close(ssl); 97 esp_transport_handle_t ssl = esp_transport_ssl_init(); 98 esp_transport_list_add(transport_list, ssl, "ssl"); 100 esp_transport_ssl_enable_global_ca_store(ssl); 108 esp_transport_ssl_set_keep_alive(ssl, &keep_alive_cfg); 112 esp_transport_ssl_set_interface_name(ssl, &ifr); 116 tcp_transport_keepalive_test(ssl, true, &keep_alive_cfg); [all …]
|
D | test_transport_basic.c | 37 esp_transport_handle_t ssl = esp_transport_ssl_init(); 38 esp_transport_list_add(transport_list, ssl, "ssl"); 41 esp_transport_handle_t wss = esp_transport_ws_init(ssl);
|
/hal_espressif-3.6.0/examples/protocols/smtp_client/main/ |
D | smtp_client_example_main.c | 135 static int write_ssl_and_get_response(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len) in write_ssl_and_get_response() argument 147 while (len && (ret = mbedtls_ssl_write(ssl, buf, len)) <= 0) { in write_ssl_and_get_response() 156 ret = mbedtls_ssl_read(ssl, data, len); in write_ssl_and_get_response() 192 static int write_ssl_data(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len) in write_ssl_data() argument 200 while (len && (ret = mbedtls_ssl_write(ssl, buf, len)) <= 0) { in write_ssl_data() 210 static int perform_tls_handshake(mbedtls_ssl_context *ssl) in perform_tls_handshake() argument 224 while ((ret = mbedtls_ssl_handshake(ssl)) != 0) { in perform_tls_handshake() 233 if ((flags = mbedtls_ssl_get_verify_result(ssl)) != 0) { in perform_tls_handshake() 242 ESP_LOGI(TAG, "Cipher suite is %s", mbedtls_ssl_get_ciphersuite(ssl)); in perform_tls_handshake() 261 mbedtls_ssl_context ssl; in smtp_client_task() local [all …]
|
/hal_espressif-3.6.0/components/openssl/include/internal/ |
D | ssl_types.h | 262 void (*info_callback) (const SSL *ssl, int type, int val); 281 int (*ssl_new)(SSL *ssl); 283 void (*ssl_free)(SSL *ssl); 285 int (*ssl_handshake)(SSL *ssl); 287 int (*ssl_shutdown)(SSL *ssl); 289 int (*ssl_clear)(SSL *ssl); 291 int (*ssl_read)(SSL *ssl, void *buffer, int len); 293 int (*ssl_send)(SSL *ssl, const void *buffer, int len); 295 int (*ssl_pending)(const SSL *ssl); 297 void (*ssl_set_fd)(SSL *ssl, int fd, int mode); [all …]
|
/hal_espressif-3.6.0/components/wpa_supplicant/src/crypto/ |
D | tls_mbedtls.c | 52 mbedtls_ssl_context ssl; /*!< TLS/SSL context */ member 82 mbedtls_ssl_free(&tls->ssl); in tls_mbedtls_cleanup() 526 mbedtls_ssl_init(&tls->ssl); in tls_create_mbedtls_handle() 546 ret = mbedtls_ssl_setup(&tls->ssl, &tls->conf); in tls_create_mbedtls_handle() 610 mbedtls_ssl_context *ssl = &conn->tls->ssl; in tls_connection_established() local 612 if (ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER) { in tls_connection_established() 649 while (tls->ssl.state != MBEDTLS_SSL_HANDSHAKE_OVER) { in tls_connection_handshake() 650 if (tls->ssl.state == MBEDTLS_SSL_CLIENT_CERTIFICATE) { in tls_connection_handshake() 652 if (tls->ssl.handshake) { in tls_connection_handshake() 653 os_memcpy(conn->randbytes, tls->ssl.handshake->randbytes, in tls_connection_handshake() [all …]
|
/hal_espressif-3.6.0/examples/protocols/https_mbedtls/main/ |
D | https_mbedtls_example_main.c | 73 mbedtls_ssl_context ssl; in https_get_task() local 78 mbedtls_ssl_init(&ssl); in https_get_task() 106 if((ret = mbedtls_ssl_set_hostname(&ssl, WEB_SERVER)) != 0) in https_get_task() 135 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) in https_get_task() 155 mbedtls_ssl_set_bio(&ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL); in https_get_task() 159 while ((ret = mbedtls_ssl_handshake(&ssl)) != 0) in https_get_task() 170 if ((flags = mbedtls_ssl_get_verify_result(&ssl)) != 0) in https_get_task() 182 ESP_LOGI(TAG, "Cipher suite is %s", mbedtls_ssl_get_ciphersuite(&ssl)); in https_get_task() 188 ret = mbedtls_ssl_write(&ssl, in https_get_task() 206 ret = mbedtls_ssl_read(&ssl, (unsigned char *)buf, len); in https_get_task() [all …]
|
/hal_espressif-3.6.0/examples/protocols/asio/ssl_client_server/main/ |
D | asio_ssl_main.cpp | 41 asio::ssl::context &context, in Client() 47 socket_.set_verify_mode(asio::ssl::verify_peer); in Client() 49 socket_.set_verify_mode(asio::ssl::verify_none); in Client() 71 socket_.async_handshake(asio::ssl::stream_base::client, in handshake() 111 asio::ssl::stream<tcp::socket> socket_; 118 Session(tcp::socket socket, asio::ssl::context &context) in Session() 132 socket_.async_handshake(asio::ssl::stream_base::server, in do_handshake() 166 asio::ssl::stream<tcp::socket> socket_; 174 context_(asio::ssl::context::tls_server) in Server() 177 asio::ssl::context::default_workarounds in Server() [all …]
|
/hal_espressif-3.6.0/components/mbedtls/test/ |
D | test_esp_crt_bundle.c | 64 mbedtls_ssl_context ssl; member 100 mbedtls_ssl_init( &server->ssl ); in server_setup() 152 if (( ret = mbedtls_ssl_setup( &server->ssl, &server->conf ) ) != 0 ) { in server_setup() 184 … mbedtls_ssl_set_bio( &server.ssl, &server.client_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); in server_task() 185 ret = mbedtls_ssl_handshake( &server.ssl ); in server_task() 186 mbedtls_ssl_session_reset(&server.ssl); in server_task() 207 mbedtls_ssl_free( &endpoint->ssl ); in endpoint_teardown() 221 mbedtls_ssl_init( &client->ssl ); in client_setup() 236 if ((ret = mbedtls_ssl_set_hostname(&client->ssl, SERVER_ADDRESS)) != 0) { in client_setup() 251 if ((ret = mbedtls_ssl_setup(&client->ssl, &client->conf)) != 0) { in client_setup() [all …]
|
/hal_espressif-3.6.0/tools/test_apps/protocols/openssl/ |
D | app_test.py | 6 import ssl 34 def __init__(self, port, negotiated_protocol=ssl.PROTOCOL_TLSv1): 66 context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) 76 except ssl.SSLError as e: 106 negotiated_protocol=ssl.PROTOCOL_TLSv1_1, 111 negotiated_protocol=ssl.PROTOCOL_TLSv1_1, 116 negotiated_protocol=ssl.PROTOCOL_TLSv1_2, 121 negotiated_protocol=ssl.PROTOCOL_TLSv1_2,
|
/hal_espressif-3.6.0/tools/test_apps/protocols/openssl/main/ |
D | connect_test.c | 69 SSL *ssl = NULL; in start_test() local 87 ssl = SSL_new(ctx); in start_test() 88 if (!ssl) { in start_test() 93 SSL_set_fd(ssl, sockfd); in start_test() 96 ret = SSL_connect(ssl); in start_test() 104 SSL_free(ssl); in start_test() 105 ssl = NULL; in start_test()
|
/hal_espressif-3.6.0/components/wpa_supplicant/src/eap_peer/ |
D | eap_tls.c | 24 struct eap_ssl_data ssl; member 49 if (eap_peer_tls_ssl_init(sm, &data->ssl, config, EAP_TYPE_TLS)) { in eap_tls_init() 66 eap_peer_tls_ssl_deinit(sm, &data->ssl); in eap_tls_deinit() 118 data->key_data = eap_peer_tls_derive_key(sm, &data->ssl, in eap_tls_success() 133 data->session_id = eap_peer_tls_derive_session_id(sm, &data->ssl, in eap_tls_success() 156 pos = eap_peer_tls_process_init(sm, &data->ssl, data->eap_type, ret, in eap_tls_process() 169 res = eap_peer_tls_process_helper(sm, &data->ssl, data->eap_type, 0, in eap_tls_process() 176 if (tls_connection_established(data->ssl_ctx, data->ssl.conn)) in eap_tls_process()
|
/hal_espressif-3.6.0/examples/protocols/https_server/simple/ |
D | example_test.py | 9 import ssl 124 ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) 125 ssl_context.verify_mode = ssl.CERT_REQUIRED
|