r509 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/README.md +447 -0
  2. data/Rakefile +38 -0
  3. data/bin/r509 +96 -0
  4. data/bin/r509-parse +35 -0
  5. data/doc/R509.html +154 -0
  6. data/doc/R509/Cert.html +3954 -0
  7. data/doc/R509/Cert/Extensions.html +360 -0
  8. data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +391 -0
  9. data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +148 -0
  10. data/doc/R509/Cert/Extensions/BasicConstraints.html +482 -0
  11. data/doc/R509/Cert/Extensions/CrlDistributionPoints.html +316 -0
  12. data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +780 -0
  13. data/doc/R509/Cert/Extensions/KeyUsage.html +1230 -0
  14. data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +467 -0
  15. data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +216 -0
  16. data/doc/R509/CertificateAuthority.html +126 -0
  17. data/doc/R509/CertificateAuthority/Signer.html +855 -0
  18. data/doc/R509/Config.html +127 -0
  19. data/doc/R509/Config/CaConfig.html +2144 -0
  20. data/doc/R509/Config/CaConfigPool.html +599 -0
  21. data/doc/R509/Config/CaProfile.html +656 -0
  22. data/doc/R509/Config/SubjectItemPolicy.html +578 -0
  23. data/doc/R509/Crl.html +126 -0
  24. data/doc/R509/Crl/Administrator.html +2077 -0
  25. data/doc/R509/Crl/Parser.html +1224 -0
  26. data/doc/R509/Csr.html +2248 -0
  27. data/doc/R509/IOHelpers.html +564 -0
  28. data/doc/R509/MessageDigest.html +396 -0
  29. data/doc/R509/NameSanitizer.html +319 -0
  30. data/doc/R509/Ocsp.html +128 -0
  31. data/doc/R509/Ocsp/Request.html +126 -0
  32. data/doc/R509/Ocsp/Request/Nonce.html +160 -0
  33. data/doc/R509/Ocsp/Response.html +837 -0
  34. data/doc/R509/OidMapper.html +393 -0
  35. data/doc/R509/PrivateKey.html +1647 -0
  36. data/doc/R509/R509Error.html +134 -0
  37. data/doc/R509/Spki.html +1424 -0
  38. data/doc/R509/Subject.html +836 -0
  39. data/doc/R509/Validity.html +160 -0
  40. data/doc/R509/Validity/Checker.html +320 -0
  41. data/doc/R509/Validity/DefaultChecker.html +283 -0
  42. data/doc/R509/Validity/DefaultWriter.html +330 -0
  43. data/doc/R509/Validity/Status.html +561 -0
  44. data/doc/R509/Validity/Writer.html +394 -0
  45. data/doc/_index.html +501 -0
  46. data/doc/class_list.html +53 -0
  47. data/doc/css/common.css +1 -0
  48. data/doc/css/full_list.css +57 -0
  49. data/doc/css/style.css +328 -0
  50. data/doc/file.README.html +534 -0
  51. data/doc/file.r509.html +149 -0
  52. data/doc/file_list.html +58 -0
  53. data/doc/frames.html +28 -0
  54. data/doc/index.html +534 -0
  55. data/doc/js/app.js +208 -0
  56. data/doc/js/full_list.js +173 -0
  57. data/doc/js/jquery.js +4 -0
  58. data/doc/methods_list.html +1932 -0
  59. data/doc/top-level-namespace.html +112 -0
  60. data/lib/r509.rb +22 -0
  61. data/lib/r509/cert.rb +414 -0
  62. data/lib/r509/cert/extensions.rb +309 -0
  63. data/lib/r509/certificateauthority.rb +290 -0
  64. data/lib/r509/config.rb +407 -0
  65. data/lib/r509/crl.rb +379 -0
  66. data/lib/r509/csr.rb +324 -0
  67. data/lib/r509/exceptions.rb +5 -0
  68. data/lib/r509/io_helpers.rb +52 -0
  69. data/lib/r509/messagedigest.rb +49 -0
  70. data/lib/r509/ocsp.rb +85 -0
  71. data/lib/r509/oidmapper.rb +32 -0
  72. data/lib/r509/privatekey.rb +185 -0
  73. data/lib/r509/spki.rb +112 -0
  74. data/lib/r509/subject.rb +133 -0
  75. data/lib/r509/validity.rb +92 -0
  76. data/lib/r509/version.rb +4 -0
  77. data/r509.yaml +73 -0
  78. data/spec/cert/extensions_spec.rb +632 -0
  79. data/spec/cert_spec.rb +321 -0
  80. data/spec/certificate_authority_spec.rb +260 -0
  81. data/spec/config_spec.rb +349 -0
  82. data/spec/crl_spec.rb +215 -0
  83. data/spec/csr_spec.rb +302 -0
  84. data/spec/fixtures.rb +233 -0
  85. data/spec/fixtures/cert1.der +0 -0
  86. data/spec/fixtures/cert1.pem +24 -0
  87. data/spec/fixtures/cert1_public_key_modulus.txt +1 -0
  88. data/spec/fixtures/cert3.p12 +0 -0
  89. data/spec/fixtures/cert3.pem +28 -0
  90. data/spec/fixtures/cert3_key.pem +27 -0
  91. data/spec/fixtures/cert3_key_des3.pem +30 -0
  92. data/spec/fixtures/cert4.pem +14 -0
  93. data/spec/fixtures/cert5.pem +30 -0
  94. data/spec/fixtures/cert6.pem +26 -0
  95. data/spec/fixtures/cert_expired.pem +26 -0
  96. data/spec/fixtures/cert_not_yet_valid.pem +26 -0
  97. data/spec/fixtures/cert_san.pem +27 -0
  98. data/spec/fixtures/cert_san2.pem +22 -0
  99. data/spec/fixtures/config_pool_test_minimal.yaml +15 -0
  100. data/spec/fixtures/config_test.yaml +41 -0
  101. data/spec/fixtures/config_test_engine_key.yaml +7 -0
  102. data/spec/fixtures/config_test_engine_no_key_name.yaml +6 -0
  103. data/spec/fixtures/config_test_minimal.yaml +7 -0
  104. data/spec/fixtures/config_test_password.yaml +7 -0
  105. data/spec/fixtures/config_test_various.yaml +100 -0
  106. data/spec/fixtures/crl_list_file.txt +1 -0
  107. data/spec/fixtures/crl_with_reason.pem +17 -0
  108. data/spec/fixtures/csr1.der +0 -0
  109. data/spec/fixtures/csr1.pem +17 -0
  110. data/spec/fixtures/csr1_key.der +0 -0
  111. data/spec/fixtures/csr1_key.pem +27 -0
  112. data/spec/fixtures/csr1_key_encrypted_des3.pem +30 -0
  113. data/spec/fixtures/csr1_newlines.pem +32 -0
  114. data/spec/fixtures/csr1_no_begin_end.pem +15 -0
  115. data/spec/fixtures/csr1_public_key_modulus.txt +1 -0
  116. data/spec/fixtures/csr2.pem +15 -0
  117. data/spec/fixtures/csr2_key.pem +27 -0
  118. data/spec/fixtures/csr3.pem +16 -0
  119. data/spec/fixtures/csr4.pem +25 -0
  120. data/spec/fixtures/csr_dsa.pem +15 -0
  121. data/spec/fixtures/csr_invalid_signature.pem +13 -0
  122. data/spec/fixtures/dsa_key.pem +20 -0
  123. data/spec/fixtures/key4.pem +27 -0
  124. data/spec/fixtures/key4_encrypted_des3.pem +30 -0
  125. data/spec/fixtures/missing_key_identifier_ca.cer +21 -0
  126. data/spec/fixtures/missing_key_identifier_ca.key +27 -0
  127. data/spec/fixtures/ocsptest.r509.local.pem +27 -0
  128. data/spec/fixtures/ocsptest.r509.local_ocsp_request.der +0 -0
  129. data/spec/fixtures/ocsptest2.r509.local.pem +27 -0
  130. data/spec/fixtures/second_ca.cer +26 -0
  131. data/spec/fixtures/second_ca.key +27 -0
  132. data/spec/fixtures/spkac.der +0 -0
  133. data/spec/fixtures/spkac.txt +1 -0
  134. data/spec/fixtures/spkac_dsa.txt +1 -0
  135. data/spec/fixtures/stca.pem +22 -0
  136. data/spec/fixtures/stca_ocsp_request.der +0 -0
  137. data/spec/fixtures/stca_ocsp_response.der +0 -0
  138. data/spec/fixtures/test1.csr +17 -0
  139. data/spec/fixtures/test_ca.cer +22 -0
  140. data/spec/fixtures/test_ca.key +28 -0
  141. data/spec/fixtures/test_ca.p12 +0 -0
  142. data/spec/fixtures/test_ca_des3.key +30 -0
  143. data/spec/fixtures/test_ca_ocsp.cer +26 -0
  144. data/spec/fixtures/test_ca_ocsp.key +27 -0
  145. data/spec/fixtures/test_ca_ocsp.p12 +0 -0
  146. data/spec/fixtures/test_ca_ocsp_chain.txt +48 -0
  147. data/spec/fixtures/test_ca_ocsp_response.der +0 -0
  148. data/spec/fixtures/test_ca_subroot.cer +26 -0
  149. data/spec/fixtures/test_ca_subroot.key +27 -0
  150. data/spec/fixtures/test_ca_subroot_ocsp.cer +25 -0
  151. data/spec/fixtures/test_ca_subroot_ocsp.key +27 -0
  152. data/spec/fixtures/test_ca_subroot_ocsp_response.der +0 -0
  153. data/spec/fixtures/unknown_oid.csr +17 -0
  154. data/spec/message_digest_spec.rb +89 -0
  155. data/spec/ocsp_spec.rb +111 -0
  156. data/spec/oid_mapper_spec.rb +31 -0
  157. data/spec/privatekey_spec.rb +198 -0
  158. data/spec/spec_helper.rb +14 -0
  159. data/spec/spki_spec.rb +157 -0
  160. data/spec/subject_spec.rb +203 -0
  161. data/spec/validity_spec.rb +98 -0
  162. metadata +257 -0
