Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/win32/openssh/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"name": "libressl",
"version": "4.1.1"
"version": "4.2.0"
},
{
"name": "libfido2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/crypto/arch/aarch64/crypto_cpu_caps_windows.c b/crypto/arch/aarch64/crypto_cpu_caps_windows.c
new file mode 100644
index 0000000..e7cdded
--- /dev/null
+++ b/crypto/arch/aarch64/crypto_cpu_caps_windows.c
@@ -0,0 +1,36 @@
+/* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/11/12 13:52:31 jsing Exp $ */
+/*
+ * Copyright (c) 2025 Brent Cook <[email protected]>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <windows.h>
+
+#include "crypto_arch.h"
+
+/* Machine dependent CPU capabilities. */
+uint64_t crypto_cpu_caps_aarch64;
+
+void
+crypto_cpu_caps_init(void)
+{
+ crypto_cpu_caps_aarch64 = 0;
+
+ if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) {
+ crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_AES;
+ crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_PMULL;
+ crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_SHA1;
+ crypto_cpu_caps_aarch64 |= CRYPTO_CPU_CAPS_AARCH64_SHA2;
+ }
+}
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ index 0000000..d6605a0
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 4,1,1,0
+ PRODUCTVERSION 4,1,1,0
+ FILEVERSION 4,2,0,0
+ PRODUCTVERSION 4,2,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
Expand All @@ -72,9 +72,9 @@ index 0000000..d6605a0
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileVersion", "4.1.1.0"
+ VALUE "FileVersion", "4.2.0.0"
+ VALUE "ProductName", "LibreSSL"
+ VALUE "ProductVersion", "4.1.1.0"
+ VALUE "ProductVersion", "4.2.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52f855d..4aea0b3 100644
index a9a3dca..357c755 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,10 +41,8 @@ option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF)
@@ -57,10 +57,8 @@ option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF)
set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE)
set(LIBRESSL_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/LibreSSL" CACHE STRING "Installation directory for the CMake targets")

Expand All @@ -15,7 +15,7 @@ index 52f855d..4aea0b3 100644

if(NOT LIBRESSL_SKIP_INSTALL)
set( ENABLE_LIBRESSL_INSTALL ON )
@@ -156,26 +154,26 @@ if(MSVC)
@@ -172,26 +170,26 @@ if(MSVC)

if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(MSVC_DISABLED_WARNINGS_LIST
Expand Down Expand Up @@ -46,18 +46,15 @@ index 52f855d..4aea0b3 100644
# Instead, use the ISO C and C++ conformant name
)
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
@@ -372,11 +370,13 @@ if(APPLE AND (NOT CMAKE_OSX_ARCHITECTURES STREQUAL ""))
@@ -411,8 +409,10 @@ if (WIN32 AND (NOT CMAKE_GENERATOR_PLATFORM STREQUAL ""))
endif()

if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|ARM64)")
+ set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(HOST_AARCH64 true)
if(WIN32)
set(ENABLE_ASM false)
endif()
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm|ARM)")
+ set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(HOST_ARM true)
elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
set(HOST_X86_64 true)
if(APPLE)
set(ENABLE_ASM false)
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index 5140a7a..d2cb88e 100644
index 137cf70..689122b 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -616,7 +616,7 @@ set(
@@ -596,7 +596,7 @@ set(
x509/x_all.c
)

-set(COMPAT_SRC empty.c)
+set(COMPAT_SRC empty.c version.rc)

if(UNIX)
set(CRYPTO_SRC ${CRYPTO_SRC} crypto_lock.c)
@@ -840,12 +840,13 @@ add_library(crypto $<TARGET_OBJECTS:crypto_obj> $<TARGET_OBJECTS:compat_obj> emp
set(CRYPTO_UNEXPORT ${CRYPTO_UNEXPORT} BIO_s_log)

@@ -848,12 +848,13 @@ add_library(crypto $<TARGET_OBJECTS:crypto_obj> $<TARGET_OBJECTS:compat_obj> emp

export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym)
target_link_libraries(crypto ${PLATFORM_LIBS})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ vcpkg_download_distfile(
URLS "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${VERSION}.tar.gz"
"https://github.com/libressl/portable/releases/download/v${VERSION}/${PORT}-${VERSION}.tar.gz"
FILENAME "${PORT}-${VERSION}.tar.gz"
SHA512 01c74c6cafc4274f2c1c2c88b897f2f21eafa4ccdd952dae72065366032ec5efdefbb4f809bca66da5b2f2cef426cf378181ae13c2daf7f3dcc67fab7daf9d51
SHA512 b06eccff7b332da38efbc5a039d8ee54bd26437f3d5957f59ac2d93b4464f181c9a665a2c957272be5d9f91f447720f6dfa29b4b72407279ac8a7722c322dac0
)

vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${LIBRESSL_SOURCE_ARCHIVE}"
PATCHES
pkgconfig.diff
aarch64-windows.diff
add-resource-header-file.patch
add-version-file.patch
modify-cmakelists.patch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "libressl",
"version": "4.1.1",
"port-version": 1,
"version": "4.2.0",
"description": [
"LibreSSL is a TLS/crypto stack.",
"It was forked from OpenSSL in 2014 by the OpenBSD project, with goals of modernizing the codebase, improving security, and applying best practice development processes.",
Expand Down