diff options
Diffstat (limited to 'lib/rubygems/security.rb')
-rw-r--r-- | lib/rubygems/security.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb index 2485729488..bed47ab9f3 100644 --- a/lib/rubygems/security.rb +++ b/lib/rubygems/security.rb @@ -5,9 +5,29 @@ #++ require 'rubygems/exceptions' -require 'openssl' require 'fileutils' +begin + require 'openssl' +rescue LoadError => e + raise unless (e.respond_to?(:path) && e.path == 'openssl') || + e.message =~ / -- openssl$/ + + module OpenSSL # :nodoc: + class Digest # :nodoc: + class SHA1 # :nodoc: + def name + 'SHA1' + end + end + end + module PKey # :nodoc: + class RSA # :nodoc: + end + end + end +end + ## # = Signing gems # |