summaryrefslogtreecommitdiff
path: root/sample/openssl/c_rehash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/openssl/c_rehash.rb')
-rw-r--r--sample/openssl/c_rehash.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/sample/openssl/c_rehash.rb b/sample/openssl/c_rehash.rb
index cd6c9d5fd4..8b005bbb84 100644
--- a/sample/openssl/c_rehash.rb
+++ b/sample/openssl/c_rehash.rb
@@ -1,7 +1,6 @@
#!/usr/bin/env ruby
require 'openssl'
-require 'digest/md5'
class CHashDir
include Enumerable
@@ -157,11 +156,11 @@ private
end
def hash_name(name)
- sprintf("%x", name.hash)
+ sprintf("%08x", name.hash)
end
def fingerprint(der)
- Digest::MD5.hexdigest(der).upcase
+ OpenSSL::Digest.hexdigest('MD5', der).upcase
end
end