Skip to content

Commit 36c6c56

Browse files
authored
Updated to v3.4.2 (#7)
1 parent 54df1b8 commit 36c6c56

File tree

272 files changed

+19147
-5411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+19147
-5411
lines changed

CMakeLists.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,21 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
113113
endif()
114114

115115
if(WIN32)
116-
add_definitions(-Drestrict)
117116
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
118117
add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS)
119118
add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS)
120-
add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600)
121119
add_definitions(-DCPPFLAGS -DNO_SYSLOG -DNO_CRYPT)
120+
add_definitions(-DWIN32_LEAN_AND_MEAN)
121+
if(NOT CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
122+
add_definitions(-D_WIN32_WINNT=0x0600)
123+
endif()
122124
set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32 bcrypt)
123125
endif()
124126

125127
if(MSVC)
126128
add_definitions(-Dinline=__inline)
127129
message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler")
128-
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
130+
if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
129131
set(MSVC_DISABLED_WARNINGS_LIST
130132
"C4018" # 'expression' : signed/unsigned mismatch
131133
"C4057" # 'operator' : 'identifier1' indirection to
@@ -332,7 +334,8 @@ if(SIZEOF_TIME_T STREQUAL "4")
332334
endif()
333335
add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T})
334336

335-
set(OPENSSL_LIBS tls ssl crypto ${PLATFORM_LIBS})
337+
set(OPENSSL_LIBS ssl crypto ${PLATFORM_LIBS})
338+
set(LIBTLS_LIBS tls ${PLATFORM_LIBS})
336339

337340
add_subdirectory(crypto)
338341
add_subdirectory(ssl)

ChangeLog

+62
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,68 @@ history is also available from Git.
2828

2929
LibreSSL Portable Release Notes:
3030

31+
3.4.2 - Security fix
32+
33+
* In some situations the X.509 verifier would discard an error on an
34+
unverified certificate chain, resulting in an authentication bypass.
35+
Thanks to Ilya Shipitsin and Timo Steinlein for reporting.
36+
37+
3.4.1 - Stable release
38+
39+
* New Features
40+
- Added support for OpenSSL 1.1.1 TLSv1.3 APIs.
41+
- Enabled the new X.509 validator to allow verification of
42+
modern certificate chains.
43+
* Portable Improvements
44+
- Ported continuous integration and test infrastructure to Github
45+
actions.
46+
- Added Universal Windows Platform (UWP) build support.
47+
- Fixed mingw-w64 builds on newer versions with missing SSP support.
48+
- Added non-executable stack annotations for CMake builds.
49+
* API and Documentation Enhancements
50+
- Added the following APIs from OpenSSL
51+
BN_bn2binpad BN_bn2lebinpad BN_lebin2bn EC_GROUP_get_curve
52+
EC_GROUP_order_bits EC_GROUP_set_curve
53+
EC_POINT_get_affine_coordinates
54+
EC_POINT_set_affine_coordinates
55+
EC_POINT_set_compressed_coordinates EVP_DigestSign
56+
EVP_DigestVerify SSL_CIPHER_find SSL_CTX_get0_privatekey
57+
SSL_CTX_get_max_early_data SSL_CTX_get_ssl_method
58+
SSL_CTX_set_ciphersuites SSL_CTX_set_max_early_data
59+
SSL_CTX_set_post_handshake_auth SSL_SESSION_get0_cipher
60+
SSL_SESSION_get_max_early_data SSL_SESSION_is_resumable
61+
SSL_SESSION_set_max_early_data SSL_get_early_data_status
62+
SSL_get_max_early_data SSL_read_early_data SSL_set0_rbio
63+
SSL_set_ciphersuites SSL_set_max_early_data
64+
SSL_set_post_handshake_auth
65+
SSL_set_psk_use_session_callback
66+
SSL_verify_client_post_handshake SSL_write_early_data
67+
- Added AES-GCM constants from RFC 7714 for SRTP.
68+
* Compatibility Changes
69+
- Implement flushing for TLSv1.3 handshakes behavior, needed for Apache.
70+
- Call the info callback on connect/accept exit in TLSv1.3,
71+
needed for p5-Net-SSLeay.
72+
- Default to using named curve parameter encoding from
73+
pre-OpenSSL 1.1.0, adding OPENSSL_EC_EXPLICIT_CURVE.
74+
- Do not ignore SSL_TLSEXT_ERR_FATAL from the ALPN callback.
75+
* Testing and Proactive Security
76+
- Added additional state machine test coverage.
77+
- Improved integration test support with ruby/openssl tests.
78+
- Error codes and callback support in new X.509 validator made
79+
compatible with p5-Net_SSLeay tests.
80+
* Internal Improvements
81+
- Numerous fixes and improvements to the new X.509 validator to
82+
ensure compatible error codes and callback support compatible
83+
with the legacy OpenSSL validator.
84+
85+
3.4.0 - Development release
86+
87+
* Add support for OpenSSL 1.1.1 TLSv1.3 APIs.
88+
89+
* Enable new x509 validator.
90+
91+
* More details to come, testing is appreciated.
92+
3193
3.3.5 - Security fix
3294

3395
* A stack overread could occur when checking X.509 name constraints.

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
![LibreSSL image](https://www.libressl.org/images/libressl.jpg)
22
## Official portable version of [LibreSSL](https://www.libressl.org) ##
33

4-
[![Build Status](https://travis-ci.org/libressl-portable/portable.svg?branch=master)](https://travis-ci.org/libressl-portable/portable) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libressl.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl)
4+
[![Linux Build Status](https://github.com/libressl-portable/portable/actions/workflows/linux_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/linux_test.yml)
5+
[![macOS Build Status](https://github.com/libressl-portable/portable/actions/workflows/macos_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/macos_test.yml)
6+
[![Android_Build Status](https://github.com/libressl-portable/portable/actions/workflows/android_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/android_test.yml)
7+
[![Cross_Build Status](https://github.com/libressl-portable/portable/actions/workflows/cross_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/cross_test.yml)
8+
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libressl.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl)
59

610
LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
711
[OpenBSD](https://www.openbsd.org) project. Our goal is to modernize the codebase,

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
3.3.5.0
1+
3.4.2.0
22

apps/nc/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ else()
3030
endif()
3131

3232
check_function_exists(strtonum HAVE_STRTONUM)
33-
if(HAVE_STRTONUM)
33+
if(HAVE_STRTONUM AND CMAKE_SYSTEM_NAME MATCHES "Darwin" AND
34+
CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20)
3435
add_definitions(-DHAVE_STRTONUM)
3536
else()
3637
set(NC_SRC ${NC_SRC} compat/strtonum.c)
@@ -44,7 +45,7 @@ endif()
4445

4546
add_executable(nc ${NC_SRC})
4647
target_include_directories(nc PRIVATE . ./compat ../../include/compat)
47-
target_link_libraries(nc tls ${OPENSSL_LIBS})
48+
target_link_libraries(nc ${LIBTLS_LIBS})
4849

4950
if(ENABLE_NC)
5051
if(ENABLE_LIBRESSL_INSTALL)

apps/nc/netcat.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: netcat.c,v 1.217 2020/02/12 14:46:36 schwarze Exp $ */
1+
/* $OpenBSD: netcat.c,v 1.218 2021/07/12 15:09:20 beck Exp $ */
22
/*
33
* Copyright (c) 2001 Eric Jackson <[email protected]>
44
* Copyright (c) 2015 Bob Beck. All rights reserved.
@@ -374,13 +374,13 @@ main(int argc, char *argv[])
374374

375375
if (usetls) {
376376
if (Cflag && unveil(Cflag, "r") == -1)
377-
err(1, "unveil");
377+
err(1, "unveil %s", Cflag);
378378
if (unveil(Rflag, "r") == -1)
379-
err(1, "unveil");
379+
err(1, "unveil %s", Rflag);
380380
if (Kflag && unveil(Kflag, "r") == -1)
381-
err(1, "unveil");
381+
err(1, "unveil %s", Kflag);
382382
if (oflag && unveil(oflag, "r") == -1)
383-
err(1, "unveil");
383+
err(1, "unveil %s", oflag);
384384
} else if (family == AF_UNIX && uflag && lflag && !kflag) {
385385
/*
386386
* After recvfrom(2) from client, the server connects
@@ -390,20 +390,20 @@ main(int argc, char *argv[])
390390
} else {
391391
if (family == AF_UNIX) {
392392
if (unveil(host, "rwc") == -1)
393-
err(1, "unveil");
393+
err(1, "unveil %s", host);
394394
if (uflag && !kflag) {
395395
if (sflag) {
396396
if (unveil(sflag, "rwc") == -1)
397-
err(1, "unveil");
397+
err(1, "unveil %s", sflag);
398398
} else {
399399
if (unveil("/tmp", "rwc") == -1)
400-
err(1, "unveil");
400+
err(1, "unveil /tmp");
401401
}
402402
}
403403
} else {
404404
/* no filesystem visibility */
405405
if (unveil("/", "") == -1)
406-
err(1, "unveil");
406+
err(1, "unveil /");
407407
}
408408
}
409409

apps/ocspcheck/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ else()
1414
endif()
1515

1616
check_function_exists(strtonum HAVE_STRTONUM)
17-
if(HAVE_STRTONUM)
17+
if(HAVE_STRTONUM AND CMAKE_SYSTEM_NAME MATCHES "Darwin" AND
18+
CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20)
1819
add_definitions(-DHAVE_STRTONUM)
1920
else()
2021
set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/strtonum.c)

apps/ocspcheck/http.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: http.c,v 1.13 2020/01/11 17:37:19 sthen Exp $ */
1+
/* $Id: http.c,v 1.15 2021/09/14 16:37:20 tb Exp $ */
22
/*
33
* Copyright (c) 2016 Kristaps Dzonsons <[email protected]>
44
*
@@ -119,16 +119,11 @@ dotlswrite(const void *buf, size_t sz, const struct http *http)
119119
}
120120

121121
int
122-
http_init()
122+
http_init(void)
123123
{
124124
if (tlscfg != NULL)
125125
return 0;
126126

127-
if (tls_init() == -1) {
128-
warn("tls_init");
129-
goto err;
130-
}
131-
132127
tlscfg = tls_config_new();
133128
if (tlscfg == NULL) {
134129
warn("tls_config_new");

apps/ocspcheck/ocspcheck.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ocspcheck.c,v 1.29 2021/02/09 16:55:51 claudio Exp $ */
1+
/* $OpenBSD: ocspcheck.c,v 1.30 2021/07/12 15:09:21 beck Exp $ */
22

33
/*
44
* Copyright (c) 2017,2020 Bob Beck <[email protected]>
@@ -617,14 +617,14 @@ main(int argc, char **argv)
617617

618618
if (cafile != NULL) {
619619
if (unveil(cafile, "r") == -1)
620-
err(1, "unveil");
620+
err(1, "unveil %s", cafile);
621621
}
622622
if (cadir != NULL) {
623623
if (unveil(cadir, "r") == -1)
624-
err(1, "unveil");
624+
err(1, "unveil %s", cadir);
625625
}
626626
if (unveil(certfile, "r") == -1)
627-
err(1, "unveil");
627+
err(1, "unveil %s", certfile);
628628

629629
if (pledge("stdio inet rpath dns", NULL) == -1)
630630
err(1, "pledge");

apps/openssl/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ if(WIN32)
6262
endif()
6363

6464
check_function_exists(strtonum HAVE_STRTONUM)
65-
if(HAVE_STRTONUM)
65+
if(HAVE_STRTONUM AND CMAKE_SYSTEM_NAME MATCHES "Darwin" AND
66+
CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20)
6667
add_definitions(-DHAVE_STRTONUM)
6768
else()
6869
set(OPENSSL_SRC ${OPENSSL_SRC} compat/strtonum.c)

apps/openssl/apps.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: apps.h,v 1.27 2021/03/31 17:13:54 tb Exp $ */
1+
/* $OpenBSD: apps.h,v 1.28 2021/09/02 11:30:15 inoguchi Exp $ */
22
/* Copyright (C) 1995-1998 Eric Young ([email protected])
33
* All rights reserved.
44
*
@@ -207,6 +207,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
207207
#define DB_TYPE_REV 'R'
208208
#define DB_TYPE_EXP 'E'
209209
#define DB_TYPE_VAL 'V'
210+
#define DB_TYPE_SUSP 'S'
210211

211212
typedef struct db_attr_st {
212213
int unique_subject;

0 commit comments

Comments
 (0)