Previously with HTTPD_SSL_CONFIG_DEFAULT being a MACRO, the
configuration options could not be applied to it. This was casuing
error in multiple scenarios. For e.g., here user_cert_cb is a part
of httpd_ssl_config_t which this macro defines. But the type of
user_cert_cb (esp_tls_server_callback_t) is only available when it is enabled
in esp-tls. The MACRO however cannot be modified to set the defaults
based on configuration option. This fix solves the issue without
breaking the compatibility
For simultaneous HTTP and HTTPS server use-case, default configurations
set same control socket port and hence one of the server initialization
fails with an error "error in creating control socket".
This commit modifies default initializers to use different control
socket port in HTTP vs HTTPS server case.
Closes https://github.com/espressif/esp-idf/issues/10160
Closes IDFGH-8719
- Can be used to get connection or client information (SSL context)
- E.g. Client certificate, Socket FD, Connection state, etc.
- Added example callback for getting client certificate information in 'https_server/simple' example
Closes https://github.com/espressif/esp-idf/issues/7479
This macro doesn't compile on C++. Order is fixed now.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
Co-Authored-By: xkevin190 <kevinvelasco193@gmail.com>
Merges https://github.com/espressif/esp-idf/pull/4981
The task that runs the HTTP server can now be pinned to a particular core by setting `core_id`
in the HTTP server configuration. By default, the core is set to `tskNO_AFFINITY`, meaning
it can run on any core.
Merges https://github.com/espressif/esp-idf/pull/3190
transport_mode accepts enum httpd_ssl_transport_t instead of true/false.
This will allow for extension to dual mode (server running on both secure and insecure ports) in the future.