openssl-extensions 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module OpenSSLExtensions
2
- Version = '0.0.3'
2
+ Version = '0.0.4'
3
3
  end
@@ -47,6 +47,15 @@ module OpenSSLExtensions::X509::Certificate
47
47
  self.issuer.organization == issuer.subject.organization)
48
48
  end
49
49
 
50
+ ##
51
+ # Returns +true+ if this certificate is a root certificate (it is its
52
+ # own issuer).
53
+ #
54
+ def root?
55
+ issuer.to_s == subject.to_s &&
56
+ (subject_key_identifier ? subject_key_identifier == authority_key_identifier.key_id : true)
57
+ end
58
+
50
59
  ##
51
60
  # Equality is tested by comparing the generated PEM signatures.
52
61
  #
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathaniel Bibler
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-05 00:00:00 -04:00
17
+ date: 2010-10-08 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency