[PR #795] [CLOSED] Support for LibreSSL version of openssl on macOS #929

Closed
opened 2025-12-29 01:30:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dehydrated-io/dehydrated/pull/795
Author: @n8felton
Created: 1/6/2021
Status: Closed

Base: masterHead: master


📄 Description

When using the native openssl on macOS 10.14.6 Mojave, the output of openssl dgst -sha256 -c -hex is slightly different ((stdin)= vs not). This PR allows for both styles of output.

More Information

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G6032

$ which openssl
/usr/bin/openssl

$ $(which openssl) version
LibreSSL 2.6.5

$ /usr/local/openssl-1.1.1g/bin/openssl version
OpenSSL 1.1.1g  21 Apr 2020

Using macOS version of openssl

$ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/bin/openssl dgst -sha256 -c -hex
5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf

# Original AWK
$ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/bin/openssl dgst -sha256 -c -hex | awk '{print $2}'
<empty return>

# PR AWK
$ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/bin/openssl dgst -sha256 -c -hex | awk '{print $NF}'
5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf

Using pure openssl

$ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/local/openssl-1.1.1g/bin/openssl dgst -sha256 -c -hex
(stdin)= 5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf

# Original AWK
$ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/local/openssl-1.1.1g/bin/openssl dgst -sha256 -c -hex | awk '{print $2}'
5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf

# PR AWK
$ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/local/openssl-1.1.1g/bin/openssl dgst -sha256 -c -hex | awk '{print $NF}'
5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dehydrated-io/dehydrated/pull/795 **Author:** [@n8felton](https://github.com/n8felton) **Created:** 1/6/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📄 Description When using the native `openssl` on macOS 10.14.6 Mojave, the output of `openssl dgst -sha256 -c -hex` is slightly different (`(stdin)= ` vs not). This PR allows for both styles of output. ### More Information ``` $ sw_vers ProductName: Mac OS X ProductVersion: 10.14.6 BuildVersion: 18G6032 $ which openssl /usr/bin/openssl $ $(which openssl) version LibreSSL 2.6.5 $ /usr/local/openssl-1.1.1g/bin/openssl version OpenSSL 1.1.1g 21 Apr 2020 ``` #### Using macOS version of `openssl` ``` $ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/bin/openssl dgst -sha256 -c -hex 5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf # Original AWK $ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/bin/openssl dgst -sha256 -c -hex | awk '{print $2}' <empty return> # PR AWK $ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/bin/openssl dgst -sha256 -c -hex | awk '{print $NF}' 5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf ``` #### Using pure `openssl` ``` $ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/local/openssl-1.1.1g/bin/openssl dgst -sha256 -c -hex (stdin)= 5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf # Original AWK $ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/local/openssl-1.1.1g/bin/openssl dgst -sha256 -c -hex | awk '{print $2}' 5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf # PR AWK $ printf %s voMCgod0Y9dLXdu4UHOvstn1Ah3QFcl_k6odYRoOJRA.NTdUdXp2fAk-ZSiRqXVaLG2RN0Z81qvvLAKlZWn_0Hc | /usr/local/openssl-1.1.1g/bin/openssl dgst -sha256 -c -hex | awk '{print $NF}' 5b:2a:0d:26:cd:30:b6:20:47:d2:0d:e9:8e:d1:93:db:01:a2:9c:df:03:20:ad:07:b6:64:64:21:37:47:5f:cf ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 01:30:03 +01:00
adam closed this issue 2025-12-29 01:30:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#929