r509 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +2 -0
  4. data/CONTRIBUTING.mdown +21 -0
  5. data/LICENSE +13 -0
  6. data/README.mdown +548 -0
  7. data/Rakefile +5 -0
  8. data/bin/r509 +16 -17
  9. data/doc/R509.html +42 -26
  10. data/doc/R509/ASN1.html +22 -16
  11. data/doc/R509/ASN1/GeneralName.html +180 -173
  12. data/doc/R509/ASN1/GeneralNames.html +390 -62
  13. data/doc/R509/CRL.html +9 -7
  14. data/doc/R509/CRL/Administrator.html +208 -623
  15. data/doc/R509/CRL/FileReaderWriter.html +856 -0
  16. data/doc/R509/CRL/ReaderWriter.html +524 -0
  17. data/doc/R509/CRL/SignedList.html +29 -42
  18. data/doc/R509/CSR.html +248 -333
  19. data/doc/R509/Cert.html +364 -491
  20. data/doc/R509/Cert/Extensions.html +134 -43
  21. data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +335 -65
  22. data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +201 -102
  23. data/doc/R509/Cert/Extensions/BasicConstraints.html +297 -68
  24. data/doc/R509/Cert/Extensions/CRLDistributionPoints.html +690 -77
  25. data/doc/R509/Cert/Extensions/CertificatePolicies.html +293 -43
  26. data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +321 -173
  27. data/doc/R509/Cert/Extensions/GeneralNamesMixin.html +656 -0
  28. data/doc/R509/Cert/Extensions/InhibitAnyPolicy.html +270 -42
  29. data/doc/R509/Cert/Extensions/KeyUsage.html +334 -184
  30. data/doc/R509/Cert/Extensions/NameConstraints.html +363 -93
  31. data/doc/R509/{ASN1 → Cert/Extensions}/NoticeReference.html +209 -48
  32. data/doc/R509/Cert/Extensions/OCSPNoCheck.html +244 -17
  33. data/doc/R509/Cert/Extensions/PolicyConstraints.html +322 -71
  34. data/doc/R509/{ASN1 → Cert/Extensions}/PolicyInformation.html +204 -43
  35. data/doc/R509/{ASN1 → Cert/Extensions}/PolicyQualifiers.html +205 -48
  36. data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +348 -143
  37. data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +165 -13
  38. data/doc/R509/{ASN1 → Cert/Extensions}/UserNotice.html +204 -43
  39. data/doc/R509/Cert/Extensions/ValidationMixin.html +120 -0
  40. data/doc/R509/CertificateAuthority.html +9 -7
  41. data/doc/R509/CertificateAuthority/OptionsBuilder.html +475 -0
  42. data/doc/R509/CertificateAuthority/Signer.html +149 -198
  43. data/doc/R509/Config.html +10 -8
  44. data/doc/R509/Config/CAConfig.html +708 -625
  45. data/doc/R509/Config/CAConfigPool.html +179 -31
  46. data/doc/R509/Config/CertProfile.html +1544 -0
  47. data/doc/R509/Config/SubjectItemPolicy.html +437 -99
  48. data/doc/R509/Engine.html +14 -28
  49. data/doc/R509/Helpers.html +1014 -0
  50. data/doc/R509/MessageDigest.html +73 -25
  51. data/doc/R509/NameSanitizer.html +39 -39
  52. data/doc/R509/OCSP.html +5 -5
  53. data/doc/R509/OCSP/Request.html +5 -5
  54. data/doc/R509/OCSP/Request/Nonce.html +5 -5
  55. data/doc/R509/OCSP/Response.html +7 -7
  56. data/doc/R509/OIDMapper.html +121 -6
  57. data/doc/R509/PrivateKey.html +226 -227
  58. data/doc/R509/R509Error.html +5 -5
  59. data/doc/R509/SPKI.html +244 -342
  60. data/doc/R509/Subject.html +241 -70
  61. data/doc/R509/Validity.html +5 -5
  62. data/doc/R509/Validity/Checker.html +5 -5
  63. data/doc/R509/Validity/DefaultChecker.html +5 -9
  64. data/doc/R509/Validity/DefaultWriter.html +5 -9
  65. data/doc/R509/Validity/Status.html +5 -5
  66. data/doc/R509/Validity/Writer.html +5 -5
  67. data/doc/_index.html +92 -30
  68. data/doc/class_list.html +2 -2
  69. data/doc/file.CONTRIBUTING.html +96 -0
  70. data/doc/file.LICENSE.html +87 -0
  71. data/doc/file.README.html +279 -389
  72. data/doc/file.YAML.html +243 -0
  73. data/doc/file.r509.html +298 -105
  74. data/doc/file_list.html +11 -2
  75. data/doc/frames.html +1 -1
  76. data/doc/index.html +279 -389
  77. data/doc/js/full_list.js +6 -1
  78. data/doc/method_list.html +869 -1139
  79. data/doc/top-level-namespace.html +103 -5
  80. data/lib/r509.rb +7 -2
  81. data/lib/r509/asn1.rb +97 -135
  82. data/lib/r509/cert.rb +17 -106
  83. data/lib/r509/cert/extensions.rb +13 -676
  84. data/lib/r509/cert/extensions/authority_info_access.rb +128 -0
  85. data/lib/r509/cert/extensions/authority_key_identifier.rb +100 -0
  86. data/lib/r509/cert/extensions/base.rb +142 -0
  87. data/lib/r509/cert/extensions/basic_constraints.rb +119 -0
  88. data/lib/r509/cert/extensions/certificate_policies.rb +262 -0
  89. data/lib/r509/cert/extensions/crl_distribution_points.rb +98 -0
  90. data/lib/r509/cert/extensions/extended_key_usage.rb +189 -0
  91. data/lib/r509/cert/extensions/inhibit_any_policy.rb +70 -0
  92. data/lib/r509/cert/extensions/key_usage.rb +209 -0
  93. data/lib/r509/cert/extensions/name_constraints.rb +179 -0
  94. data/lib/r509/cert/extensions/ocsp_no_check.rb +56 -0
  95. data/lib/r509/cert/extensions/policy_constraints.rb +122 -0
  96. data/lib/r509/cert/extensions/subject_alternative_name.rb +88 -0
  97. data/lib/r509/cert/extensions/subject_key_identifier.rb +56 -0
  98. data/lib/r509/cert/extensions/validation_mixin.rb +42 -0
  99. data/lib/r509/certificate_authority/options_builder.rb +142 -0
  100. data/lib/r509/certificate_authority/signer.rb +189 -0
  101. data/lib/r509/config.rb +3 -600
  102. data/lib/r509/config/ca_config.rb +414 -0
  103. data/lib/r509/config/cert_profile.rb +110 -0
  104. data/lib/r509/config/subject_item_policy.rb +118 -0
  105. data/lib/r509/crl/administrator.rb +169 -0
  106. data/lib/r509/crl/reader_writer.rb +109 -0
  107. data/lib/r509/crl/signed_list.rb +135 -0
  108. data/lib/r509/csr.rb +35 -116
  109. data/lib/r509/engine.rb +21 -11
  110. data/lib/r509/helpers.rb +110 -0
  111. data/lib/r509/io_helpers.rb +18 -13
  112. data/lib/r509/message_digest.rb +13 -3
  113. data/lib/r509/oid_mapper.rb +14 -0
  114. data/lib/r509/private_key.rb +74 -50
  115. data/lib/r509/spki.rb +50 -113
  116. data/lib/r509/subject.rb +24 -2
  117. data/lib/r509/trollop.rb +788 -0
  118. data/lib/r509/version.rb +1 -1
  119. data/r509.yaml +289 -96
  120. data/spec/asn1_spec.rb +171 -98
  121. data/spec/cert/extensions/authority_info_access_spec.rb +247 -0
  122. data/spec/cert/extensions/authority_key_identifier_spec.rb +85 -0
  123. data/spec/cert/extensions/base_spec.rb +172 -0
  124. data/spec/cert/extensions/basic_constraints_spec.rb +185 -0
  125. data/spec/cert/extensions/certificate_policies_spec.rb +288 -0
  126. data/spec/cert/extensions/crl_distribution_points_spec.rb +149 -0
  127. data/spec/cert/extensions/extended_key_usage_spec.rb +174 -0
  128. data/spec/cert/extensions/inhibit_any_policy_spec.rb +92 -0
  129. data/spec/cert/extensions/key_usage_spec.rb +172 -0
  130. data/spec/cert/extensions/name_constraints_spec.rb +335 -0
  131. data/spec/cert/extensions/ocsp_no_check_spec.rb +76 -0
  132. data/spec/cert/extensions/policy_constraints_spec.rb +155 -0
  133. data/spec/cert/extensions/subject_alternative_name_spec.rb +354 -0
  134. data/spec/cert/extensions/subject_key_identifier_spec.rb +64 -0
  135. data/spec/cert_spec.rb +11 -9
  136. data/spec/certificate_authority/options_builder_spec.rb +307 -0
  137. data/spec/certificate_authority/signer_spec.rb +278 -0
  138. data/spec/config/ca_config_spec.rb +405 -0
  139. data/spec/config/cert_profile_spec.rb +88 -0
  140. data/spec/config/subject_item_policy_spec.rb +81 -0
  141. data/spec/crl/administrator_spec.rb +199 -0
  142. data/spec/crl/reader_writer_spec.rb +97 -0
  143. data/spec/crl/signed_list_spec.rb +84 -0
  144. data/spec/csr_spec.rb +43 -36
  145. data/spec/engine_spec.rb +51 -0
  146. data/spec/fixtures.rb +40 -40
  147. data/spec/fixtures/cert1.pem +1 -1
  148. data/spec/fixtures/config_pool_test_minimal.yaml +11 -15
  149. data/spec/fixtures/config_test.yaml +96 -59
  150. data/spec/fixtures/config_test_dsa.yaml +29 -35
  151. data/spec/fixtures/config_test_ec.yaml +29 -35
  152. data/spec/fixtures/config_test_engine_key.yaml +7 -7
  153. data/spec/fixtures/config_test_engine_no_key_name.yaml +6 -6
  154. data/spec/fixtures/config_test_minimal.yaml +3 -5
  155. data/spec/fixtures/config_test_password.yaml +4 -6
  156. data/spec/fixtures/config_test_various.yaml +147 -137
  157. data/spec/fixtures/crl_list_file.txt +1 -1
  158. data/spec/fixtures/test_ca_crl.cer +20 -0
  159. data/spec/fixtures/test_ca_crl.key +28 -0
  160. data/spec/fixtures/test_ca_crl.p12 +0 -0
  161. data/spec/message_digest_spec.rb +6 -0
  162. data/spec/oid_mapper_spec.rb +11 -0
  163. data/spec/private_key_spec.rb +19 -18
  164. data/spec/spec_helper.rb +10 -6
  165. data/spec/spki_spec.rb +38 -19
  166. data/spec/subject_spec.rb +16 -0
  167. metadata +108 -59
  168. metadata.gz.sig +0 -0
  169. data/README.md +0 -638
  170. data/doc/R509/Config/CAProfile.html +0 -1015
  171. data/doc/R509/IOHelpers.html +0 -564
  172. data/lib/r509/certificate_authority.rb +0 -407
  173. data/lib/r509/crl.rb +0 -351
  174. data/spec/cert/extensions_spec.rb +0 -1095
  175. data/spec/certificate_authority_spec.rb +0 -681
  176. data/spec/config_spec.rb +0 -562
  177. data/spec/crl_spec.rb +0 -226
@@ -4,26 +4,26 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Class: R509::ASN1::PolicyInformation
7
+ Class: R509::Cert::Extensions::PolicyInformation
8
8
 
9
- &mdash; Documentation by YARD 0.8.5
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../../';
20
- framesUrl = "../../frames.html#!" + escape(window.location.href);
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!" + escape(window.location.href);
21
21
  </script>
22
22
 
23
23
 
24
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
25
 
26
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
27
 
28
28
 
29
29
  </head>
@@ -31,8 +31,8 @@
31
31
  <div id="header">
32
32
  <div id="menu">
33
33
 
34
- <a href="../../_index.html">Index (P)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ASN1.html" title="R509::ASN1 (module)">ASN1</a></span></span>
34
+ <a href="../../../_index.html">Index (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Cert.html" title="R509::Cert (class)">Cert</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Extensions.html" title="R509::Cert::Extensions (module)">Extensions</a></span></span>
36
36
  &raquo;
37
37
  <span class="title">PolicyInformation</span>
38
38
 
@@ -43,17 +43,17 @@
43
43
  <div id="search">
44
44
 
45
45
  <a class="full_list_link" id="class_list_link"
46
- href="../../class_list.html">
46
+ href="../../../class_list.html">
47
47
  Class List
48
48
  </a>
49
49
 
50
50
  <a class="full_list_link" id="method_list_link"
51
- href="../../method_list.html">
51
+ href="../../../method_list.html">
52
52
  Method List
53
53
  </a>
54
54
 
55
55
  <a class="full_list_link" id="file_list_link"
56
- href="../../file_list.html">
56
+ href="../../../file_list.html">
57
57
  File List
58
58
  </a>
59
59
 
@@ -63,7 +63,7 @@
63
63
 
64
64
  <iframe id="search_frame"></iframe>
65
65
 
66
- <div id="content"><h1>Class: R509::ASN1::PolicyInformation
66
+ <div id="content"><h1>Class: R509::Cert::Extensions::PolicyInformation
67
67
 
68
68
 
69
69
 
@@ -78,7 +78,7 @@
78
78
  <ul class="fullTree">
79
79
  <li>Object</li>
80
80
 
81
- <li class="next">R509::ASN1::PolicyInformation</li>
81
+ <li class="next">R509::Cert::Extensions::PolicyInformation</li>
82
82
 
83
83
  </ul>
84
84
  <a href="#" class="inheritanceTree">show all</a>
@@ -94,7 +94,7 @@
94
94
 
95
95
 
96
96
  <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/r509/asn1.rb</dd>
97
+ <dd class="r2 last">lib/r509/cert/extensions/certificate_policies.rb</dd>
98
98
 
99
99
  </dl>
100
100
  <div class="clear"></div>
@@ -102,11 +102,12 @@
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
104
 
105
- <p>PolicyInformation ::= SEQUENCE {</p>
105
+ <p>This class is used to help build the certificate policies extension</p>
106
106
 
107
- <pre class="code ruby"><code class="ruby">policyIdentifier CertPolicyId,
108
- policyQualifiers SEQUENCE SIZE (1..MAX) OF
109
- PolicyQualifierInfo OPTIONAL }</code></pre>
107
+ <pre class="code ruby"><code class="ruby">PolicyInformation ::= SEQUENCE {
108
+ policyIdentifier CertPolicyId,
109
+ policyQualifiers SEQUENCE SIZE (1..MAX) OF
110
+ PolicyQualifierInfo OPTIONAL }</code></pre>
110
111
 
111
112
 
112
113
  </div>
@@ -215,6 +216,50 @@ policyQualifiers SEQUENCE SIZE (1..MAX) OF
215
216
  <p>A new instance of PolicyInformation.</p>
216
217
  </div></span>
217
218
 
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#to_h-instance_method" title="#to_h (instance method)">- (Hash) <strong>to_h</strong> </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'></div></span>
240
+
241
+ </li>
242
+
243
+
244
+ <li class="public ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#to_yaml-instance_method" title="#to_yaml (instance method)">- (YAML) <strong>to_yaml</strong> </a>
248
+
249
+
250
+
251
+ </span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'></div></span>
262
+
218
263
  </li>
219
264
 
220
265
 
@@ -227,7 +272,7 @@ policyQualifiers SEQUENCE SIZE (1..MAX) OF
227
272
  <div class="method_details first">
228
273
  <h3 class="signature first" id="initialize-instance_method">
229
274
 
230
- - (<tt><span class='object_link'><a href="" title="R509::ASN1::PolicyInformation (class)">PolicyInformation</a></span></tt>) <strong>initialize</strong>(data)
275
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::PolicyInformation (class)">PolicyInformation</a></span></tt>) <strong>initialize</strong>(data)
231
276
 
232
277
 
233
278
 
@@ -250,20 +295,20 @@ policyQualifiers SEQUENCE SIZE (1..MAX) OF
250
295
  <pre class="lines">
251
296
 
252
297
 
253
- 300
254
- 301
255
- 302
256
- 303
257
- 304
258
- 305
259
- 306
260
- 307
261
- 308
262
- 309
263
- 310</pre>
298
+ 131
299
+ 132
300
+ 133
301
+ 134
302
+ 135
303
+ 136
304
+ 137
305
+ 138
306
+ 139
307
+ 140
308
+ 141</pre>
264
309
  </td>
265
310
  <td>
266
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 300</span>
311
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 131</span>
267
312
 
268
313
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
269
314
  <span class='comment'># store the policy identifier OID
@@ -314,12 +359,12 @@ policyQualifiers SEQUENCE SIZE (1..MAX) OF
314
359
  <pre class="lines">
315
360
 
316
361
 
317
- 299
318
- 300
319
- 301</pre>
362
+ 130
363
+ 131
364
+ 132</pre>
320
365
  </td>
321
366
  <td>
322
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 299</span>
367
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 130</span>
323
368
 
324
369
  <span class='kw'>def</span> <span class='id identifier rubyid_policy_identifier'>policy_identifier</span>
325
370
  <span class='ivar'>@policy_identifier</span>
@@ -357,12 +402,12 @@ policyQualifiers SEQUENCE SIZE (1..MAX) OF
357
402
  <pre class="lines">
358
403
 
359
404
 
360
- 299
361
- 300
362
- 301</pre>
405
+ 130
406
+ 131
407
+ 132</pre>
363
408
  </td>
364
409
  <td>
365
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 299</span>
410
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 130</span>
366
411
 
367
412
  <span class='kw'>def</span> <span class='id identifier rubyid_policy_qualifiers'>policy_qualifiers</span>
368
413
  <span class='ivar'>@policy_qualifiers</span>
@@ -375,12 +420,128 @@ policyQualifiers SEQUENCE SIZE (1..MAX) OF
375
420
  </div>
376
421
 
377
422
 
423
+ <div id="instance_method_details" class="method_details_list">
424
+ <h2>Instance Method Details</h2>
425
+
426
+
427
+ <div class="method_details first">
428
+ <h3 class="signature first" id="to_h-instance_method">
429
+
430
+ - (<tt>Hash</tt>) <strong>to_h</strong>
431
+
432
+
433
+
434
+
435
+
436
+ </h3><div class="docstring">
437
+ <div class="discussion">
438
+
439
+
440
+ </div>
441
+ </div>
442
+ <div class="tags">
443
+
444
+ <p class="tag_title">Returns:</p>
445
+ <ul class="return">
446
+
447
+ <li>
448
+
449
+
450
+ <span class='type'>(<tt>Hash</tt>)</span>
451
+
452
+
453
+
454
+ </li>
455
+
456
+ </ul>
457
+
458
+ </div><table class="source_code">
459
+ <tr>
460
+ <td>
461
+ <pre class="lines">
462
+
463
+
464
+ 144
465
+ 145
466
+ 146
467
+ 147
468
+ 148
469
+ 149</pre>
470
+ </td>
471
+ <td>
472
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 144</span>
473
+
474
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
475
+ <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
476
+ <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:policy_identifier</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@policy_identifier</span>
477
+ <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@policy_qualifiers</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@policy_qualifiers</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
478
+ <span class='id identifier rubyid_hash'>hash</span>
479
+ <span class='kw'>end</span></pre>
480
+ </td>
481
+ </tr>
482
+ </table>
483
+ </div>
484
+
485
+ <div class="method_details ">
486
+ <h3 class="signature " id="to_yaml-instance_method">
487
+
488
+ - (<tt>YAML</tt>) <strong>to_yaml</strong>
489
+
490
+
491
+
492
+
493
+
494
+ </h3><div class="docstring">
495
+ <div class="discussion">
496
+
497
+
498
+ </div>
499
+ </div>
500
+ <div class="tags">
501
+
502
+ <p class="tag_title">Returns:</p>
503
+ <ul class="return">
504
+
505
+ <li>
506
+
507
+
508
+ <span class='type'>(<tt>YAML</tt>)</span>
509
+
510
+
511
+
512
+ </li>
513
+
514
+ </ul>
515
+
516
+ </div><table class="source_code">
517
+ <tr>
518
+ <td>
519
+ <pre class="lines">
520
+
521
+
522
+ 152
523
+ 153
524
+ 154</pre>
525
+ </td>
526
+ <td>
527
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 152</span>
528
+
529
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_yaml'>to_yaml</span>
530
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='period'>.</span><span class='id identifier rubyid_to_yaml'>to_yaml</span>
531
+ <span class='kw'>end</span></pre>
532
+ </td>
533
+ </tr>
534
+ </table>
535
+ </div>
536
+
537
+ </div>
538
+
378
539
  </div>
379
540
 
380
541
  <div id="footer">
381
- Generated on Tue Apr 23 10:46:05 2013 by
542
+ Generated on Sun Jan 26 13:37:29 2014 by
382
543
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
383
- 0.8.5 (ruby-1.9.3).
544
+ 0.8.6.1 (ruby-2.0.0).
384
545
  </div>
385
546
 
386
547
  </body>
@@ -4,26 +4,26 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Class: R509::ASN1::PolicyQualifiers
7
+ Class: R509::Cert::Extensions::PolicyQualifiers
8
8
 
9
- &mdash; Documentation by YARD 0.8.5
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../../';
20
- framesUrl = "../../frames.html#!" + escape(window.location.href);
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!" + escape(window.location.href);
21
21
  </script>
22
22
 
23
23
 
24
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
25
 
26
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
27
 
28
28
 
29
29
  </head>
@@ -31,8 +31,8 @@
31
31
  <div id="header">
32
32
  <div id="menu">
33
33
 
34
- <a href="../../_index.html">Index (P)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ASN1.html" title="R509::ASN1 (module)">ASN1</a></span></span>
34
+ <a href="../../../_index.html">Index (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Cert.html" title="R509::Cert (class)">Cert</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Extensions.html" title="R509::Cert::Extensions (module)">Extensions</a></span></span>
36
36
  &raquo;
37
37
  <span class="title">PolicyQualifiers</span>
38
38
 
@@ -43,17 +43,17 @@
43
43
  <div id="search">
44
44
 
45
45
  <a class="full_list_link" id="class_list_link"
46
- href="../../class_list.html">
46
+ href="../../../class_list.html">
47
47
  Class List
48
48
  </a>
49
49
 
50
50
  <a class="full_list_link" id="method_list_link"
51
- href="../../method_list.html">
51
+ href="../../../method_list.html">
52
52
  Method List
53
53
  </a>
54
54
 
55
55
  <a class="full_list_link" id="file_list_link"
56
- href="../../file_list.html">
56
+ href="../../../file_list.html">
57
57
  File List
58
58
  </a>
59
59
 
@@ -63,7 +63,7 @@
63
63
 
64
64
  <iframe id="search_frame"></iframe>
65
65
 
66
- <div id="content"><h1>Class: R509::ASN1::PolicyQualifiers
66
+ <div id="content"><h1>Class: R509::Cert::Extensions::PolicyQualifiers
67
67
 
68
68
 
69
69
 
@@ -78,7 +78,7 @@
78
78
  <ul class="fullTree">
79
79
  <li>Object</li>
80
80
 
81
- <li class="next">R509::ASN1::PolicyQualifiers</li>
81
+ <li class="next">R509::Cert::Extensions::PolicyQualifiers</li>
82
82
 
83
83
  </ul>
84
84
  <a href="#" class="inheritanceTree">show all</a>
@@ -94,7 +94,7 @@
94
94
 
95
95
 
96
96
  <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/r509/asn1.rb</dd>
97
+ <dd class="r2 last">lib/r509/cert/extensions/certificate_policies.rb</dd>
98
98
 
99
99
  </dl>
100
100
  <div class="clear"></div>
@@ -102,10 +102,11 @@
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
104
 
105
- <p>PolicyQualifierInfo ::= SEQUENCE {</p>
105
+ <p>This class is used to help build the certificate policies extension</p>
106
106
 
107
- <pre class="code ruby"><code class="ruby">policyQualifierId PolicyQualifierId,
108
- qualifier ANY DEFINED BY policyQualifierId }</code></pre>
107
+ <pre class="code ruby"><code class="ruby">PolicyQualifierInfo ::= SEQUENCE {
108
+ policyQualifierId PolicyQualifierId,
109
+ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
109
110
 
110
111
 
111
112
  </div>
@@ -238,6 +239,50 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
238
239
  <p>parse each PolicyQualifier and store the results into the object array.</p>
239
240
  </div></span>
240
241
 
242
+ </li>
243
+
244
+
245
+ <li class="public ">
246
+ <span class="summary_signature">
247
+
248
+ <a href="#to_h-instance_method" title="#to_h (instance method)">- (Hash) <strong>to_h</strong> </a>
249
+
250
+
251
+
252
+ </span>
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <span class="summary_desc"><div class='inline'></div></span>
263
+
264
+ </li>
265
+
266
+
267
+ <li class="public ">
268
+ <span class="summary_signature">
269
+
270
+ <a href="#to_yaml-instance_method" title="#to_yaml (instance method)">- (YAML) <strong>to_yaml</strong> </a>
271
+
272
+
273
+
274
+ </span>
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+ <span class="summary_desc"><div class='inline'></div></span>
285
+
241
286
  </li>
242
287
 
243
288
 
@@ -250,7 +295,7 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
250
295
  <div class="method_details first">
251
296
  <h3 class="signature first" id="initialize-instance_method">
252
297
 
253
- - (<tt><span class='object_link'><a href="" title="R509::ASN1::PolicyQualifiers (class)">PolicyQualifiers</a></span></tt>) <strong>initialize</strong>
298
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::PolicyQualifiers (class)">PolicyQualifiers</a></span></tt>) <strong>initialize</strong>
254
299
 
255
300
 
256
301
 
@@ -273,13 +318,13 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
273
318
  <pre class="lines">
274
319
 
275
320
 
276
- 318
277
- 319
278
- 320
279
- 321</pre>
321
+ 163
322
+ 164
323
+ 165
324
+ 166</pre>
280
325
  </td>
281
326
  <td>
282
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 318</span>
327
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 163</span>
283
328
 
284
329
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
285
330
  <span class='ivar'>@cps_uris</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
@@ -323,12 +368,12 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
323
368
  <pre class="lines">
324
369
 
325
370
 
326
- 317
327
- 318
328
- 319</pre>
371
+ 162
372
+ 163
373
+ 164</pre>
329
374
  </td>
330
375
  <td>
331
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 317</span>
376
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 162</span>
332
377
 
333
378
  <span class='kw'>def</span> <span class='id identifier rubyid_cps_uris'>cps_uris</span>
334
379
  <span class='ivar'>@cps_uris</span>
@@ -366,12 +411,12 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
366
411
  <pre class="lines">
367
412
 
368
413
 
369
- 317
370
- 318
371
- 319</pre>
414
+ 162
415
+ 163
416
+ 164</pre>
372
417
  </td>
373
418
  <td>
374
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 317</span>
419
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 162</span>
375
420
 
376
421
  <span class='kw'>def</span> <span class='id identifier rubyid_user_notices'>user_notices</span>
377
422
  <span class='ivar'>@user_notices</span>
@@ -414,31 +459,143 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
414
459
  <pre class="lines">
415
460
 
416
461
 
417
- 324
418
- 325
419
- 326
420
- 327
421
- 328
422
- 329
423
- 330
424
- 331
425
- 332</pre>
462
+ 169
463
+ 170
464
+ 171
465
+ 172
466
+ 173
467
+ 174
468
+ 175
469
+ 176
470
+ 177
471
+ 178</pre>
426
472
  </td>
427
473
  <td>
428
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 324</span>
474
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 169</span>
429
475
 
430
476
  <span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
431
477
  <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
432
478
  <span class='kw'>case</span>
433
- <span class='kw'>when</span> <span class='id identifier rubyid_oid'>oid</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id-qt-cps</span><span class='tstring_end'>'</span></span>
434
- <span class='ivar'>@cps_uris</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
435
- <span class='kw'>when</span> <span class='id identifier rubyid_oid'>oid</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id-qt-unotice</span><span class='tstring_end'>'</span></span>
479
+ <span class='kw'>when</span> <span class='id identifier rubyid_oid'>oid</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id-qt-cps</span><span class='tstring_end'>&#39;</span></span>
480
+ <span class='comment'># by RFC definition must be URIs
481
+ </span> <span class='ivar'>@cps_uris</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
482
+ <span class='kw'>when</span> <span class='id identifier rubyid_oid'>oid</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id-qt-unotice</span><span class='tstring_end'>&#39;</span></span>
436
483
  <span class='ivar'>@user_notices</span> <span class='op'>&lt;&lt;</span> <span class='const'>UserNotice</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
437
484
  <span class='kw'>end</span>
438
485
  <span class='kw'>end</span></pre>
439
486
  </td>
440
487
  </tr>
441
488
  </table>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="to_h-instance_method">
493
+
494
+ - (<tt>Hash</tt>) <strong>to_h</strong>
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+
503
+
504
+ </div>
505
+ </div>
506
+ <div class="tags">
507
+
508
+ <p class="tag_title">Returns:</p>
509
+ <ul class="return">
510
+
511
+ <li>
512
+
513
+
514
+ <span class='type'>(<tt>Hash</tt>)</span>
515
+
516
+
517
+
518
+ </li>
519
+
520
+ </ul>
521
+
522
+ </div><table class="source_code">
523
+ <tr>
524
+ <td>
525
+ <pre class="lines">
526
+
527
+
528
+ 181
529
+ 182
530
+ 183
531
+ 184
532
+ 185
533
+ 186</pre>
534
+ </td>
535
+ <td>
536
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 181</span>
537
+
538
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
539
+ <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
540
+ <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:cps_uris</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@cps_uris</span>
541
+ <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:user_notices</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@user_notices</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_notice'>notice</span><span class='op'>|</span> <span class='id identifier rubyid_notice'>notice</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span> <span class='rbrace'>}</span> <span class='kw'>unless</span> <span class='ivar'>@user_notices</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
542
+ <span class='id identifier rubyid_hash'>hash</span>
543
+ <span class='kw'>end</span></pre>
544
+ </td>
545
+ </tr>
546
+ </table>
547
+ </div>
548
+
549
+ <div class="method_details ">
550
+ <h3 class="signature " id="to_yaml-instance_method">
551
+
552
+ - (<tt>YAML</tt>) <strong>to_yaml</strong>
553
+
554
+
555
+
556
+
557
+
558
+ </h3><div class="docstring">
559
+ <div class="discussion">
560
+
561
+
562
+ </div>
563
+ </div>
564
+ <div class="tags">
565
+
566
+ <p class="tag_title">Returns:</p>
567
+ <ul class="return">
568
+
569
+ <li>
570
+
571
+
572
+ <span class='type'>(<tt>YAML</tt>)</span>
573
+
574
+
575
+
576
+ </li>
577
+
578
+ </ul>
579
+
580
+ </div><table class="source_code">
581
+ <tr>
582
+ <td>
583
+ <pre class="lines">
584
+
585
+
586
+ 189
587
+ 190
588
+ 191</pre>
589
+ </td>
590
+ <td>
591
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 189</span>
592
+
593
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_yaml'>to_yaml</span>
594
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span><span class='period'>.</span><span class='id identifier rubyid_to_yaml'>to_yaml</span>
595
+ <span class='kw'>end</span></pre>
596
+ </td>
597
+ </tr>
598
+ </table>
442
599
  </div>
443
600
 
444
601
  </div>
@@ -446,9 +603,9 @@ qualifier ANY DEFINED BY policyQualifierId }</code></pre>
446
603
  </div>
447
604
 
448
605
  <div id="footer">
449
- Generated on Tue Apr 23 10:46:05 2013 by
606
+ Generated on Sun Jan 26 13:37:29 2014 by
450
607
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
451
- 0.8.5 (ruby-1.9.3).
608
+ 0.8.6.1 (ruby-2.0.0).
452
609
  </div>
453
610
 
454
611
  </body>