Merge branch 'master' into dev
This commit is contained in:
@@ -105,11 +105,11 @@ include_directories(${LWIP_PORT_DIR}/include)
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
set(ALLOW_INSTALL_TARGET TRUE)
|
option(ALLOW_INSTALL_TARGET "Enable the install target" TRUE)
|
||||||
set(BUILD_STATIC_LIB TRUE)
|
option(BUILD_STATIC_LIB "Build static library" TRUE)
|
||||||
set(BUILD_SHARED_LIB TRUE)
|
option(BUILD_SHARED_LIB "Build shared libary" TRUE)
|
||||||
set(BUILD_HOST_SELFTEST TRUE)
|
option(BUILD_HOST_SELFTEST "Build host selftest binary" TRUE)
|
||||||
set(ZTS_DISABLE_CENTRAL_API TRUE)
|
option(ZTS_DISABLE_CENTRAL_API "Disable central API" TRUE)
|
||||||
|
|
||||||
# C# language bindings (libzt.dll/dylib/so)
|
# C# language bindings (libzt.dll/dylib/so)
|
||||||
if (ZTS_ENABLE_PINVOKE)
|
if (ZTS_ENABLE_PINVOKE)
|
||||||
@@ -380,10 +380,15 @@ if(BUILD_WIN)
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc -DNOMINMAX")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc -DNOMINMAX")
|
||||||
else()
|
else()
|
||||||
|
option(STACK_PROTECTOR "Compile with -fstack-protector" ON)
|
||||||
|
if(STACK_PROTECTOR)
|
||||||
|
set(STACK_PROTECTOR_FLAGS -fstack-protector)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS
|
set(CMAKE_C_FLAGS
|
||||||
"${CMAKE_C_FLAGS} \
|
"${CMAKE_C_FLAGS} \
|
||||||
${ZT_FLAGS} \
|
${ZT_FLAGS} \
|
||||||
-fstack-protector")
|
${STACK_PROTECTOR_FLAGS}")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG
|
set(CMAKE_C_FLAGS_DEBUG
|
||||||
"${CMAKE_C_FLAGS_DEBUG} \
|
"${CMAKE_C_FLAGS_DEBUG} \
|
||||||
@@ -393,7 +398,7 @@ else()
|
|||||||
set(CMAKE_C_FLAGS_RELEASE
|
set(CMAKE_C_FLAGS_RELEASE
|
||||||
"${CMAKE_C_FLAGS_RELEASE} \
|
"${CMAKE_C_FLAGS_RELEASE} \
|
||||||
${RELEASE_OPTIMIZATION} \
|
${RELEASE_OPTIMIZATION} \
|
||||||
-fstack-protector")
|
${STACK_PROTECTOR_FLAGS}")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
||||||
${ZT_FLAGS} -Wall -Wextra -std=c++11")
|
${ZT_FLAGS} -Wall -Wextra -std=c++11")
|
||||||
|
|||||||
@@ -1227,7 +1227,7 @@ ZTS_API int ZTCALL zts_init_from_storage(const char* path);
|
|||||||
*
|
*
|
||||||
* See also: `zts_init_from_storage()`
|
* See also: `zts_init_from_storage()`
|
||||||
*
|
*
|
||||||
* @param key Path Null-terminated file-system path string
|
* @param key Buffer containing identity key
|
||||||
* @param len Length of `key` buffer
|
* @param len Length of `key` buffer
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
@@ -1325,7 +1325,7 @@ ZTS_API int ZTCALL zts_init_set_random_port_range(unsigned short start_port, uns
|
|||||||
* that traffic on your chosen primary port is allowed. This is an initialization function that can
|
* that traffic on your chosen primary port is allowed. This is an initialization function that can
|
||||||
* only be called before `zts_node_start()`.
|
* only be called before `zts_node_start()`.
|
||||||
*
|
*
|
||||||
* @param port Port number
|
* @param allowed Whether or not this feature is enabled
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
*/
|
*/
|
||||||
@@ -1335,7 +1335,7 @@ ZTS_API int ZTCALL zts_init_allow_secondary_port(unsigned int allowed);
|
|||||||
* @brief Allow or disallow the use of port-mapping. This is enabled by default. This is an
|
* @brief Allow or disallow the use of port-mapping. This is enabled by default. This is an
|
||||||
* initialization function that can only be called before `zts_node_start()`.
|
* initialization function that can only be called before `zts_node_start()`.
|
||||||
*
|
*
|
||||||
* @param port Port number
|
* @param allowed Whether or not this feature is enabled
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
*/
|
*/
|
||||||
@@ -1355,7 +1355,7 @@ ZTS_API int ZTCALL zts_init_allow_port_mapping(unsigned int allowed);
|
|||||||
*
|
*
|
||||||
* See also: `zts_init_allow_peer_cache()`
|
* See also: `zts_init_allow_peer_cache()`
|
||||||
*
|
*
|
||||||
* @param enabled Whether or not this feature is enabled
|
* @param allowed Whether or not this feature is enabled
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
*/
|
*/
|
||||||
@@ -1374,7 +1374,7 @@ ZTS_API int ZTCALL zts_init_allow_net_cache(unsigned int allowed);
|
|||||||
*
|
*
|
||||||
* See also: `zts_init_allow_net_cache()`
|
* See also: `zts_init_allow_net_cache()`
|
||||||
*
|
*
|
||||||
* @param enabled Whether or not this feature is enabled
|
* @param allowed Whether or not this feature is enabled
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
*/
|
*/
|
||||||
@@ -1384,7 +1384,7 @@ ZTS_API int ZTCALL zts_init_allow_peer_cache(unsigned int allowed);
|
|||||||
* @brief Enable or disable whether the node will cache root definitions (enabled
|
* @brief Enable or disable whether the node will cache root definitions (enabled
|
||||||
* by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`.
|
* by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`.
|
||||||
*
|
*
|
||||||
* @param enabled Whether or not this feature is enabled
|
* @param allowed Whether or not this feature is enabled
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
*/
|
*/
|
||||||
@@ -1394,7 +1394,7 @@ ZTS_API int ZTCALL zts_init_allow_roots_cache(unsigned int allowed);
|
|||||||
* @brief Enable or disable whether the node will cache identities (enabled
|
* @brief Enable or disable whether the node will cache identities (enabled
|
||||||
* by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`.
|
* by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`.
|
||||||
*
|
*
|
||||||
* @param enabled Whether or not this feature is enabled
|
* @param allowed Whether or not this feature is enabled
|
||||||
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
* @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node
|
||||||
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
* experiences a problem, `ZTS_ERR_ARG` if invalid argument.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user