mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 06:43:11 +08:00
[libressl] Update to 3.8.2 and added usage (#35146)
* add usage * update version * update version * add patch * update version * fix EOL * update version
This commit is contained in:
parent
063d942f8d
commit
5b60364b3a
@ -1,16 +1,10 @@
|
|||||||
diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt
|
diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt
|
||||||
index 2dddb6e..fd35685 100644
|
index 9cf7a8b..67ace03 100644
|
||||||
--- a/apps/ocspcheck/CMakeLists.txt
|
--- a/apps/ocspcheck/CMakeLists.txt
|
||||||
+++ b/apps/ocspcheck/CMakeLists.txt
|
+++ b/apps/ocspcheck/CMakeLists.txt
|
||||||
@@ -1,5 +1,3 @@
|
@@ -4,6 +4,20 @@ set(
|
||||||
-if(NOT MSVC)
|
ocspcheck.c
|
||||||
-
|
)
|
||||||
set(
|
|
||||||
OCSPCHECK_SRC
|
|
||||||
http.c
|
|
||||||
@@ -13,13 +11,27 @@ else()
|
|
||||||
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+check_function_exists(getopt HAVE_GETOPT)
|
+check_function_exists(getopt HAVE_GETOPT)
|
||||||
+if(HAVE_GETOPT)
|
+if(HAVE_GETOPT)
|
||||||
@ -26,23 +20,33 @@ index 2dddb6e..fd35685 100644
|
|||||||
+ set(FTRUNCATE_SRC compat/ftruncate.c)
|
+ set(FTRUNCATE_SRC compat/ftruncate.c)
|
||||||
+endif()
|
+endif()
|
||||||
+
|
+
|
||||||
if(NOT "${OPENSSLDIR}" STREQUAL "")
|
check_function_exists(memmem HAVE_MEMMEM)
|
||||||
add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
|
if(HAVE_MEMMEM)
|
||||||
else()
|
add_definitions(-DHAVE_MEMMEM)
|
||||||
|
@@ -17,7 +31,7 @@ else()
|
||||||
add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
|
add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
-add_executable(ocspcheck ${OCSPCHECK_SRC})
|
-add_executable(ocspcheck ${OCSPCHECK_SRC})
|
||||||
+add_executable(ocspcheck ${OCSPCHECK_SRC} ${GETOPT_SRC} ${FTRUNCATE_SRC})
|
+add_executable(ocspcheck ${OCSPCHECK_SRC} ${GETOPT_SRC} ${FTRUNCATE_SRC})
|
||||||
target_include_directories(ocspcheck PUBLIC ../../include)
|
target_include_directories(ocspcheck
|
||||||
target_include_directories(ocspcheck PRIVATE . ./compat ../../include/compat)
|
PRIVATE
|
||||||
target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
|
../../include/compat
|
||||||
@@ -29,5 +41,3 @@ if(ENABLE_LIBRESSL_INSTALL)
|
diff --git a/apps/ocspcheck/ocspcheck.c b/apps/ocspcheck/ocspcheck.c
|
||||||
install(FILES ocspcheck.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
|
index 516642b..3afb68b 100644
|
||||||
|
--- a/apps/ocspcheck/ocspcheck.c
|
||||||
|
+++ b/apps/ocspcheck/ocspcheck.c
|
||||||
|
@@ -561,6 +561,10 @@ main(int argc, char **argv)
|
||||||
|
ssize_t written, w;
|
||||||
|
short port;
|
||||||
|
|
||||||
endif(ENABLE_LIBRESSL_INSTALL)
|
+#ifndef HAVE_GETOPT
|
||||||
-
|
+#include "getopt.h"
|
||||||
-endif()
|
+#endif
|
||||||
|
+
|
||||||
|
while ((ch = getopt(argc, argv, "C:i:No:v")) != -1) {
|
||||||
|
switch (ch) {
|
||||||
|
case 'C':
|
||||||
diff --git a/apps/ocspcheck/compat/ftruncate.c b/apps/ocspcheck/compat/ftruncate.c
|
diff --git a/apps/ocspcheck/compat/ftruncate.c b/apps/ocspcheck/compat/ftruncate.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..e825e50
|
index 0000000..e825e50
|
||||||
@ -225,30 +229,3 @@ index 0000000..ada142e
|
|||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/apps/ocspcheck/ocspcheck.c b/apps/ocspcheck/ocspcheck.c
|
|
||||||
index 551a8fa..c608578 100644
|
|
||||||
--- a/apps/ocspcheck/ocspcheck.c
|
|
||||||
+++ b/apps/ocspcheck/ocspcheck.c
|
|
||||||
@@ -519,6 +519,10 @@ main(int argc, char **argv)
|
|
||||||
ssize_t written, w;
|
|
||||||
short port;
|
|
||||||
|
|
||||||
+#ifndef HAVE_GETOPT
|
|
||||||
+#include "getopt.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
while ((ch = getopt(argc, argv, "C:i:No:v")) != -1) {
|
|
||||||
switch (ch) {
|
|
||||||
case 'C':
|
|
||||||
diff --git a/include/compat/unistd.h b/include/compat/unistd.h
|
|
||||||
index f521b94..f11db44 100644
|
|
||||||
--- a/include/compat/unistd.h
|
|
||||||
+++ b/include/compat/unistd.h
|
|
||||||
@@ -23,6 +23,7 @@ ssize_t pwrite(int d, const void *buf, size_t nbytes, off_t offset);
|
|
||||||
#include <io.h>
|
|
||||||
#include <process.h>
|
|
||||||
|
|
||||||
+#define STDIN_FILENO 0
|
|
||||||
#define STDOUT_FILENO 1
|
|
||||||
#define STDERR_FILENO 2
|
|
||||||
|
|
||||||
|
@ -1,47 +1,45 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index a6a7554..b20fd4b 100644
|
index 2f0dfa0..594c56f 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -111,6 +111,11 @@ if(WIN32)
|
@@ -136,6 +136,10 @@ if(WIN32)
|
||||||
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt)
|
endif()
|
||||||
|
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 ntdll bcrypt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
+if(MSVC AND MSVC_VERSION GREATER_EQUAL 1912)
|
+if(MSVC AND MSVC_VERSION GREATER_EQUAL 1912)
|
||||||
+ message(STATUS "Setting /Qspectre switch")
|
+ message(STATUS "Setting /Qspectre switch")
|
||||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
|
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
|
||||||
+endif()
|
+endif()
|
||||||
+
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions(-Dinline=__inline)
|
add_definitions(-Dinline=__inline)
|
||||||
message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler")
|
@@ -149,16 +153,29 @@ if(MSVC)
|
||||||
@@ -123,16 +128,29 @@ if(MSVC)
|
|
||||||
"C4127" # conditional expression is constant
|
"C4127" # conditional expression is constant
|
||||||
"C4146" # unary minus operator applied to unsigned type,
|
"C4146" # unary minus operator applied to unsigned type,
|
||||||
# result still unsigned
|
# result still unsigned
|
||||||
+ "C4242" # 'identifier' : conversion from 'type1' to 'type2',
|
+ "C4242" # 'identifier' : conversion from 'type1' to 'type2',
|
||||||
+ # possible loss of data
|
+ # possible loss of data
|
||||||
"C4244" # 'argument' : conversion from 'type1' to 'type2',
|
"C4244" # 'argument' : conversion from 'type1' to 'type2',
|
||||||
# possible loss of data
|
# possible loss of data
|
||||||
"C4245" # 'conversion' : conversion from 'type1' to 'type2',
|
"C4245" # 'conversion' : conversion from 'type1' to 'type2',
|
||||||
# signed/unsigned mismatch
|
# signed/unsigned mismatch
|
||||||
+ "C4255" # 'function' : no function prototype given:
|
+ "C4255" # 'function' : no function prototype given:
|
||||||
+ # converting '()' to '(void)'
|
+ # converting '()' to '(void)'
|
||||||
"C4267" # 'var' : conversion from 'size_t' to 'type',
|
"C4267" # 'var' : conversion from 'size_t' to 'type',
|
||||||
# possible loss of data
|
# possible loss of data
|
||||||
+ "C4388" # 'expression': signed/unsigned mismatch
|
+ "C4388" # 'expression': signed/unsigned mismatch
|
||||||
"C4389" # 'operator' : signed/unsigned mismatch
|
"C4389" # 'operator' : signed/unsigned mismatch
|
||||||
+ "C4464" # relative include path contains '..'
|
+ "C4464" # relative include path contains '..'
|
||||||
+ "C4668" # 'symbol' is not defined as a preprocessor macro,
|
+ "C4668" # 'symbol' is not defined as a preprocessor macro,
|
||||||
+ # replacing with '0' for 'directives'
|
+ # replacing with '0' for 'directives'
|
||||||
"C4706" # assignment within conditional expression
|
"C4706" # assignment within conditional expression
|
||||||
+ "C4710" # 'function' : function not inlined
|
+ "C4710" # 'function' : function not inlined
|
||||||
+ "C4711" # function 'function' selected for inline expansion
|
+ "C4711" # function 'function' selected for inline expansion
|
||||||
+ "C4820" # 'bytes' bytes padding added after construct 'member_name'
|
+ "C4820" # 'bytes' bytes padding added after construct 'member_name'
|
||||||
"C4996" # The POSIX name for this item is deprecated.
|
"C4996" # The POSIX name for this item is deprecated.
|
||||||
# Instead, use the ISO C and C++ conformant name
|
# Instead, use the ISO C and C++ conformant name
|
||||||
+ "C5045" # Compiler will insert Spectre mitigation for memory load
|
+ "C5045" # Compiler will insert Spectre mitigation for memory load
|
||||||
+ # if /Qspectre switch specified
|
+ # if /Qspectre switch specified
|
||||||
)
|
)
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||||
add_definitions(-D_CRT_SUPPRESS_RESTRICT)
|
add_definitions(-D_CRT_SUPPRESS_RESTRICT)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ vcpkg_download_distfile(
|
|||||||
URLS "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${VERSION}.tar.gz"
|
URLS "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${VERSION}.tar.gz"
|
||||||
"https://ftp.fau.de/openbsd/LibreSSL/${PORT}-${VERSION}.tar.gz"
|
"https://ftp.fau.de/openbsd/LibreSSL/${PORT}-${VERSION}.tar.gz"
|
||||||
FILENAME "${PORT}-${VERSION}.tar.gz"
|
FILENAME "${PORT}-${VERSION}.tar.gz"
|
||||||
SHA512 8fc81e05d1c9f9259d06508ca97d5a1ba5d46b857088c273c20e6b242921f7eac58a1136564ad9831c923758ee63f7b0897c8c6c7b1e53ab8132a995cc559aeb
|
SHA512 81765174fdd60223529182fab96249a28978c1d02b5894313d9b0b3aa365a1da2f7e5906403ab368114bdcba2fa861d1ad69b752f8344e6ea61d44666b483122
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_extract_source_archive(
|
vcpkg_extract_source_archive(
|
||||||
@ -59,11 +59,5 @@ vcpkg_copy_pdbs()
|
|||||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LibreSSL")
|
||||||
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
file(GLOB_RECURSE LIBS "${CURRENT_PACKAGES_DIR}/*.lib")
|
|
||||||
foreach(LIB ${LIBS})
|
|
||||||
string(REGEX REPLACE "(.+)-[0-9]+\\.lib" "\\1.lib" LINK "${LIB}")
|
|
||||||
file(CREATE_LINK "${LIB}" "${LINK}")
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "libressl",
|
"name": "libressl",
|
||||||
"version": "3.6.2",
|
"version": "3.8.2",
|
||||||
"port-version": 2,
|
|
||||||
"description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.",
|
"description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "vcpkg-cmake",
|
"name": "vcpkg-cmake",
|
||||||
"host": true
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"features": {
|
"features": {
|
||||||
|
@ -4733,8 +4733,8 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"libressl": {
|
"libressl": {
|
||||||
"baseline": "3.6.2",
|
"baseline": "3.8.2",
|
||||||
"port-version": 2
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"librsvg": {
|
"librsvg": {
|
||||||
"baseline": "2.40.20",
|
"baseline": "2.40.20",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "e0c1bbd2daed29ca5fcc86c53b276db8df36e6be",
|
||||||
|
"version": "3.8.2",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "213551b173db269dfd275c34a776ab7d093c5012",
|
"git-tree": "213551b173db269dfd275c34a776ab7d093c5012",
|
||||||
"version": "3.6.2",
|
"version": "3.6.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user