Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added the following patch from the dev@openidenabled.com mailing list:

http://lists.openidenabled.com/pipermail/dev/attachments/20091101/9a551153/attachment.bin

Original Message:
zblut at cerego.co.jp zblut at cerego.co.jp
Sun Nov 1 23:18:16 PST 2009
darcs patch: This is a quick hack to try and load the ruby-hmac imp...
  "* This is a quick hack to try and load the ruby-hmac implementations of hmac-sha1 and sha2,
  because if a user has ruby-oauth installed on the same system with ruby-openid, the user
  will get really annoying warning messages about hmac CONSTANTS being overwritten.
  A diff of the code shows that these hmac implementations are the same code, so this should be
  safe.

  silence_hmac_warnings_with_oauth_gem"

Patch format wasn't correct, seemed to be from a darcs output, but wasn't in the repo.  Applied the patch manually.
  • Loading branch information...
commit 16e8cf107bea48c1be8bc285bb567236a57af04c 1 parent c06bd57
Lilli authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/openid/cryptutil.rb
View
11 lib/openid/cryptutil.rb
@@ -4,8 +4,15 @@
begin
require "digest/hmac"
rescue LoadError
- require "hmac/sha1"
- require "hmac/sha2"
+ begin
+ # Try loading the ruby-hmac files if they exist
+ require "hmac-sha1"
+ require "hmac-sha2"
+ rescue LoadError
+ # Nothing exists use included hmac files
+ require "hmac/sha1"
+ require "hmac/sha2"
+ end
end
module OpenID
Please sign in to comment.
Something went wrong with that request. Please try again.