summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-01-27 20:29:47 +0100
committerJames Turnbull <james@lovedthanlost.net>2010-01-28 12:02:15 +1100
commit46f9d00714d8fa6c2dc88d1e4f19ed6786943220 (patch)
tree8a234ab1f7fd34aa7a7ef08a1d5e7a2eba08aaf5 /lib
parent04842efb37d31f697f726d8bd9ae38788aa3dc5c (diff)
downloadpuppet-46f9d00714d8fa6c2dc88d1e4f19ed6786943220.tar.gz
puppet-46f9d00714d8fa6c2dc88d1e4f19ed6786943220.tar.xz
puppet-46f9d00714d8fa6c2dc88d1e4f19ed6786943220.zip
Fix #3117 - cert fingerprinting uses a method not available in ruby <= 1.8.6
OpenSSL::Digest.hexdigest is not available on older ruby versions. This patch accesses directly to the digest instead (which hopefully support hexdigest). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/ssl/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/ssl/base.rb b/lib/puppet/ssl/base.rb
index 6c74b7565..7452a513d 100644
--- a/lib/puppet/ssl/base.rb
+++ b/lib/puppet/ssl/base.rb
@@ -68,7 +68,7 @@ class Puppet::SSL::Base
raise ArgumentError, "#{md} is not a valid digest algorithm for fingerprinting certificate #{name}"
end
- OpenSSL::Digest.hexdigest(md, content.to_der).scan(/../).join(':').upcase
+ OpenSSL::Digest.const_get(md).hexdigest(content.to_der).scan(/../).join(':').upcase
end
private