r509 0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1,1230 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: R509::Cert::Extensions::KeyUsage
8
+
9
+ &mdash; Documentation by YARD 0.8.0
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../../_index.html">Index (K)</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
+ &raquo;
37
+ <span class="title">KeyUsage</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: R509::Cert::Extensions::KeyUsage
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">OpenSSL::X509::Extension</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">OpenSSL::X509::Extension</li>
82
+
83
+ <li class="next">R509::Cert::Extensions::KeyUsage</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/r509/cert/extensions.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Implements the KeyUsage certificate extension, with methods to provide
108
+ access to the components and meaning of the extension's contents.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+ <h2>Constant Summary</h2>
118
+
119
+ <dl class="constants">
120
+
121
+ <dt id="OID-constant" class="">OID =
122
+
123
+ </dt>
124
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>keyUsage</span><span class='tstring_end'>&quot;</span></span></pre></dd>
125
+
126
+ <dt id="AU_DIGITAL_SIGNATURE-constant" class="">AU_DIGITAL_SIGNATURE =
127
+ <div class="docstring">
128
+ <div class="discussion">
129
+
130
+ <p>The OpenSSL friendly name for the "digitalSignature" key use.</p>
131
+
132
+
133
+ </div>
134
+ </div>
135
+ <div class="tags">
136
+
137
+
138
+ </div>
139
+ </dt>
140
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Digital Signature</span><span class='tstring_end'>&quot;</span></span></pre></dd>
141
+
142
+ <dt id="AU_NON_REPUDIATION-constant" class="">AU_NON_REPUDIATION =
143
+ <div class="docstring">
144
+ <div class="discussion">
145
+
146
+ <p>The OpenSSL friendly name for the "nonRepudiation" key use.</p>
147
+
148
+
149
+ </div>
150
+ </div>
151
+ <div class="tags">
152
+
153
+
154
+ </div>
155
+ </dt>
156
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Non Repudiation</span><span class='tstring_end'>&quot;</span></span></pre></dd>
157
+
158
+ <dt id="AU_KEY_ENCIPHERMENT-constant" class="">AU_KEY_ENCIPHERMENT =
159
+ <div class="docstring">
160
+ <div class="discussion">
161
+
162
+ <p>The OpenSSL friendly name for the "keyEncipherment" key use.</p>
163
+
164
+
165
+ </div>
166
+ </div>
167
+ <div class="tags">
168
+
169
+
170
+ </div>
171
+ </dt>
172
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Key Encipherment</span><span class='tstring_end'>&quot;</span></span></pre></dd>
173
+
174
+ <dt id="AU_DATA_ENCIPHERMENT-constant" class="">AU_DATA_ENCIPHERMENT =
175
+ <div class="docstring">
176
+ <div class="discussion">
177
+
178
+ <p>The OpenSSL friendly name for the "dataEncipherment" key use.</p>
179
+
180
+
181
+ </div>
182
+ </div>
183
+ <div class="tags">
184
+
185
+
186
+ </div>
187
+ </dt>
188
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Data Encipherment</span><span class='tstring_end'>&quot;</span></span></pre></dd>
189
+
190
+ <dt id="AU_KEY_AGREEMENT-constant" class="">AU_KEY_AGREEMENT =
191
+ <div class="docstring">
192
+ <div class="discussion">
193
+
194
+ <p>The OpenSSL friendly name for the "keyAgreement" key use.</p>
195
+
196
+
197
+ </div>
198
+ </div>
199
+ <div class="tags">
200
+
201
+
202
+ </div>
203
+ </dt>
204
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Key Agreement</span><span class='tstring_end'>&quot;</span></span></pre></dd>
205
+
206
+ <dt id="AU_CERTIFICATE_SIGN-constant" class="">AU_CERTIFICATE_SIGN =
207
+ <div class="docstring">
208
+ <div class="discussion">
209
+
210
+ <p>The OpenSSL friendly name for the "keyCertSign" key use.</p>
211
+
212
+
213
+ </div>
214
+ </div>
215
+ <div class="tags">
216
+
217
+
218
+ </div>
219
+ </dt>
220
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Certificate Sign</span><span class='tstring_end'>&quot;</span></span></pre></dd>
221
+
222
+ <dt id="AU_CRL_SIGN-constant" class="">AU_CRL_SIGN =
223
+ <div class="docstring">
224
+ <div class="discussion">
225
+
226
+ <p>The OpenSSL friendly name for the "cRLSign" key use.</p>
227
+
228
+
229
+ </div>
230
+ </div>
231
+ <div class="tags">
232
+
233
+
234
+ </div>
235
+ </dt>
236
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>CRL Sign</span><span class='tstring_end'>&quot;</span></span></pre></dd>
237
+
238
+ <dt id="AU_ENCIPHER_ONLY-constant" class="">AU_ENCIPHER_ONLY =
239
+ <div class="docstring">
240
+ <div class="discussion">
241
+
242
+ <p>The OpenSSL friendly name for the "encipherOnly" key use.</p>
243
+
244
+
245
+ </div>
246
+ </div>
247
+ <div class="tags">
248
+
249
+
250
+ </div>
251
+ </dt>
252
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Encipher Only</span><span class='tstring_end'>&quot;</span></span></pre></dd>
253
+
254
+ <dt id="AU_DECIPHER_ONLY-constant" class="">AU_DECIPHER_ONLY =
255
+ <div class="docstring">
256
+ <div class="discussion">
257
+
258
+ <p>The OpenSSL friendly name for the "decipherOnly" key use.</p>
259
+
260
+
261
+ </div>
262
+ </div>
263
+ <div class="tags">
264
+
265
+
266
+ </div>
267
+ </dt>
268
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Decipher Only</span><span class='tstring_end'>&quot;</span></span></pre></dd>
269
+
270
+ </dl>
271
+
272
+
273
+
274
+
275
+
276
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
277
+ <ul class="summary">
278
+
279
+ <li class="public ">
280
+ <span class="summary_signature">
281
+
282
+ <a href="#allowed_uses-instance_method" title="#allowed_uses (instance method)">- (Object) <strong>allowed_uses</strong> </a>
283
+
284
+
285
+
286
+ </span>
287
+
288
+
289
+
290
+
291
+ <span class="note title readonly">readonly</span>
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ <span class="summary_desc"><div class='inline'>
302
+ <p>An array of the key uses allowed.</p>
303
+ </div></span>
304
+
305
+ </li>
306
+
307
+
308
+ </ul>
309
+
310
+
311
+
312
+
313
+
314
+ <h2>
315
+ Instance Method Summary
316
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
317
+ </h2>
318
+
319
+ <ul class="summary">
320
+
321
+ <li class="public ">
322
+ <span class="summary_signature">
323
+
324
+ <a href="#allows%3F-instance_method" title="#allows? (instance method)">- (Boolean) <strong>allows?</strong>(friendly_use_name) </a>
325
+
326
+
327
+
328
+ </span>
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ <p>Returns true if the given use is allowed by this extension.</p>
340
+ </div></span>
341
+
342
+ </li>
343
+
344
+
345
+ <li class="public ">
346
+ <span class="summary_signature">
347
+
348
+ <a href="#certificate_sign%3F-instance_method" title="#certificate_sign? (instance method)">- (Boolean) <strong>certificate_sign?</strong> </a>
349
+
350
+
351
+
352
+ </span>
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+ <span class="summary_desc"><div class='inline'></div></span>
363
+
364
+ </li>
365
+
366
+
367
+ <li class="public ">
368
+ <span class="summary_signature">
369
+
370
+ <a href="#crl_sign%3F-instance_method" title="#crl_sign? (instance method)">- (Boolean) <strong>crl_sign?</strong> </a>
371
+
372
+
373
+
374
+ </span>
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+ <span class="summary_desc"><div class='inline'></div></span>
385
+
386
+ </li>
387
+
388
+
389
+ <li class="public ">
390
+ <span class="summary_signature">
391
+
392
+ <a href="#data_encipherment%3F-instance_method" title="#data_encipherment? (instance method)">- (Boolean) <strong>data_encipherment?</strong> </a>
393
+
394
+
395
+
396
+ </span>
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+ <span class="summary_desc"><div class='inline'></div></span>
407
+
408
+ </li>
409
+
410
+
411
+ <li class="public ">
412
+ <span class="summary_signature">
413
+
414
+ <a href="#decipher_only%3F-instance_method" title="#decipher_only? (instance method)">- (Boolean) <strong>decipher_only?</strong> </a>
415
+
416
+
417
+
418
+ </span>
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <span class="summary_desc"><div class='inline'></div></span>
429
+
430
+ </li>
431
+
432
+
433
+ <li class="public ">
434
+ <span class="summary_signature">
435
+
436
+ <a href="#digital_signature%3F-instance_method" title="#digital_signature? (instance method)">- (Boolean) <strong>digital_signature?</strong> </a>
437
+
438
+
439
+
440
+ </span>
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+ <span class="summary_desc"><div class='inline'></div></span>
451
+
452
+ </li>
453
+
454
+
455
+ <li class="public ">
456
+ <span class="summary_signature">
457
+
458
+ <a href="#encipher_only%3F-instance_method" title="#encipher_only? (instance method)">- (Boolean) <strong>encipher_only?</strong> </a>
459
+
460
+
461
+
462
+ </span>
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+ <span class="summary_desc"><div class='inline'></div></span>
473
+
474
+ </li>
475
+
476
+
477
+ <li class="public ">
478
+ <span class="summary_signature">
479
+
480
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (KeyUsage) <strong>initialize</strong>(*args) </a>
481
+
482
+
483
+
484
+ </span>
485
+
486
+
487
+ <span class="note title constructor">constructor</span>
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+ <span class="summary_desc"><div class='inline'>
497
+ <p>See OpenSSL::X509::Extension#initialize.</p>
498
+ </div></span>
499
+
500
+ </li>
501
+
502
+
503
+ <li class="public ">
504
+ <span class="summary_signature">
505
+
506
+ <a href="#key_agreement%3F-instance_method" title="#key_agreement? (instance method)">- (Boolean) <strong>key_agreement?</strong> </a>
507
+
508
+
509
+
510
+ </span>
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+ <span class="summary_desc"><div class='inline'></div></span>
521
+
522
+ </li>
523
+
524
+
525
+ <li class="public ">
526
+ <span class="summary_signature">
527
+
528
+ <a href="#key_encipherment%3F-instance_method" title="#key_encipherment? (instance method)">- (Boolean) <strong>key_encipherment?</strong> </a>
529
+
530
+
531
+
532
+ </span>
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+ <span class="summary_desc"><div class='inline'></div></span>
543
+
544
+ </li>
545
+
546
+
547
+ <li class="public ">
548
+ <span class="summary_signature">
549
+
550
+ <a href="#non_repudiation%3F-instance_method" title="#non_repudiation? (instance method)">- (Boolean) <strong>non_repudiation?</strong> </a>
551
+
552
+
553
+
554
+ </span>
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+ <span class="summary_desc"><div class='inline'></div></span>
565
+
566
+ </li>
567
+
568
+
569
+ </ul>
570
+
571
+
572
+
573
+ <div id="constructor_details" class="method_details_list">
574
+ <h2>Constructor Details</h2>
575
+
576
+ <div class="method_details first">
577
+ <h3 class="signature first" id="initialize-instance_method">
578
+
579
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::KeyUsage (class)">KeyUsage</a></span></tt>) <strong>initialize</strong>(*args)
580
+
581
+
582
+
583
+
584
+
585
+ </h3><div class="docstring">
586
+ <div class="discussion">
587
+
588
+ <p>See OpenSSL::X509::Extension#initialize</p>
589
+
590
+
591
+ </div>
592
+ </div>
593
+ <div class="tags">
594
+
595
+
596
+ </div><table class="source_code">
597
+ <tr>
598
+ <td>
599
+ <pre class="lines">
600
+
601
+
602
+ 83
603
+ 84
604
+ 85
605
+ 86
606
+ 87</pre>
607
+ </td>
608
+ <td>
609
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 83</span>
610
+
611
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
612
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
613
+
614
+ <span class='ivar'>@allowed_uses</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</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_use'>use</span><span class='op'>|</span> <span class='id identifier rubyid_use'>use</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='rbrace'>}</span>
615
+ <span class='kw'>end</span></pre>
616
+ </td>
617
+ </tr>
618
+ </table>
619
+ </div>
620
+
621
+ </div>
622
+
623
+ <div id="instance_attr_details" class="attr_details">
624
+ <h2>Instance Attribute Details</h2>
625
+
626
+
627
+ <span id=""></span>
628
+ <span id="allowed_uses-instance_method"></span>
629
+ <div class="method_details first">
630
+ <h3 class="signature first" id="allowed_uses-instance_method">
631
+
632
+ - (<tt>Object</tt>) <strong>allowed_uses</strong> <span class="extras">(readonly)</span>
633
+
634
+
635
+
636
+
637
+
638
+ </h3><div class="docstring">
639
+ <div class="discussion">
640
+
641
+ <p>An array of the key uses allowed. See the AU_* constants in this class.</p>
642
+
643
+
644
+ </div>
645
+ </div>
646
+ <div class="tags">
647
+
648
+
649
+ </div><table class="source_code">
650
+ <tr>
651
+ <td>
652
+ <pre class="lines">
653
+
654
+
655
+ 80
656
+ 81
657
+ 82</pre>
658
+ </td>
659
+ <td>
660
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 80</span>
661
+
662
+ <span class='kw'>def</span> <span class='id identifier rubyid_allowed_uses'>allowed_uses</span>
663
+ <span class='ivar'>@allowed_uses</span>
664
+ <span class='kw'>end</span></pre>
665
+ </td>
666
+ </tr>
667
+ </table>
668
+ </div>
669
+
670
+ </div>
671
+
672
+
673
+ <div id="instance_method_details" class="method_details_list">
674
+ <h2>Instance Method Details</h2>
675
+
676
+
677
+ <div class="method_details first">
678
+ <h3 class="signature first" id="allows?-instance_method">
679
+
680
+ - (<tt>Boolean</tt>) <strong>allows?</strong>(friendly_use_name)
681
+
682
+
683
+
684
+
685
+
686
+ </h3><div class="docstring">
687
+ <div class="discussion">
688
+
689
+ <p>Returns true if the given use is allowed by this extension.</p>
690
+
691
+
692
+ </div>
693
+ </div>
694
+ <div class="tags">
695
+ <p class="tag_title">Parameters:</p>
696
+ <ul class="param">
697
+
698
+ <li>
699
+
700
+ <span class='name'>friendly_use_name</span>
701
+
702
+
703
+ <span class='type'>(<tt>string</tt>)</span>
704
+
705
+
706
+
707
+ &mdash;
708
+ <div class='inline'>
709
+ <p>One of the AU_* constants in this class.</p>
710
+ </div>
711
+
712
+ </li>
713
+
714
+ </ul>
715
+
716
+ <p class="tag_title">Returns:</p>
717
+ <ul class="return">
718
+
719
+ <li>
720
+
721
+
722
+ <span class='type'>(<tt>Boolean</tt>)</span>
723
+
724
+
725
+
726
+ </li>
727
+
728
+ </ul>
729
+
730
+ </div><table class="source_code">
731
+ <tr>
732
+ <td>
733
+ <pre class="lines">
734
+
735
+
736
+ 91
737
+ 92
738
+ 93</pre>
739
+ </td>
740
+ <td>
741
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 91</span>
742
+
743
+ <span class='kw'>def</span> <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='id identifier rubyid_friendly_use_name'>friendly_use_name</span> <span class='rparen'>)</span>
744
+ <span class='ivar'>@allowed_uses</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span> <span class='id identifier rubyid_friendly_use_name'>friendly_use_name</span> <span class='rparen'>)</span>
745
+ <span class='kw'>end</span></pre>
746
+ </td>
747
+ </tr>
748
+ </table>
749
+ </div>
750
+
751
+ <div class="method_details ">
752
+ <h3 class="signature " id="certificate_sign?-instance_method">
753
+
754
+ - (<tt>Boolean</tt>) <strong>certificate_sign?</strong>
755
+
756
+
757
+
758
+
759
+
760
+ </h3><div class="docstring">
761
+ <div class="discussion">
762
+
763
+
764
+ </div>
765
+ </div>
766
+ <div class="tags">
767
+
768
+ <p class="tag_title">Returns:</p>
769
+ <ul class="return">
770
+
771
+ <li>
772
+
773
+
774
+ <span class='type'>(<tt>Boolean</tt>)</span>
775
+
776
+
777
+
778
+ </li>
779
+
780
+ </ul>
781
+
782
+ </div><table class="source_code">
783
+ <tr>
784
+ <td>
785
+ <pre class="lines">
786
+
787
+
788
+ 115
789
+ 116
790
+ 117</pre>
791
+ </td>
792
+ <td>
793
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 115</span>
794
+
795
+ <span class='kw'>def</span> <span class='id identifier rubyid_certificate_sign?'>certificate_sign?</span>
796
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_CERTIFICATE_SIGN</span> <span class='rparen'>)</span>
797
+ <span class='kw'>end</span></pre>
798
+ </td>
799
+ </tr>
800
+ </table>
801
+ </div>
802
+
803
+ <div class="method_details ">
804
+ <h3 class="signature " id="crl_sign?-instance_method">
805
+
806
+ - (<tt>Boolean</tt>) <strong>crl_sign?</strong>
807
+
808
+
809
+
810
+
811
+
812
+ </h3><div class="docstring">
813
+ <div class="discussion">
814
+
815
+
816
+ </div>
817
+ </div>
818
+ <div class="tags">
819
+
820
+ <p class="tag_title">Returns:</p>
821
+ <ul class="return">
822
+
823
+ <li>
824
+
825
+
826
+ <span class='type'>(<tt>Boolean</tt>)</span>
827
+
828
+
829
+
830
+ </li>
831
+
832
+ </ul>
833
+
834
+ </div><table class="source_code">
835
+ <tr>
836
+ <td>
837
+ <pre class="lines">
838
+
839
+
840
+ 119
841
+ 120
842
+ 121</pre>
843
+ </td>
844
+ <td>
845
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 119</span>
846
+
847
+ <span class='kw'>def</span> <span class='id identifier rubyid_crl_sign?'>crl_sign?</span>
848
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_CRL_SIGN</span> <span class='rparen'>)</span>
849
+ <span class='kw'>end</span></pre>
850
+ </td>
851
+ </tr>
852
+ </table>
853
+ </div>
854
+
855
+ <div class="method_details ">
856
+ <h3 class="signature " id="data_encipherment?-instance_method">
857
+
858
+ - (<tt>Boolean</tt>) <strong>data_encipherment?</strong>
859
+
860
+
861
+
862
+
863
+
864
+ </h3><div class="docstring">
865
+ <div class="discussion">
866
+
867
+
868
+ </div>
869
+ </div>
870
+ <div class="tags">
871
+
872
+ <p class="tag_title">Returns:</p>
873
+ <ul class="return">
874
+
875
+ <li>
876
+
877
+
878
+ <span class='type'>(<tt>Boolean</tt>)</span>
879
+
880
+
881
+
882
+ </li>
883
+
884
+ </ul>
885
+
886
+ </div><table class="source_code">
887
+ <tr>
888
+ <td>
889
+ <pre class="lines">
890
+
891
+
892
+ 107
893
+ 108
894
+ 109</pre>
895
+ </td>
896
+ <td>
897
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 107</span>
898
+
899
+ <span class='kw'>def</span> <span class='id identifier rubyid_data_encipherment?'>data_encipherment?</span>
900
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_DATA_ENCIPHERMENT</span> <span class='rparen'>)</span>
901
+ <span class='kw'>end</span></pre>
902
+ </td>
903
+ </tr>
904
+ </table>
905
+ </div>
906
+
907
+ <div class="method_details ">
908
+ <h3 class="signature " id="decipher_only?-instance_method">
909
+
910
+ - (<tt>Boolean</tt>) <strong>decipher_only?</strong>
911
+
912
+
913
+
914
+
915
+
916
+ </h3><div class="docstring">
917
+ <div class="discussion">
918
+
919
+
920
+ </div>
921
+ </div>
922
+ <div class="tags">
923
+
924
+ <p class="tag_title">Returns:</p>
925
+ <ul class="return">
926
+
927
+ <li>
928
+
929
+
930
+ <span class='type'>(<tt>Boolean</tt>)</span>
931
+
932
+
933
+
934
+ </li>
935
+
936
+ </ul>
937
+
938
+ </div><table class="source_code">
939
+ <tr>
940
+ <td>
941
+ <pre class="lines">
942
+
943
+
944
+ 127
945
+ 128
946
+ 129</pre>
947
+ </td>
948
+ <td>
949
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 127</span>
950
+
951
+ <span class='kw'>def</span> <span class='id identifier rubyid_decipher_only?'>decipher_only?</span>
952
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_DECIPHER_ONLY</span> <span class='rparen'>)</span>
953
+ <span class='kw'>end</span></pre>
954
+ </td>
955
+ </tr>
956
+ </table>
957
+ </div>
958
+
959
+ <div class="method_details ">
960
+ <h3 class="signature " id="digital_signature?-instance_method">
961
+
962
+ - (<tt>Boolean</tt>) <strong>digital_signature?</strong>
963
+
964
+
965
+
966
+
967
+
968
+ </h3><div class="docstring">
969
+ <div class="discussion">
970
+
971
+
972
+ </div>
973
+ </div>
974
+ <div class="tags">
975
+
976
+ <p class="tag_title">Returns:</p>
977
+ <ul class="return">
978
+
979
+ <li>
980
+
981
+
982
+ <span class='type'>(<tt>Boolean</tt>)</span>
983
+
984
+
985
+
986
+ </li>
987
+
988
+ </ul>
989
+
990
+ </div><table class="source_code">
991
+ <tr>
992
+ <td>
993
+ <pre class="lines">
994
+
995
+
996
+ 95
997
+ 96
998
+ 97</pre>
999
+ </td>
1000
+ <td>
1001
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 95</span>
1002
+
1003
+ <span class='kw'>def</span> <span class='id identifier rubyid_digital_signature?'>digital_signature?</span>
1004
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_DIGITAL_SIGNATURE</span> <span class='rparen'>)</span>
1005
+ <span class='kw'>end</span></pre>
1006
+ </td>
1007
+ </tr>
1008
+ </table>
1009
+ </div>
1010
+
1011
+ <div class="method_details ">
1012
+ <h3 class="signature " id="encipher_only?-instance_method">
1013
+
1014
+ - (<tt>Boolean</tt>) <strong>encipher_only?</strong>
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+ </h3><div class="docstring">
1021
+ <div class="discussion">
1022
+
1023
+
1024
+ </div>
1025
+ </div>
1026
+ <div class="tags">
1027
+
1028
+ <p class="tag_title">Returns:</p>
1029
+ <ul class="return">
1030
+
1031
+ <li>
1032
+
1033
+
1034
+ <span class='type'>(<tt>Boolean</tt>)</span>
1035
+
1036
+
1037
+
1038
+ </li>
1039
+
1040
+ </ul>
1041
+
1042
+ </div><table class="source_code">
1043
+ <tr>
1044
+ <td>
1045
+ <pre class="lines">
1046
+
1047
+
1048
+ 123
1049
+ 124
1050
+ 125</pre>
1051
+ </td>
1052
+ <td>
1053
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 123</span>
1054
+
1055
+ <span class='kw'>def</span> <span class='id identifier rubyid_encipher_only?'>encipher_only?</span>
1056
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_ENCIPHER_ONLY</span> <span class='rparen'>)</span>
1057
+ <span class='kw'>end</span></pre>
1058
+ </td>
1059
+ </tr>
1060
+ </table>
1061
+ </div>
1062
+
1063
+ <div class="method_details ">
1064
+ <h3 class="signature " id="key_agreement?-instance_method">
1065
+
1066
+ - (<tt>Boolean</tt>) <strong>key_agreement?</strong>
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+ </h3><div class="docstring">
1073
+ <div class="discussion">
1074
+
1075
+
1076
+ </div>
1077
+ </div>
1078
+ <div class="tags">
1079
+
1080
+ <p class="tag_title">Returns:</p>
1081
+ <ul class="return">
1082
+
1083
+ <li>
1084
+
1085
+
1086
+ <span class='type'>(<tt>Boolean</tt>)</span>
1087
+
1088
+
1089
+
1090
+ </li>
1091
+
1092
+ </ul>
1093
+
1094
+ </div><table class="source_code">
1095
+ <tr>
1096
+ <td>
1097
+ <pre class="lines">
1098
+
1099
+
1100
+ 111
1101
+ 112
1102
+ 113</pre>
1103
+ </td>
1104
+ <td>
1105
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 111</span>
1106
+
1107
+ <span class='kw'>def</span> <span class='id identifier rubyid_key_agreement?'>key_agreement?</span>
1108
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_KEY_AGREEMENT</span> <span class='rparen'>)</span>
1109
+ <span class='kw'>end</span></pre>
1110
+ </td>
1111
+ </tr>
1112
+ </table>
1113
+ </div>
1114
+
1115
+ <div class="method_details ">
1116
+ <h3 class="signature " id="key_encipherment?-instance_method">
1117
+
1118
+ - (<tt>Boolean</tt>) <strong>key_encipherment?</strong>
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+ </h3><div class="docstring">
1125
+ <div class="discussion">
1126
+
1127
+
1128
+ </div>
1129
+ </div>
1130
+ <div class="tags">
1131
+
1132
+ <p class="tag_title">Returns:</p>
1133
+ <ul class="return">
1134
+
1135
+ <li>
1136
+
1137
+
1138
+ <span class='type'>(<tt>Boolean</tt>)</span>
1139
+
1140
+
1141
+
1142
+ </li>
1143
+
1144
+ </ul>
1145
+
1146
+ </div><table class="source_code">
1147
+ <tr>
1148
+ <td>
1149
+ <pre class="lines">
1150
+
1151
+
1152
+ 103
1153
+ 104
1154
+ 105</pre>
1155
+ </td>
1156
+ <td>
1157
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 103</span>
1158
+
1159
+ <span class='kw'>def</span> <span class='id identifier rubyid_key_encipherment?'>key_encipherment?</span>
1160
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_KEY_ENCIPHERMENT</span> <span class='rparen'>)</span>
1161
+ <span class='kw'>end</span></pre>
1162
+ </td>
1163
+ </tr>
1164
+ </table>
1165
+ </div>
1166
+
1167
+ <div class="method_details ">
1168
+ <h3 class="signature " id="non_repudiation?-instance_method">
1169
+
1170
+ - (<tt>Boolean</tt>) <strong>non_repudiation?</strong>
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+ </h3><div class="docstring">
1177
+ <div class="discussion">
1178
+
1179
+
1180
+ </div>
1181
+ </div>
1182
+ <div class="tags">
1183
+
1184
+ <p class="tag_title">Returns:</p>
1185
+ <ul class="return">
1186
+
1187
+ <li>
1188
+
1189
+
1190
+ <span class='type'>(<tt>Boolean</tt>)</span>
1191
+
1192
+
1193
+
1194
+ </li>
1195
+
1196
+ </ul>
1197
+
1198
+ </div><table class="source_code">
1199
+ <tr>
1200
+ <td>
1201
+ <pre class="lines">
1202
+
1203
+
1204
+ 99
1205
+ 100
1206
+ 101</pre>
1207
+ </td>
1208
+ <td>
1209
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 99</span>
1210
+
1211
+ <span class='kw'>def</span> <span class='id identifier rubyid_non_repudiation?'>non_repudiation?</span>
1212
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_NON_REPUDIATION</span> <span class='rparen'>)</span>
1213
+ <span class='kw'>end</span></pre>
1214
+ </td>
1215
+ </tr>
1216
+ </table>
1217
+ </div>
1218
+
1219
+ </div>
1220
+
1221
+ </div>
1222
+
1223
+ <div id="footer">
1224
+ Generated on Tue Oct 23 22:48:03 2012 by
1225
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1226
+ 0.8.0 (ruby-1.9.3).
1227
+ </div>
1228
+
1229
+ </body>
1230
+ </html>