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
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Class: R509::Cert::Extensions::SubjectKeyIdentifier
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;
@@ -96,7 +96,7 @@
96
96
 
97
97
 
98
98
  <dt class="r2 last">Defined in:</dt>
99
- <dd class="r2 last">lib/r509/cert/extensions.rb</dd>
99
+ <dd class="r2 last">lib/r509/cert/extensions/subject_key_identifier.rb</dd>
100
100
 
101
101
  </dl>
102
102
  <div class="clear"></div>
@@ -104,8 +104,14 @@
104
104
  <h2>Overview</h2><div class="docstring">
105
105
  <div class="discussion">
106
106
 
107
- <p>Implements the SubjectKeyIdentifier certificate extension, with methods to
108
- provide access to the components and meaning of the extension's contents.</p>
107
+ <p>RFC 5280 Description (see: <a
108
+ href="http://www.ietf.org/rfc/rfc5280.txt">www.ietf.org/rfc/rfc5280.txt</a>)</p>
109
+
110
+ <p>The subject key identifier extension provides a means of identifying
111
+ certificates that contain a particular public key.</p>
112
+
113
+ <p>You can use this extension to parse an existing extension for easy access
114
+ to the contents or create a new one.</p>
109
115
 
110
116
 
111
117
  </div>
@@ -134,6 +140,22 @@ provide access to the components and meaning of the extension's contents.</p>
134
140
  </dt>
135
141
  <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>subjectKeyIdentifier</span><span class='tstring_end'>&quot;</span></span></pre></dd>
136
142
 
143
+ <dt id="SKI_EXTENSION_DEFAULT-constant" class="">SKI_EXTENSION_DEFAULT =
144
+ <div class="docstring">
145
+ <div class="discussion">
146
+
147
+ <p>default extension behavior when generating</p>
148
+
149
+
150
+ </div>
151
+ </div>
152
+ <div class="tags">
153
+
154
+
155
+ </div>
156
+ </dt>
157
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hash</span><span class='tstring_end'>&quot;</span></span></pre></dd>
158
+
137
159
  </dl>
138
160
 
139
161
 
@@ -154,6 +176,32 @@ provide access to the components and meaning of the extension's contents.</p>
154
176
  <li class="public ">
155
177
  <span class="summary_signature">
156
178
 
179
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (SubjectKeyIdentifier) <strong>initialize</strong>(arg) </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+ <span class="note title constructor">constructor</span>
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <span class="summary_desc"><div class='inline'>
196
+ <p>This method takes a hash or an existing Extension object to parse.</p>
197
+ </div></span>
198
+
199
+ </li>
200
+
201
+
202
+ <li class="public ">
203
+ <span class="summary_signature">
204
+
157
205
  <a href="#key-instance_method" title="#key (instance method)">- (Object) <strong>key</strong> </a>
158
206
 
159
207
 
@@ -179,7 +227,111 @@ provide access to the components and meaning of the extension's contents.</p>
179
227
 
180
228
 
181
229
 
230
+ <div id="constructor_details" class="method_details_list">
231
+ <h2>Constructor Details</h2>
232
+
233
+ <div class="method_details first">
234
+ <h3 class="signature first" id="initialize-instance_method">
235
+
236
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::SubjectKeyIdentifier (class)">SubjectKeyIdentifier</a></span></tt>) <strong>initialize</strong>(arg)
237
+
238
+
239
+
240
+
241
+
242
+ </h3><div class="docstring">
243
+ <div class="discussion">
244
+
245
+ <p>This method takes a hash or an existing Extension object to parse</p>
246
+
247
+
248
+ </div>
249
+ </div>
250
+ <div class="tags">
251
+ <p class="tag_title">Parameters:</p>
252
+ <ul class="param">
253
+
254
+ <li>
255
+
256
+ <span class='name'>arg</span>
257
+
258
+
259
+ <span class='type'>(<tt>Hash</tt>)</span>
260
+
261
+
262
+
263
+ &mdash;
264
+ <div class='inline'>
265
+ <p>a customizable set of options</p>
266
+ </div>
267
+
268
+ </li>
269
+
270
+ </ul>
271
+
272
+
273
+
274
+
275
+ <p class="tag_title">Options Hash (<tt>arg</tt>):</p>
276
+ <ul class="option">
277
+
278
+ <li>
279
+ <span class="name">:public_key</span>
280
+ <span class="type">(<tt><span class='object_link'>OpenSSL::PKey</span></tt>)</span>
281
+ <span class="default">
282
+
283
+ &mdash; default:
284
+ <tt>Cert/CSR/PrivateKey return this type from #public_key</tt>
285
+
286
+ </span>
287
+
288
+ </li>
289
+
290
+ <li>
291
+ <span class="name">:critical</span>
292
+ <span class="type">(<tt>Boolean</tt>)</span>
293
+ <span class="default">
294
+
295
+ &mdash; default:
296
+ <tt>false</tt>
297
+
298
+ </span>
299
+
300
+ </li>
301
+
302
+ </ul>
303
+
304
+
305
+
306
+ </div><table class="source_code">
307
+ <tr>
308
+ <td>
309
+ <pre class="lines">
310
+
311
+
312
+ 24
313
+ 25
314
+ 26
315
+ 27
316
+ 28
317
+ 29</pre>
318
+ </td>
319
+ <td>
320
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/subject_key_identifier.rb', line 24</span>
321
+
322
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
323
+ <span class='kw'>if</span> <span class='kw'>not</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_is_extension?'>is_extension?</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
324
+ <span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='id identifier rubyid_build_extension'>build_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
325
+ <span class='kw'>end</span>
326
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
327
+ <span class='kw'>end</span></pre>
328
+ </td>
329
+ </tr>
330
+ </table>
331
+ </div>
182
332
 
333
+ </div>
334
+
183
335
 
184
336
  <div id="instance_method_details" class="method_details_list">
185
337
  <h2>Instance Method Details</h2>
@@ -229,14 +381,14 @@ provide access to the components and meaning of the extension's contents.</p>
229
381
  <pre class="lines">
230
382
 
231
383
 
232
- 333
233
- 334
234
- 335</pre>
384
+ 32
385
+ 33
386
+ 34</pre>
235
387
  </td>
236
388
  <td>
237
- <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 333</span>
389
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/subject_key_identifier.rb', line 32</span>
238
390
 
239
- <span class='kw'>def</span> <span class='id identifier rubyid_key'>key</span><span class='lparen'>(</span><span class='rparen'>)</span>
391
+ <span class='kw'>def</span> <span class='id identifier rubyid_key'>key</span>
240
392
  <span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
241
393
  <span class='kw'>end</span></pre>
242
394
  </td>
@@ -249,9 +401,9 @@ provide access to the components and meaning of the extension's contents.</p>
249
401
  </div>
250
402
 
251
403
  <div id="footer">
252
- Generated on Tue Apr 23 10:46:06 2013 by
404
+ Generated on Sun Jan 26 13:37:29 2014 by
253
405
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
254
- 0.8.5 (ruby-1.9.3).
406
+ 0.8.6.1 (ruby-2.0.0).
255
407
  </div>
256
408
 
257
409
  </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::UserNotice
7
+ Class: R509::Cert::Extensions::UserNotice
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 (U)</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 (U)</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">UserNotice</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::UserNotice
66
+ <div id="content"><h1>Class: R509::Cert::Extensions::UserNotice
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::UserNotice</li>
81
+ <li class="next">R509::Cert::Extensions::UserNotice</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>UserNotice ::= 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">noticeRef NoticeReference OPTIONAL,
108
- explicitText DisplayText OPTIONAL }</code></pre>
107
+ <pre class="code ruby"><code class="ruby">UserNotice ::= SEQUENCE {
108
+ noticeRef NoticeReference OPTIONAL,
109
+ explicitText DisplayText OPTIONAL }</code></pre>
109
110
 
110
111
 
111
112
  </div>
@@ -214,6 +215,50 @@ explicitText DisplayText OPTIONAL }</code></pre>
214
215
  <p>A new instance of UserNotice.</p>
215
216
  </div></span>
216
217
 
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#to_h-instance_method" title="#to_h (instance method)">- (Hash) <strong>to_h</strong> </a>
225
+
226
+
227
+
228
+ </span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <span class="summary_desc"><div class='inline'></div></span>
239
+
240
+ </li>
241
+
242
+
243
+ <li class="public ">
244
+ <span class="summary_signature">
245
+
246
+ <a href="#to_yaml-instance_method" title="#to_yaml (instance method)">- (YAML) <strong>to_yaml</strong> </a>
247
+
248
+
249
+
250
+ </span>
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'></div></span>
261
+
217
262
  </li>
218
263
 
219
264
 
@@ -226,7 +271,7 @@ explicitText DisplayText OPTIONAL }</code></pre>
226
271
  <div class="method_details first">
227
272
  <h3 class="signature first" id="initialize-instance_method">
228
273
 
229
- - (<tt><span class='object_link'><a href="" title="R509::ASN1::UserNotice (class)">UserNotice</a></span></tt>) <strong>initialize</strong>(data)
274
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::UserNotice (class)">UserNotice</a></span></tt>) <strong>initialize</strong>(data)
230
275
 
231
276
 
232
277
 
@@ -249,24 +294,24 @@ explicitText DisplayText OPTIONAL }</code></pre>
249
294
  <pre class="lines">
250
295
 
251
296
 
252
- 340
253
- 341
254
- 342
255
- 343
256
- 344
257
- 345
258
- 346
259
- 347
260
- 348
261
- 349
262
- 350</pre>
297
+ 200
298
+ 201
299
+ 202
300
+ 203
301
+ 204
302
+ 205
303
+ 206
304
+ 207
305
+ 208
306
+ 209
307
+ 210</pre>
263
308
  </td>
264
309
  <td>
265
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 340</span>
310
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 200</span>
266
311
 
267
312
  <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>
268
313
  <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_qualifier'>qualifier</span><span class='op'>|</span>
269
- <span class='comment'>#if we find another sequence, that's a noticeReference, otherwise it's explicitText
314
+ <span class='comment'>#if we find another sequence, that&#39;s a noticeReference, otherwise it&#39;s explicitText
270
315
  </span> <span class='kw'>if</span> <span class='id identifier rubyid_qualifier'>qualifier</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='rparen'>)</span>
271
316
  <span class='ivar'>@notice_reference</span> <span class='op'>=</span> <span class='const'>NoticeReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_qualifier'>qualifier</span><span class='rparen'>)</span>
272
317
  <span class='kw'>else</span>
@@ -313,12 +358,12 @@ explicitText DisplayText OPTIONAL }</code></pre>
313
358
  <pre class="lines">
314
359
 
315
360
 
316
- 339
317
- 340
318
- 341</pre>
361
+ 199
362
+ 200
363
+ 201</pre>
319
364
  </td>
320
365
  <td>
321
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 339</span>
366
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 199</span>
322
367
 
323
368
  <span class='kw'>def</span> <span class='id identifier rubyid_explicit_text'>explicit_text</span>
324
369
  <span class='ivar'>@explicit_text</span>
@@ -356,12 +401,12 @@ explicitText DisplayText OPTIONAL }</code></pre>
356
401
  <pre class="lines">
357
402
 
358
403
 
359
- 339
360
- 340
361
- 341</pre>
404
+ 199
405
+ 200
406
+ 201</pre>
362
407
  </td>
363
408
  <td>
364
- <pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 339</span>
409
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 199</span>
365
410
 
366
411
  <span class='kw'>def</span> <span class='id identifier rubyid_notice_reference'>notice_reference</span>
367
412
  <span class='ivar'>@notice_reference</span>
@@ -374,12 +419,128 @@ explicitText DisplayText OPTIONAL }</code></pre>
374
419
  </div>
375
420
 
376
421
 
422
+ <div id="instance_method_details" class="method_details_list">
423
+ <h2>Instance Method Details</h2>
424
+
425
+
426
+ <div class="method_details first">
427
+ <h3 class="signature first" id="to_h-instance_method">
428
+
429
+ - (<tt>Hash</tt>) <strong>to_h</strong>
430
+
431
+
432
+
433
+
434
+
435
+ </h3><div class="docstring">
436
+ <div class="discussion">
437
+
438
+
439
+ </div>
440
+ </div>
441
+ <div class="tags">
442
+
443
+ <p class="tag_title">Returns:</p>
444
+ <ul class="return">
445
+
446
+ <li>
447
+
448
+
449
+ <span class='type'>(<tt>Hash</tt>)</span>
450
+
451
+
452
+
453
+ </li>
454
+
455
+ </ul>
456
+
457
+ </div><table class="source_code">
458
+ <tr>
459
+ <td>
460
+ <pre class="lines">
461
+
462
+
463
+ 213
464
+ 214
465
+ 215
466
+ 216
467
+ 217
468
+ 218</pre>
469
+ </td>
470
+ <td>
471
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 213</span>
472
+
473
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
474
+ <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
475
+ <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='symbol'>:explicit_text</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@explicit_text</span> <span class='kw'>unless</span> <span class='ivar'>@explicit_text</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
476
+ <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'>@notice_reference</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'>@notice_reference</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
477
+ <span class='id identifier rubyid_hash'>hash</span>
478
+ <span class='kw'>end</span></pre>
479
+ </td>
480
+ </tr>
481
+ </table>
482
+ </div>
483
+
484
+ <div class="method_details ">
485
+ <h3 class="signature " id="to_yaml-instance_method">
486
+
487
+ - (<tt>YAML</tt>) <strong>to_yaml</strong>
488
+
489
+
490
+
491
+
492
+
493
+ </h3><div class="docstring">
494
+ <div class="discussion">
495
+
496
+
497
+ </div>
498
+ </div>
499
+ <div class="tags">
500
+
501
+ <p class="tag_title">Returns:</p>
502
+ <ul class="return">
503
+
504
+ <li>
505
+
506
+
507
+ <span class='type'>(<tt>YAML</tt>)</span>
508
+
509
+
510
+
511
+ </li>
512
+
513
+ </ul>
514
+
515
+ </div><table class="source_code">
516
+ <tr>
517
+ <td>
518
+ <pre class="lines">
519
+
520
+
521
+ 221
522
+ 222
523
+ 223</pre>
524
+ </td>
525
+ <td>
526
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions/certificate_policies.rb', line 221</span>
527
+
528
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_yaml'>to_yaml</span>
529
+ <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>
530
+ <span class='kw'>end</span></pre>
531
+ </td>
532
+ </tr>
533
+ </table>
534
+ </div>
535
+
536
+ </div>
537
+
377
538
  </div>
378
539
 
379
540
  <div id="footer">
380
- Generated on Tue Apr 23 10:46:05 2013 by
541
+ Generated on Sun Jan 26 13:37:29 2014 by
381
542
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
382
- 0.8.5 (ruby-1.9.3).
543
+ 0.8.6.1 (ruby-2.0.0).
383
544
  </div>
384
545
 
385
546
  </body>