~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to lib/rubygems/gem_openssl.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
  end
37
37
end
38
38
 
 
39
# :stopdoc:
 
40
 
39
41
begin
40
42
  require 'openssl'
41
43
 
42
44
  # Reference a constant defined in the .rb portion of ssl (just to
43
45
  # make sure that part is loaded too).
44
46
 
45
 
  dummy = OpenSSL::Digest::SHA1
46
 
 
47
 
  Gem.ssl_available = true
48
 
 
49
 
  class OpenSSL::X509::Certificate # :nodoc:
 
47
  Gem.ssl_available = !!OpenSSL::Digest::SHA1
 
48
 
 
49
  class OpenSSL::X509::Certificate
50
50
    # Check the validity of this certificate.
51
51
    def check_validity(issuer_cert = nil, time = Time.now)
52
52
      ret = if @not_before && @not_before > time
68
68
  Gem.ssl_available = false
69
69
end
70
70
 
71
 
# :stopdoc:
72
 
 
73
71
module Gem::SSL
74
72
 
75
73
  # We make our own versions of the constants here.  This allows us
90
88
 
91
89
end
92
90
 
93
 
# :startdoc:
94