Chapter 2. API Reference
• This structure includes certificates of a Certificate Authority, of client or server as well as private
keys, which may be of PEM or DER format. In case of PEM format, the buffer must be NULL
terminated (with NULL character included in certificate size).
• Certificate Authority’s certificate may be a chain of certificates in case of PEM format, but could
be only one certificate in case of DER format
• Variables names of certificates and private key buffers and sizes are defined as unions providing
backward compatibility for legacy *_pem_buf and *_pem_bytes names which suggested only PEM
format was supported. It is encouraged to use generic names such as cacert_buf and cacert_bytes.
typedef struct esp_tls esp_tls_t
ESP-TLS Connection Handle.
Enumerations
enum esp_tls_conn_state
ESP-TLS Connection State.
Values:
ESP_TLS_INIT = 0
ESP_TLS_CONNECTING
ESP_TLS_HANDSHAKE
ESP_TLS_FAIL
ESP_TLS_DONE
enum esp_tls_role
Values:
ESP_TLS_CLIENT = 0
ESP_TLS_SERVER
2.3.4 OpenSSL-APIs
Note: The OpenSSL-API will be discontinued in ESP-IDF from v5.0. Please use ESP-TLS <esp_tls> instead.
The code of this API (located in openssl directory), does not contain OpenSSL itself but is intended as a wrapper
for applications using the OpenSSL API. It uses mbedTLS to do the actual work, so anyone compiling openssl code
needs the mbedtls library and header file.
OpenSSL APIs not mentioned in this article are not open to public for the time, also do not have the corresponding
function. If user calls it directly, it will always return an error or may show cannot link at compiling time.
Chapter Introduction
• Chapter 1. SSL Context Method Create
• Chapter 2. SSL Context Function
• Chapter 3. SSL Function
• Chapter 4. SSL X509 Certification and Private Key Function
Chapter 1. SSL Context Method Create
1.1 const SSL_METHOD* SSLv3_client_method (void)
Arguments:
Espressif Systems 529
Submit Document Feedback
Release v4.4