11/*
2- * SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
@@ -322,6 +322,12 @@ typedef struct esp_tls_cfg_server {
322322 TLS extensions, such as ALPN and server_certificate_type . */
323323#endif
324324
325+ #if defined(CONFIG_ESP_TLS_PSK_VERIFICATION )
326+ const psk_hint_key_t * psk_hint_key ; /*!< Pointer to PSK hint and key. if not NULL (and the certificate/key is NULL)
327+ then PSK authentication is enabled with configured setup.
328+ Important note: the pointer must be valid for connection */
329+ #endif
330+
325331} esp_tls_cfg_server_t ;
326332
327333/**
@@ -464,7 +470,7 @@ int esp_tls_conn_http_new_async(const char *url, const esp_tls_cfg_t *cfg, esp_t
464470 * - >=0 if write operation was successful, the return value is the number
465471 * of bytes actually written to the TLS/SSL connection.
466472 * - <0 if write operation was not successful, because either an
467- * error occured or an action must be taken by the calling process.
473+ * error occurred or an action must be taken by the calling process.
468474 * - ESP_TLS_ERR_SSL_WANT_READ/
469475 * ESP_TLS_ERR_SSL_WANT_WRITE.
470476 * if the handshake is incomplete and waiting for data to be available for reading.
@@ -485,7 +491,7 @@ ssize_t esp_tls_conn_write(esp_tls_t *tls, const void *data, size_t datalen);
485491 * - 0 if read operation was not successful. The underlying
486492 * connection was closed.
487493 * - <0 if read operation was not successful, because either an
488- * error occured or an action must be taken by the calling process.
494+ * error occurred or an action must be taken by the calling process.
489495 */
490496ssize_t esp_tls_conn_read (esp_tls_t * tls , void * data , size_t datalen );
491497
@@ -537,7 +543,7 @@ esp_err_t esp_tls_get_conn_sockfd(esp_tls_t *tls, int *sockfd);
537543 *
538544 * @param[in] sockfd sockfd value to set.
539545 *
540- * @return - ESP_OK on success and value of sockfd for the tls connection shall updated withthe provided value
546+ * @return - ESP_OK on success and value of sockfd for the tls connection shall updated with the provided value
541547 * - ESP_ERR_INVALID_ARG if (tls == NULL || sockfd < 0)
542548 */
543549esp_err_t esp_tls_set_conn_sockfd (esp_tls_t * tls , int sockfd );
@@ -549,7 +555,7 @@ esp_err_t esp_tls_set_conn_sockfd(esp_tls_t *tls, int sockfd);
549555 *
550556 * @param[out] conn_state pointer to the connection state value.
551557 *
552- * @return - ESP_OK on success and value of sockfd for the tls connection shall updated withthe provided value
558+ * @return - ESP_OK on success and value of sockfd for the tls connection shall updated with the provided value
553559 * - ESP_ERR_INVALID_ARG (Invalid arguments)
554560 */
555561esp_err_t esp_tls_get_conn_state (esp_tls_t * tls , esp_tls_conn_state_t * conn_state );
@@ -561,7 +567,7 @@ esp_err_t esp_tls_get_conn_state(esp_tls_t *tls, esp_tls_conn_state_t *conn_stat
561567 *
562568 * @param[in] conn_state connection state value to set.
563569 *
564- * @return - ESP_OK on success and value of sockfd for the tls connection shall updated withthe provided value
570+ * @return - ESP_OK on success and value of sockfd for the tls connection shall updated with the provided value
565571 * - ESP_ERR_INVALID_ARG (Invalid arguments)
566572 */
567573esp_err_t esp_tls_set_conn_state (esp_tls_t * tls , esp_tls_conn_state_t conn_state );
@@ -586,7 +592,7 @@ void *esp_tls_get_ssl_context(esp_tls_t *tls);
586592 *
587593 * @return
588594 * - ESP_OK if creating global CA store was successful.
589- * - ESP_ERR_NO_MEM if an error occured when allocating the mbedTLS resources.
595+ * - ESP_ERR_NO_MEM if an error occurred when allocating the mbedTLS resources.
590596 */
591597esp_err_t esp_tls_init_global_ca_store (void );
592598
@@ -605,7 +611,7 @@ esp_err_t esp_tls_init_global_ca_store(void);
605611 *
606612 * @return
607613 * - ESP_OK if adding certificates was successful.
608- * - Other if an error occured or an action must be taken by the calling process.
614+ * - Other if an error occurred or an action must be taken by the calling process.
609615 */
610616esp_err_t esp_tls_set_global_ca_store (const unsigned char * cacert_pem_buf , const unsigned int cacert_pem_bytes );
611617
0 commit comments