metadata ADDED
@@ -0,0 +1,257 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: r509
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.8'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Paul Kehrer
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: simplecov
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: A module that allows you to create CSRs, issue certs off a CA, view the
63
+ certs, create CRLs, run an OCSP responder, and much more
64
+ email: paul.l.kehrer@gmail.com
65
+ executables:
66
+ - r509
67
+ - r509-parse
68
+ extensions: []
69
+ extra_rdoc_files: []
70
+ files:
71
+ - README.md
72
+ - r509.yaml
73
+ - Rakefile
74
+ - lib/r509/cert/extensions.rb
75
+ - lib/r509/cert.rb
76
+ - lib/r509/certificateauthority.rb
77
+ - lib/r509/config.rb
78
+ - lib/r509/crl.rb
79
+ - lib/r509/csr.rb
80
+ - lib/r509/exceptions.rb
81
+ - lib/r509/io_helpers.rb
82
+ - lib/r509/messagedigest.rb
83
+ - lib/r509/ocsp.rb
84
+ - lib/r509/oidmapper.rb
85
+ - lib/r509/privatekey.rb
86
+ - lib/r509/spki.rb
87
+ - lib/r509/subject.rb
88
+ - lib/r509/validity.rb
89
+ - lib/r509/version.rb
90
+ - lib/r509.rb
91
+ - bin/r509
92
+ - bin/r509-parse
93
+ - spec/cert/extensions_spec.rb
94
+ - spec/cert_spec.rb
95
+ - spec/certificate_authority_spec.rb
96
+ - spec/config_spec.rb
97
+ - spec/crl_spec.rb
98
+ - spec/csr_spec.rb
99
+ - spec/fixtures/cert1.der
100
+ - spec/fixtures/cert1.pem
101
+ - spec/fixtures/cert1_public_key_modulus.txt
102
+ - spec/fixtures/cert3.p12
103
+ - spec/fixtures/cert3.pem
104
+ - spec/fixtures/cert3_key.pem
105
+ - spec/fixtures/cert3_key_des3.pem
106
+ - spec/fixtures/cert4.pem
107
+ - spec/fixtures/cert5.pem
108
+ - spec/fixtures/cert6.pem
109
+ - spec/fixtures/cert_expired.pem
110
+ - spec/fixtures/cert_not_yet_valid.pem
111
+ - spec/fixtures/cert_san.pem
112
+ - spec/fixtures/cert_san2.pem
113
+ - spec/fixtures/config_pool_test_minimal.yaml
114
+ - spec/fixtures/config_test.yaml
115
+ - spec/fixtures/config_test_engine_key.yaml
116
+ - spec/fixtures/config_test_engine_no_key_name.yaml
117
+ - spec/fixtures/config_test_minimal.yaml
118
+ - spec/fixtures/config_test_password.yaml
119
+ - spec/fixtures/config_test_various.yaml
120
+ - spec/fixtures/crl_list_file.txt
121
+ - spec/fixtures/crl_with_reason.pem
122
+ - spec/fixtures/csr1.der
123
+ - spec/fixtures/csr1.pem
124
+ - spec/fixtures/csr1_key.der
125
+ - spec/fixtures/csr1_key.pem
126
+ - spec/fixtures/csr1_key_encrypted_des3.pem
127
+ - spec/fixtures/csr1_newlines.pem
128
+ - spec/fixtures/csr1_no_begin_end.pem
129
+ - spec/fixtures/csr1_public_key_modulus.txt
130
+ - spec/fixtures/csr2.pem
131
+ - spec/fixtures/csr2_key.pem
132
+ - spec/fixtures/csr3.pem
133
+ - spec/fixtures/csr4.pem
134
+ - spec/fixtures/csr_dsa.pem
135
+ - spec/fixtures/csr_invalid_signature.pem
136
+ - spec/fixtures/dsa_key.pem
137
+ - spec/fixtures/key4.pem
138
+ - spec/fixtures/key4_encrypted_des3.pem
139
+ - spec/fixtures/missing_key_identifier_ca.cer
140
+ - spec/fixtures/missing_key_identifier_ca.key
141
+ - spec/fixtures/ocsptest.r509.local.pem
142
+ - spec/fixtures/ocsptest.r509.local_ocsp_request.der
143
+ - spec/fixtures/ocsptest2.r509.local.pem
144
+ - spec/fixtures/second_ca.cer
145
+ - spec/fixtures/second_ca.key
146
+ - spec/fixtures/spkac.der
147
+ - spec/fixtures/spkac.txt
148
+ - spec/fixtures/spkac_dsa.txt
149
+ - spec/fixtures/stca.pem
150
+ - spec/fixtures/stca_ocsp_request.der
151
+ - spec/fixtures/stca_ocsp_response.der
152
+ - spec/fixtures/test1.csr
153
+ - spec/fixtures/test_ca.cer
154
+ - spec/fixtures/test_ca.key
155
+ - spec/fixtures/test_ca.p12
156
+ - spec/fixtures/test_ca_des3.key
157
+ - spec/fixtures/test_ca_ocsp.cer
158
+ - spec/fixtures/test_ca_ocsp.key
159
+ - spec/fixtures/test_ca_ocsp.p12
160
+ - spec/fixtures/test_ca_ocsp_chain.txt
161
+ - spec/fixtures/test_ca_ocsp_response.der
162
+ - spec/fixtures/test_ca_subroot.cer
163
+ - spec/fixtures/test_ca_subroot.key
164
+ - spec/fixtures/test_ca_subroot_ocsp.cer
165
+ - spec/fixtures/test_ca_subroot_ocsp.key
166
+ - spec/fixtures/test_ca_subroot_ocsp_response.der
167
+ - spec/fixtures/unknown_oid.csr
168
+ - spec/fixtures.rb
169
+ - spec/message_digest_spec.rb
170
+ - spec/ocsp_spec.rb
171
+ - spec/oid_mapper_spec.rb
172
+ - spec/privatekey_spec.rb
173
+ - spec/spec_helper.rb
174
+ - spec/spki_spec.rb
175
+ - spec/subject_spec.rb
176
+ - spec/validity_spec.rb
177
+ - doc/_index.html
178
+ - doc/class_list.html
179
+ - doc/css/common.css
180
+ - doc/css/full_list.css
181
+ - doc/css/style.css
182
+ - doc/file.r509.html
183
+ - doc/file.README.html
184
+ - doc/file_list.html
185
+ - doc/frames.html
186
+ - doc/index.html
187
+ - doc/js/app.js
188
+ - doc/js/full_list.js
189
+ - doc/js/jquery.js
190
+ - doc/methods_list.html
191
+ - doc/R509/Cert/Extensions/AuthorityInfoAccess.html
192
+ - doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html
193
+ - doc/R509/Cert/Extensions/BasicConstraints.html
194
+ - doc/R509/Cert/Extensions/CrlDistributionPoints.html
195
+ - doc/R509/Cert/Extensions/ExtendedKeyUsage.html
196
+ - doc/R509/Cert/Extensions/KeyUsage.html
197
+ - doc/R509/Cert/Extensions/SubjectAlternativeName.html
198
+ - doc/R509/Cert/Extensions/SubjectKeyIdentifier.html
199
+ - doc/R509/Cert/Extensions.html
200
+ - doc/R509/Cert.html
201
+ - doc/R509/CertificateAuthority/Signer.html
202
+ - doc/R509/CertificateAuthority.html
203
+ - doc/R509/Config/CaConfig.html
204
+ - doc/R509/Config/CaConfigPool.html
205
+ - doc/R509/Config/CaProfile.html
206
+ - doc/R509/Config/SubjectItemPolicy.html
207
+ - doc/R509/Config.html
208
+ - doc/R509/Crl/Administrator.html
209
+ - doc/R509/Crl/Parser.html
210
+ - doc/R509/Crl.html
211
+ - doc/R509/Csr.html
212
+ - doc/R509/IOHelpers.html
213
+ - doc/R509/MessageDigest.html
214
+ - doc/R509/NameSanitizer.html
215
+ - doc/R509/Ocsp/Request/Nonce.html
216
+ - doc/R509/Ocsp/Request.html
217
+ - doc/R509/Ocsp/Response.html
218
+ - doc/R509/Ocsp.html
219
+ - doc/R509/OidMapper.html
220
+ - doc/R509/PrivateKey.html
221
+ - doc/R509/R509Error.html
222
+ - doc/R509/Spki.html
223
+ - doc/R509/Subject.html
224
+ - doc/R509/Validity/Checker.html
225
+ - doc/R509/Validity/DefaultChecker.html
226
+ - doc/R509/Validity/DefaultWriter.html
227
+ - doc/R509/Validity/Status.html
228
+ - doc/R509/Validity/Writer.html
229
+ - doc/R509/Validity.html
230
+ - doc/R509.html
231
+ - doc/top-level-namespace.html
232
+ homepage: http://r509.org
233
+ licenses: []
234
+ post_install_message:
235
+ rdoc_options: []
236
+ require_paths:
237
+ - lib
238
+ required_ruby_version: !ruby/object:Gem::Requirement
239
+ none: false
240
+ requirements:
241
+ - - ! '>='
242
+ - !ruby/object:Gem::Version
243
+ version: 1.8.6
244
+ required_rubygems_version: !ruby/object:Gem::Requirement
245
+ none: false
246
+ requirements:
247
+ - - ! '>='
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ requirements: []
251
+ rubyforge_project:
252
+ rubygems_version: 1.8.24
253
+ signing_key:
254
+ specification_version: 3
255
+ summary: A (relatively) simple X.509 certification authority
256
+ test_files: []
257
+ has_rdoc: