Change in docker-playground[master]: redmine: Fix openid

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Oct 7 09:17:40 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11259 )

Change subject: redmine: Fix openid
......................................................................

redmine: Fix openid

For some reason, redmine:3.4 ships with ancient (2014) ruby-openid,
which is no longer compatible with the way how ruby handles HMAC.

Change-Id: I60f6f1ede059accf6b29891abcfe3b2529744e8a
---
M redmine/Dockerfile
A redmine/hmac.diff
2 files changed, 24 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/redmine/Dockerfile b/redmine/Dockerfile
index 25f6308..488d6f4 100644
--- a/redmine/Dockerfile
+++ b/redmine/Dockerfile
@@ -7,3 +7,6 @@
 		mscgen \
 		patch && \
 	apt-get clean
+
+ADD	hmac.diff /tmp/hmac.diff
+RUN	cd / && patch -p0 < /tmp/hmac.diff
diff --git a/redmine/hmac.diff b/redmine/hmac.diff
new file mode 100644
index 0000000..197960b
--- /dev/null
+++ b/redmine/hmac.diff
@@ -0,0 +1,21 @@
+--- usr/local/bundle/gems/ruby-openid-2.3.0/lib/openid/cryptutil.rb.old	2018-10-07 08:53:33.612724431 +0000
++++ usr/local/bundle/gems/ruby-openid-2.3.0/lib/openid/cryptutil.rb	2018-10-07 08:54:03.016525355 +0000
+@@ -39,6 +39,6 @@
+     def CryptUtil.hmac_sha1(key, text)
+-      if Digest.const_defined? :HMAC
+-        Digest::HMAC.new(key,Digest::SHA1).update(text).digest
++      if defined? OpenSSL
++        OpenSSL::HMAC.digest(OpenSSL::Digest::SHA1.new, key, text)
+       else
+         return HMAC::SHA1.digest(key, text)
+       end
+@@ -50,7 +50,7 @@
+ 
+     def CryptUtil.hmac_sha256(key, text)
+-      if Digest.const_defined? :HMAC
+-        Digest::HMAC.new(key,Digest::SHA256).update(text).digest
++      if defined? OpenSSL
++        OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, key, text)
+       else
+         return HMAC::SHA256.digest(key, text)
+       end

-- 
To view, visit https://gerrit.osmocom.org/11259
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I60f6f1ede059accf6b29891abcfe3b2529744e8a
Gerrit-Change-Number: 11259
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181007/93c0bd47/attachment.htm>


More information about the gerrit-log mailing list