Skip to content

Commit 61b04a1

Browse files
committed
hack for el7/x86 where openssl 1.0.2 and 1.1.1 are both installed
for respectively Apache and NGINX 1.20.1; bump to 1.4.5.5rc0 Signed-off-by: Hans Zandbelt <[email protected]>
1 parent 7b37ac9 commit 61b04a1

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
01/22/2024
2+
- hack for el7/x86 where openssl 1.0.2 and openssl 1.1.1 are installed for respectively Apache and NGINX 1.20.1
3+
- bump to 1.4.5.5rc0
4+
15
01/21/2023
26
- revert header_add/header_set change
37
- release 1.4.5.4

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([liboauth2],[1.4.5.4],[[email protected]])
1+
AC_INIT([liboauth2],[1.4.5.5rc0],[[email protected]])
22

33
AM_INIT_AUTOMAKE([foreign no-define subdir-objects])
44
AC_CONFIG_MACRO_DIR([m4])

src/jose.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,19 @@ bool oauth2_jose_hash_bytes(oauth2_log_t *log, const char *digest,
138138
EVP_MD_CTX_init(ctx);
139139

140140
if ((evp_digest = EVP_get_digestbyname(digest)) == NULL) {
141-
oauth2_error(
142-
log,
143-
"no OpenSSL digest algorithm found for algorithm \"%s\"",
144-
digest);
145-
goto end;
141+
// hack away for el7/x86 where Apache is compiled against
142+
// OpenSSL 1.0.2 but NGINX 1.20.1 against OpenSSL 1.1.0
143+
if (strcmp(digest, "sha256") == 0) {
144+
oauth2_debug(log, "try to directly set EVP_sha256");
145+
evp_digest = EVP_sha256();
146+
}
147+
if (evp_digest == NULL) {
148+
oauth2_error(log,
149+
"no OpenSSL digest algorithm found for "
150+
"algorithm \"%s\"",
151+
digest);
152+
goto end;
153+
}
146154
}
147155

148156
if (!EVP_DigestInit_ex(ctx, evp_digest, NULL))

0 commit comments

Comments
 (0)