mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 06:49:00 +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
|
||||
index 2dddb6e..fd35685 100644
|
||||
index 9cf7a8b..67ace03 100644
|
||||
--- a/apps/ocspcheck/CMakeLists.txt
|
||||
+++ b/apps/ocspcheck/CMakeLists.txt
|
||||
@@ -1,5 +1,3 @@
|
||||
-if(NOT MSVC)
|
||||
-
|
||||
set(
|
||||
OCSPCHECK_SRC
|
||||
http.c
|
||||
@@ -13,13 +11,27 @@ else()
|
||||
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c)
|
||||
endif()
|
||||
@@ -4,6 +4,20 @@ set(
|
||||
ocspcheck.c
|
||||
)
|
||||
|
||||
+check_function_exists(getopt HAVE_GETOPT)
|
||||
+if(HAVE_GETOPT)
|
||||
@ -26,23 +20,33 @@ index 2dddb6e..fd35685 100644
|
||||
+ set(FTRUNCATE_SRC compat/ftruncate.c)
|
||||
+endif()
|
||||
+
|
||||
if(NOT "${OPENSSLDIR}" STREQUAL "")
|
||||
add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
|
||||
else()
|
||||
check_function_exists(memmem HAVE_MEMMEM)
|
||||
if(HAVE_MEMMEM)
|
||||
add_definitions(-DHAVE_MEMMEM)
|
||||
@@ -17,7 +31,7 @@ else()
|
||||
add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
|
||||
endif()
|
||||
|
||||
-add_executable(ocspcheck ${OCSPCHECK_SRC})
|
||||
+add_executable(ocspcheck ${OCSPCHECK_SRC} ${GETOPT_SRC} ${FTRUNCATE_SRC})
|
||||
target_include_directories(ocspcheck PUBLIC ../../include)
|
||||
target_include_directories(ocspcheck PRIVATE . ./compat ../../include/compat)
|
||||
target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
|
||||
@@ -29,5 +41,3 @@ if(ENABLE_LIBRESSL_INSTALL)
|
||||
install(FILES ocspcheck.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
|
||||
target_include_directories(ocspcheck
|
||||
PRIVATE
|
||||
../../include/compat
|
||||
diff --git a/apps/ocspcheck/ocspcheck.c b/apps/ocspcheck/ocspcheck.c
|
||||
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)
|
||||
-
|
||||
-endif()
|
||||
+#ifndef HAVE_GETOPT
|
||||
+#include "getopt.h"
|
||||
+#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
|
||||
new file mode 100644
|
||||
index 0000000..e825e50
|
||||
@ -225,30 +229,3 @@ index 0000000..ada142e
|
||||
+
|
||||
+#endif
|
||||
\ 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,20 +1,19 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a6a7554..b20fd4b 100644
|
||||
index 2f0dfa0..594c56f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -111,6 +111,11 @@ if(WIN32)
|
||||
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt)
|
||||
@@ -136,6 +136,10 @@ if(WIN32)
|
||||
endif()
|
||||
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 ntdll bcrypt)
|
||||
endif()
|
||||
|
||||
+if(MSVC AND MSVC_VERSION GREATER_EQUAL 1912)
|
||||
+ message(STATUS "Setting /Qspectre switch")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
|
||||
+endif()
|
||||
+
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-Dinline=__inline)
|
||||
message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler")
|
||||
@@ -123,16 +128,29 @@ if(MSVC)
|
||||
@@ -149,16 +153,29 @@ if(MSVC)
|
||||
"C4127" # conditional expression is constant
|
||||
"C4146" # unary minus operator applied to unsigned type,
|
||||
# result still unsigned
|
||||
@ -44,4 +43,3 @@ index a6a7554..b20fd4b 100644
|
||||
)
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
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"
|
||||
"https://ftp.fau.de/openbsd/LibreSSL/${PORT}-${VERSION}.tar.gz"
|
||||
FILENAME "${PORT}-${VERSION}.tar.gz"
|
||||
SHA512 8fc81e05d1c9f9259d06508ca97d5a1ba5d46b857088c273c20e6b242921f7eac58a1136564ad9831c923758ee63f7b0897c8c6c7b1e53ab8132a995cc559aeb
|
||||
SHA512 81765174fdd60223529182fab96249a28978c1d02b5894313d9b0b3aa365a1da2f7e5906403ab368114bdcba2fa861d1ad69b752f8344e6ea61d44666b483122
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
@ -59,11 +59,5 @@ vcpkg_copy_pdbs()
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
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()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/LibreSSL")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
@ -1,13 +1,16 @@
|
||||
{
|
||||
"name": "libressl",
|
||||
"version": "3.6.2",
|
||||
"port-version": 2,
|
||||
"version": "3.8.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.",
|
||||
"license": "ISC",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
|
@ -4733,8 +4733,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"libressl": {
|
||||
"baseline": "3.6.2",
|
||||
"port-version": 2
|
||||
"baseline": "3.8.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"librsvg": {
|
||||
"baseline": "2.40.20",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e0c1bbd2daed29ca5fcc86c53b276db8df36e6be",
|
||||
"version": "3.8.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "213551b173db269dfd275c34a776ab7d093c5012",
|
||||
"version": "3.6.2",
|
||||
|
Loading…
Reference in New Issue
Block a user