r509-validity-crl 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE.md +13 -0
- data/README.md +17 -0
- data/Rakefile +30 -0
- data/doc/Kernel.html +174 -0
- data/doc/R509.html +115 -0
- data/doc/R509/Validity.html +115 -0
- data/doc/R509/Validity/CRL.html +140 -0
- data/doc/R509/Validity/CRL/Checker.html +575 -0
- data/doc/R509/Validity/Redis.html +129 -0
- data/doc/R509/Validity/Redis/Checker.html +409 -0
- data/doc/R509/Validity/Redis/Writer.html +556 -0
- data/doc/_index.html +160 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.README.html +92 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +92 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +89 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/r509/validity/crl.rb +14 -0
- data/lib/r509/validity/crl/checker.rb +51 -0
- data/lib/r509/validity/crl/version.rb +7 -0
- data/spec/checker_spec.rb +41 -0
- data/spec/fixtures/digi.crl +0 -0
- data/spec/fixtures/tw.crl +0 -0
- data/spec/spec_helper.rb +13 -0
- metadata +169 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe R509::Validity::CRL::Checker do
|
4
|
+
before :all do
|
5
|
+
@path = File.dirname(__FILE__) + '/fixtures/tw.crl'
|
6
|
+
@path2 = File.dirname(__FILE__) + '/fixtures/digi.crl'
|
7
|
+
end
|
8
|
+
it "initializes with custom scheduler interval" do
|
9
|
+
expect { R509::Validity::CRL::Checker.new([],'30m') }.to_not raise_error
|
10
|
+
end
|
11
|
+
it "loads a single CRL" do
|
12
|
+
checker = R509::Validity::CRL::Checker.new([@path])
|
13
|
+
checker.crls.size.should == 1
|
14
|
+
end
|
15
|
+
it "loads multiple CRLs" do
|
16
|
+
checker = R509::Validity::CRL::Checker.new([@path,@path2])
|
17
|
+
checker.crls.size.should == 2
|
18
|
+
end
|
19
|
+
it "gets valid" do
|
20
|
+
checker = R509::Validity::CRL::Checker.new([@path,@path2])
|
21
|
+
status = checker.check('/C=US/O=SecureTrust Corporation/CN=SecureTrust CA',28343844)
|
22
|
+
status.status.should == R509::Validity::VALID
|
23
|
+
status2 = checker.check('/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1',12345)
|
24
|
+
status2.status.should == R509::Validity::VALID
|
25
|
+
end
|
26
|
+
it "gets revoked" do
|
27
|
+
checker = R509::Validity::CRL::Checker.new([@path,@path2])
|
28
|
+
status = checker.check('/C=US/O=SecureTrust Corporation/CN=SecureTrust CA',1073741988)
|
29
|
+
status.status.should == R509::Validity::REVOKED
|
30
|
+
status.revocation_time.should == 1193349017
|
31
|
+
status2 = checker.check('/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1',16849924485970054612761793550114076650)
|
32
|
+
status2.status.should == R509::Validity::REVOKED
|
33
|
+
status2.revocation_time.should == 1323439403
|
34
|
+
status2.revocation_reason.should == 'Unspecified'
|
35
|
+
end
|
36
|
+
it "next_update is cached from the parsed CRLs" do
|
37
|
+
checker = R509::Validity::CRL::Checker.new([@path,@path2])
|
38
|
+
checker.crls['/C=US/O=SecureTrust Corporation/CN=SecureTrust CA'][:next_update].to_i.should == 1375401002
|
39
|
+
checker.crls['/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1'][:next_update].to_i.should == 1375808400
|
40
|
+
end
|
41
|
+
end
|
Binary file
|
Binary file
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
begin
|
4
|
+
require 'coveralls'
|
5
|
+
Coveralls.wear!
|
6
|
+
rescue LoadError
|
7
|
+
end
|
8
|
+
|
9
|
+
$:.unshift File.expand_path("../../lib", __FILE__)
|
10
|
+
$:.unshift File.expand_path("../", __FILE__)
|
11
|
+
require 'rubygems'
|
12
|
+
require 'rspec'
|
13
|
+
require 'r509/validity/crl'
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: r509-validity-crl
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Paul Kehrer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDhTCCAm2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMRYwFAYDVQQDDA1wYXVs
|
14
|
+
Lmwua2VocmVyMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
15
|
+
FgNjb20wHhcNMTMxMjA2MDAzNTU0WhcNMTQxMjA2MDAzNTU0WjBEMRYwFAYDVQQD
|
16
|
+
DA1wYXVsLmwua2VocmVyMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJ
|
17
|
+
k/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLVC6U
|
18
|
+
0ZyX4C4HllJxHW0Uq39bvRvfNXc0RXMSvIRklxjupx3EICVATpAJzg4qBxbpxRTe
|
19
|
+
XcsmuYfaZAriSH2M97C2sBJnVEAr63ws2vmBQKw9cXHV3RjQTeqQUTQudE790DTI
|
20
|
+
7pc1ObprB4pM2j3O6JtPVzmJ/PGACjtyg4bys6bx7JQJW5liunK26mS6w6mAAcAV
|
21
|
+
scAz7oh6fmOI0OSS45l3ycOEh5sb42cZzs7TNzcvVmEppTRa4wBP4/eDTuohxlPH
|
22
|
+
skuIPWcdU6YTo2LWwqEaGgUItj8lRqXGDcEZ1FhKyZ6HUD3l1zPGxojW8BKr0Svj
|
23
|
+
/cMP+y0YH5OeoD+vAgMBAAGjgYEwfzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAd
|
24
|
+
BgNVHQ4EFgQURv1xuy9aKzcxwxkGiL/e4UYCWGowIgYDVR0RBBswGYEXcGF1bC5s
|
25
|
+
LmtlaHJlckBnbWFpbC5jb20wIgYDVR0SBBswGYEXcGF1bC5sLmtlaHJlckBnbWFp
|
26
|
+
bC5jb20wDQYJKoZIhvcNAQEFBQADggEBADsnINhvXWJ8r7U02fzbmOitcDZOlCnN
|
27
|
+
jtyYfzDbYtEnQCpBCHhpNC8SVI3OUgGJbrb5Debs0f1UxrYsGn0u8LsLu6xmst+D
|
28
|
+
zZdxtzvnsqowLw2dCzXow0CGwBGcWq38Wqn0v/ez3otQBj2GGGV0jyLUoRWfMwTK
|
29
|
+
dqbGuJ0s/ZORipbl4jdfucPbrGPQHmf8/H8w0/kH7tBnhcyGI1exBSQexiu2qRqP
|
30
|
+
wQ9nsK5DoJSWf5vG8Xu/TEnv2Gu8z6T4wBrbIr20EYu6lb0i5ekGhrHOcaPRI6X9
|
31
|
+
lYMLMTFSyjE66v5QiUlZ9V4oV6O/MPS9fXPxog3TCsYpgfsgA+RlO8I=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: r509
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.9.0
|
42
|
+
type: :runtime
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.9.0
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rufus-scheduler
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3.0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rake
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: rspec
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
type: :development
|
85
|
+
prerelease: false
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: syntax
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
type: :development
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
description: A Validity::Writer and Validity::Checker for r509, implemented with a
|
106
|
+
CRL loader backend
|
107
|
+
email: paul.l.kehrer@gmail.com
|
108
|
+
executables: []
|
109
|
+
extensions: []
|
110
|
+
extra_rdoc_files: []
|
111
|
+
files:
|
112
|
+
- README.md
|
113
|
+
- LICENSE.md
|
114
|
+
- Rakefile
|
115
|
+
- lib/r509/validity/crl/checker.rb
|
116
|
+
- lib/r509/validity/crl/version.rb
|
117
|
+
- lib/r509/validity/crl.rb
|
118
|
+
- spec/checker_spec.rb
|
119
|
+
- spec/fixtures/digi.crl
|
120
|
+
- spec/fixtures/tw.crl
|
121
|
+
- spec/spec_helper.rb
|
122
|
+
- doc/_index.html
|
123
|
+
- doc/class_list.html
|
124
|
+
- doc/css/common.css
|
125
|
+
- doc/css/full_list.css
|
126
|
+
- doc/css/style.css
|
127
|
+
- doc/file.README.html
|
128
|
+
- doc/file_list.html
|
129
|
+
- doc/frames.html
|
130
|
+
- doc/index.html
|
131
|
+
- doc/js/app.js
|
132
|
+
- doc/js/full_list.js
|
133
|
+
- doc/js/jquery.js
|
134
|
+
- doc/Kernel.html
|
135
|
+
- doc/method_list.html
|
136
|
+
- doc/R509/Validity/CRL/Checker.html
|
137
|
+
- doc/R509/Validity/CRL.html
|
138
|
+
- doc/R509/Validity/Redis/Checker.html
|
139
|
+
- doc/R509/Validity/Redis/Writer.html
|
140
|
+
- doc/R509/Validity/Redis.html
|
141
|
+
- doc/R509/Validity.html
|
142
|
+
- doc/R509.html
|
143
|
+
- doc/top-level-namespace.html
|
144
|
+
homepage: https://langui.sh
|
145
|
+
licenses: []
|
146
|
+
metadata: {}
|
147
|
+
post_install_message:
|
148
|
+
rdoc_options: []
|
149
|
+
require_paths:
|
150
|
+
- lib
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - '>='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: 1.9.3
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - '>='
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
requirements: []
|
162
|
+
rubyforge_project:
|
163
|
+
rubygems_version: 2.0.3
|
164
|
+
signing_key:
|
165
|
+
specification_version: 4
|
166
|
+
summary: A Validity::Writer and Validity::Checker for r509, implemented with a CRL
|
167
|
+
loader backend
|
168
|
+
test_files: []
|
169
|
+
has_rdoc: false
|
metadata.gz.sig
ADDED
Binary file
|