Skip to content

Commit 4942a49

Browse files
committed
Merge branch 'TinCanTech-libressl-use-EASYRSA_FORCE_SAFE_SSL'
Signed-off-by: Richard T Bonhomme <[email protected]>
2 parents 9ef490a + d231df9 commit 4942a49

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Easy-RSA 3 ChangeLog
22

33
3.2.5 (TBD)
44

5+
* Libressl: Use ONLY $EASYRSA_FORCE_SAFE_SSL (25b7485) (#1402)
56
* select_x509_type_tmp(): This compliments select_ssl_cnf_tmp() (dc754e4) (#1401)
67
* select_ssl_cnf_tmp(): Replace provide_EASYRSA_SSL_CONF_tmp() (538ad3d) (#1401)
78
* inline_file(): Make unknown certificate type non-fatal (b2373e2) (#1399)

easyrsa3/easyrsa

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ easyrsa_openssl() {
12201220
[ -f "$EASYRSA_SSL_CONF" ] || \
12211221
die "easyrsa_openssl - Missing EASYRSA_SSL_CONF"
12221222

1223-
if [ "$ssl_cnf_type" = safe-cnf ] || [ "$EASYRSA_FORCE_SAFE_SSL" ]; then
1223+
if [ "$EASYRSA_FORCE_SAFE_SSL" ]; then
12241224
final_safe_ssl_cnf=
12251225
easyrsa_mktemp final_safe_ssl_cnf
12261226

@@ -1275,17 +1275,11 @@ verify_ssl_lib() {
12751275
# SSL lib name
12761276
case "${val%% *}" in
12771277
OpenSSL)
1278-
ssl_lib=openssl
1279-
# Honor EASYRSA_FORCE_SAFE_SSL
1280-
if [ "$EASYRSA_FORCE_SAFE_SSL" ]; then
1281-
ssl_cnf_type=safe-cnf
1282-
else
1283-
ssl_cnf_type=ssl-cnf
1284-
fi
1278+
ssl_lib_name=openssl
12851279
;;
12861280
LibreSSL)
1287-
ssl_lib=libressl
1288-
ssl_cnf_type=safe-cnf
1281+
ssl_lib_name=libressl
1282+
export EASYRSA_FORCE_SAFE_SSL=1
12891283
;;
12901284
*)
12911285
error_msg="$("$EASYRSA_OPENSSL" version 2>&1)"
@@ -1305,15 +1299,15 @@ $error_msg"
13051299
1) no_password='-nodes' ;;
13061300
2) no_password='-nodes' ;;
13071301
3|4)
1308-
case "$ssl_lib" in
1302+
case "$ssl_lib_name" in
13091303
openssl)
13101304
openssl_v3=1
13111305
no_password='-noenc'
13121306
;;
13131307
libressl)
13141308
no_password='-nodes'
13151309
;;
1316-
*) die "Unexpected SSL library: $ssl_lib"
1310+
*) die "Unexpected SSL library: $ssl_lib_name"
13171311
esac
13181312
;;
13191313
*) die "Unexpected SSL version: $osslv_major"
@@ -5236,7 +5230,7 @@ ssl_cert_x509v3_eku() {
52365230
ceku_known=
52375231

52385232
# Extract certificate Extended Key Usage
5239-
if [ "$ssl_lib" = libressl ]; then
5233+
if [ "$ssl_lib_name" = libressl ]; then
52405234
ceku_eku="$(
52415235
"$EASYRSA_OPENSSL" x509 -in "$ceku_crt" -noout \
52425236
-text | \

0 commit comments

Comments
 (0)