]> granicus.if.org Git - esp-idf/commitdiff
https_server : add extern C directive and other minor changes for C++ support
authorAnurag Kar <anurag.kar@espressif.com>
Mon, 31 Dec 2018 05:52:42 +0000 (11:22 +0530)
committerAnurag Kar <anurag.kar@espressif.com>
Mon, 31 Dec 2018 09:42:42 +0000 (15:12 +0530)
Closes https://github.com/espressif/esp-idf/issues/2887

components/esp_https_server/include/esp_https_server.h

index 2b7343e7724d8b0385abfa347b8303ff04c1bcbf..19c326ed51f1e7b7b0accca547d77cdd894d23e7 100644 (file)
 #include "esp_err.h"
 #include "esp_http_server.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum {
     HTTPD_SSL_TRANSPORT_SECURE,      // SSL Enabled
     HTTPD_SSL_TRANSPORT_INSECURE     // SSL disabled
@@ -92,6 +96,10 @@ typedef struct httpd_ssl_config httpd_ssl_config_t;
         .open_fn = NULL,                          \
         .close_fn = NULL,                         \
     },                                            \
+    .cacert_pem = NULL,                           \
+    .cacert_len = 0,                              \
+    .prvtkey_pem = NULL,                          \
+    .prvtkey_len = 0,                             \
     .transport_mode = HTTPD_SSL_TRANSPORT_SECURE, \
     .port_secure = 443,                           \
     .port_insecure = 80,                          \
@@ -114,4 +122,8 @@ esp_err_t httpd_ssl_start(httpd_handle_t *handle, httpd_ssl_config_t *config);
  */
 void httpd_ssl_stop(httpd_handle_t handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // _ESP_HTTPS_SERVER_H_