r509 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/README.md +447 -0
  2. data/Rakefile +38 -0
  3. data/bin/r509 +96 -0
  4. data/bin/r509-parse +35 -0
  5. data/doc/R509.html +154 -0
  6. data/doc/R509/Cert.html +3954 -0
  7. data/doc/R509/Cert/Extensions.html +360 -0
  8. data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +391 -0
  9. data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +148 -0
  10. data/doc/R509/Cert/Extensions/BasicConstraints.html +482 -0
  11. data/doc/R509/Cert/Extensions/CrlDistributionPoints.html +316 -0
  12. data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +780 -0
  13. data/doc/R509/Cert/Extensions/KeyUsage.html +1230 -0
  14. data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +467 -0
  15. data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +216 -0
  16. data/doc/R509/CertificateAuthority.html +126 -0
  17. data/doc/R509/CertificateAuthority/Signer.html +855 -0
  18. data/doc/R509/Config.html +127 -0
  19. data/doc/R509/Config/CaConfig.html +2144 -0
  20. data/doc/R509/Config/CaConfigPool.html +599 -0
  21. data/doc/R509/Config/CaProfile.html +656 -0
  22. data/doc/R509/Config/SubjectItemPolicy.html +578 -0
  23. data/doc/R509/Crl.html +126 -0
  24. data/doc/R509/Crl/Administrator.html +2077 -0
  25. data/doc/R509/Crl/Parser.html +1224 -0
  26. data/doc/R509/Csr.html +2248 -0
  27. data/doc/R509/IOHelpers.html +564 -0
  28. data/doc/R509/MessageDigest.html +396 -0
  29. data/doc/R509/NameSanitizer.html +319 -0
  30. data/doc/R509/Ocsp.html +128 -0
  31. data/doc/R509/Ocsp/Request.html +126 -0
  32. data/doc/R509/Ocsp/Request/Nonce.html +160 -0
  33. data/doc/R509/Ocsp/Response.html +837 -0
  34. data/doc/R509/OidMapper.html +393 -0
  35. data/doc/R509/PrivateKey.html +1647 -0
  36. data/doc/R509/R509Error.html +134 -0
  37. data/doc/R509/Spki.html +1424 -0
  38. data/doc/R509/Subject.html +836 -0
  39. data/doc/R509/Validity.html +160 -0
  40. data/doc/R509/Validity/Checker.html +320 -0
  41. data/doc/R509/Validity/DefaultChecker.html +283 -0
  42. data/doc/R509/Validity/DefaultWriter.html +330 -0
  43. data/doc/R509/Validity/Status.html +561 -0
  44. data/doc/R509/Validity/Writer.html +394 -0
  45. data/doc/_index.html +501 -0
  46. data/doc/class_list.html +53 -0
  47. data/doc/css/common.css +1 -0
  48. data/doc/css/full_list.css +57 -0
  49. data/doc/css/style.css +328 -0
  50. data/doc/file.README.html +534 -0
  51. data/doc/file.r509.html +149 -0
  52. data/doc/file_list.html +58 -0
  53. data/doc/frames.html +28 -0
  54. data/doc/index.html +534 -0
  55. data/doc/js/app.js +208 -0
  56. data/doc/js/full_list.js +173 -0
  57. data/doc/js/jquery.js +4 -0
  58. data/doc/methods_list.html +1932 -0
  59. data/doc/top-level-namespace.html +112 -0
  60. data/lib/r509.rb +22 -0
  61. data/lib/r509/cert.rb +414 -0
  62. data/lib/r509/cert/extensions.rb +309 -0
  63. data/lib/r509/certificateauthority.rb +290 -0
  64. data/lib/r509/config.rb +407 -0
  65. data/lib/r509/crl.rb +379 -0
  66. data/lib/r509/csr.rb +324 -0
  67. data/lib/r509/exceptions.rb +5 -0
  68. data/lib/r509/io_helpers.rb +52 -0
  69. data/lib/r509/messagedigest.rb +49 -0
  70. data/lib/r509/ocsp.rb +85 -0
  71. data/lib/r509/oidmapper.rb +32 -0
  72. data/lib/r509/privatekey.rb +185 -0
  73. data/lib/r509/spki.rb +112 -0
  74. data/lib/r509/subject.rb +133 -0
  75. data/lib/r509/validity.rb +92 -0
  76. data/lib/r509/version.rb +4 -0
  77. data/r509.yaml +73 -0
  78. data/spec/cert/extensions_spec.rb +632 -0
  79. data/spec/cert_spec.rb +321 -0
  80. data/spec/certificate_authority_spec.rb +260 -0
  81. data/spec/config_spec.rb +349 -0
  82. data/spec/crl_spec.rb +215 -0
  83. data/spec/csr_spec.rb +302 -0
  84. data/spec/fixtures.rb +233 -0
  85. data/spec/fixtures/cert1.der +0 -0
  86. data/spec/fixtures/cert1.pem +24 -0
  87. data/spec/fixtures/cert1_public_key_modulus.txt +1 -0
  88. data/spec/fixtures/cert3.p12 +0 -0
  89. data/spec/fixtures/cert3.pem +28 -0
  90. data/spec/fixtures/cert3_key.pem +27 -0
  91. data/spec/fixtures/cert3_key_des3.pem +30 -0
  92. data/spec/fixtures/cert4.pem +14 -0
  93. data/spec/fixtures/cert5.pem +30 -0
  94. data/spec/fixtures/cert6.pem +26 -0
  95. data/spec/fixtures/cert_expired.pem +26 -0
  96. data/spec/fixtures/cert_not_yet_valid.pem +26 -0
  97. data/spec/fixtures/cert_san.pem +27 -0
  98. data/spec/fixtures/cert_san2.pem +22 -0
  99. data/spec/fixtures/config_pool_test_minimal.yaml +15 -0
  100. data/spec/fixtures/config_test.yaml +41 -0
  101. data/spec/fixtures/config_test_engine_key.yaml +7 -0
  102. data/spec/fixtures/config_test_engine_no_key_name.yaml +6 -0
  103. data/spec/fixtures/config_test_minimal.yaml +7 -0
  104. data/spec/fixtures/config_test_password.yaml +7 -0
  105. data/spec/fixtures/config_test_various.yaml +100 -0
  106. data/spec/fixtures/crl_list_file.txt +1 -0
  107. data/spec/fixtures/crl_with_reason.pem +17 -0
  108. data/spec/fixtures/csr1.der +0 -0
  109. data/spec/fixtures/csr1.pem +17 -0
  110. data/spec/fixtures/csr1_key.der +0 -0
  111. data/spec/fixtures/csr1_key.pem +27 -0
  112. data/spec/fixtures/csr1_key_encrypted_des3.pem +30 -0
  113. data/spec/fixtures/csr1_newlines.pem +32 -0
  114. data/spec/fixtures/csr1_no_begin_end.pem +15 -0
  115. data/spec/fixtures/csr1_public_key_modulus.txt +1 -0
  116. data/spec/fixtures/csr2.pem +15 -0
  117. data/spec/fixtures/csr2_key.pem +27 -0
  118. data/spec/fixtures/csr3.pem +16 -0
  119. data/spec/fixtures/csr4.pem +25 -0
  120. data/spec/fixtures/csr_dsa.pem +15 -0
  121. data/spec/fixtures/csr_invalid_signature.pem +13 -0
  122. data/spec/fixtures/dsa_key.pem +20 -0
  123. data/spec/fixtures/key4.pem +27 -0
  124. data/spec/fixtures/key4_encrypted_des3.pem +30 -0
  125. data/spec/fixtures/missing_key_identifier_ca.cer +21 -0
  126. data/spec/fixtures/missing_key_identifier_ca.key +27 -0
  127. data/spec/fixtures/ocsptest.r509.local.pem +27 -0
  128. data/spec/fixtures/ocsptest.r509.local_ocsp_request.der +0 -0
  129. data/spec/fixtures/ocsptest2.r509.local.pem +27 -0
  130. data/spec/fixtures/second_ca.cer +26 -0
  131. data/spec/fixtures/second_ca.key +27 -0
  132. data/spec/fixtures/spkac.der +0 -0
  133. data/spec/fixtures/spkac.txt +1 -0
  134. data/spec/fixtures/spkac_dsa.txt +1 -0
  135. data/spec/fixtures/stca.pem +22 -0
  136. data/spec/fixtures/stca_ocsp_request.der +0 -0
  137. data/spec/fixtures/stca_ocsp_response.der +0 -0
  138. data/spec/fixtures/test1.csr +17 -0
  139. data/spec/fixtures/test_ca.cer +22 -0
  140. data/spec/fixtures/test_ca.key +28 -0
  141. data/spec/fixtures/test_ca.p12 +0 -0
  142. data/spec/fixtures/test_ca_des3.key +30 -0
  143. data/spec/fixtures/test_ca_ocsp.cer +26 -0
  144. data/spec/fixtures/test_ca_ocsp.key +27 -0
  145. data/spec/fixtures/test_ca_ocsp.p12 +0 -0
  146. data/spec/fixtures/test_ca_ocsp_chain.txt +48 -0
  147. data/spec/fixtures/test_ca_ocsp_response.der +0 -0
  148. data/spec/fixtures/test_ca_subroot.cer +26 -0
  149. data/spec/fixtures/test_ca_subroot.key +27 -0
  150. data/spec/fixtures/test_ca_subroot_ocsp.cer +25 -0
  151. data/spec/fixtures/test_ca_subroot_ocsp.key +27 -0
  152. data/spec/fixtures/test_ca_subroot_ocsp_response.der +0 -0
  153. data/spec/fixtures/unknown_oid.csr +17 -0
  154. data/spec/message_digest_spec.rb +89 -0
  155. data/spec/ocsp_spec.rb +111 -0
  156. data/spec/oid_mapper_spec.rb +31 -0
  157. data/spec/privatekey_spec.rb +198 -0
  158. data/spec/spec_helper.rb +14 -0
  159. data/spec/spki_spec.rb +157 -0
  160. data/spec/subject_spec.rb +203 -0
  161. data/spec/validity_spec.rb +98 -0
  162. metadata +257 -0
@@ -0,0 +1,316 @@
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::CrlDistributionPoints
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 (C)</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">CrlDistributionPoints</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::CrlDistributionPoints
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::CrlDistributionPoints</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 CrlDistributionPoints certificate extension, with methods to
108
+ provide 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'>crlDistributionPoints</span><span class='tstring_end'>&quot;</span></span></pre></dd>
125
+
126
+ </dl>
127
+
128
+
129
+
130
+
131
+
132
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
133
+ <ul class="summary">
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#crl_uris-instance_method" title="#crl_uris (instance method)">- (Object) <strong>crl_uris</strong> </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+ <span class="note title readonly">readonly</span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <span class="summary_desc"><div class='inline'>
158
+ <p>An array of the CRL URIs, if any.</p>
159
+ </div></span>
160
+
161
+ </li>
162
+
163
+
164
+ </ul>
165
+
166
+
167
+
168
+
169
+
170
+ <h2>
171
+ Instance Method Summary
172
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
173
+ </h2>
174
+
175
+ <ul class="summary">
176
+
177
+ <li class="public ">
178
+ <span class="summary_signature">
179
+
180
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (CrlDistributionPoints) <strong>initialize</strong>(*args) </a>
181
+
182
+
183
+
184
+ </span>
185
+
186
+
187
+ <span class="note title constructor">constructor</span>
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ <span class="summary_desc"><div class='inline'>
197
+ <p>See OpenSSL::X509::Extension#initialize.</p>
198
+ </div></span>
199
+
200
+ </li>
201
+
202
+
203
+ </ul>
204
+
205
+
206
+
207
+ <div id="constructor_details" class="method_details_list">
208
+ <h2>Constructor Details</h2>
209
+
210
+ <div class="method_details first">
211
+ <h3 class="signature first" id="initialize-instance_method">
212
+
213
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::CrlDistributionPoints (class)">CrlDistributionPoints</a></span></tt>) <strong>initialize</strong>(*args)
214
+
215
+
216
+
217
+
218
+
219
+ </h3><div class="docstring">
220
+ <div class="discussion">
221
+
222
+ <p>See OpenSSL::X509::Extension#initialize</p>
223
+
224
+
225
+ </div>
226
+ </div>
227
+ <div class="tags">
228
+
229
+
230
+ </div><table class="source_code">
231
+ <tr>
232
+ <td>
233
+ <pre class="lines">
234
+
235
+
236
+ 254
237
+ 255
238
+ 256
239
+ 257
240
+ 258</pre>
241
+ </td>
242
+ <td>
243
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 254</span>
244
+
245
+ <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>
246
+ <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>
247
+
248
+ <span class='ivar'>@crl_uris</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_scan'>scan</span><span class='lparen'>(</span> <span class='const'>URI_REGEX</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_match'>match</span><span class='op'>|</span> <span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
249
+ <span class='kw'>end</span></pre>
250
+ </td>
251
+ </tr>
252
+ </table>
253
+ </div>
254
+
255
+ </div>
256
+
257
+ <div id="instance_attr_details" class="attr_details">
258
+ <h2>Instance Attribute Details</h2>
259
+
260
+
261
+ <span id=""></span>
262
+ <span id="crl_uris-instance_method"></span>
263
+ <div class="method_details first">
264
+ <h3 class="signature first" id="crl_uris-instance_method">
265
+
266
+ - (<tt>Object</tt>) <strong>crl_uris</strong> <span class="extras">(readonly)</span>
267
+
268
+
269
+
270
+
271
+
272
+ </h3><div class="docstring">
273
+ <div class="discussion">
274
+
275
+ <p>An array of the CRL URIs, if any</p>
276
+
277
+
278
+ </div>
279
+ </div>
280
+ <div class="tags">
281
+
282
+
283
+ </div><table class="source_code">
284
+ <tr>
285
+ <td>
286
+ <pre class="lines">
287
+
288
+
289
+ 251
290
+ 252
291
+ 253</pre>
292
+ </td>
293
+ <td>
294
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 251</span>
295
+
296
+ <span class='kw'>def</span> <span class='id identifier rubyid_crl_uris'>crl_uris</span>
297
+ <span class='ivar'>@crl_uris</span>
298
+ <span class='kw'>end</span></pre>
299
+ </td>
300
+ </tr>
301
+ </table>
302
+ </div>
303
+
304
+ </div>
305
+
306
+
307
+ </div>
308
+
309
+ <div id="footer">
310
+ Generated on Tue Oct 23 22:48:03 2012 by
311
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
312
+ 0.8.0 (ruby-1.9.3).
313
+ </div>
314
+
315
+ </body>
316
+ </html>
@@ -0,0 +1,780 @@
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::ExtendedKeyUsage
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 (E)</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">ExtendedKeyUsage</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::ExtendedKeyUsage
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::ExtendedKeyUsage</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 ExtendedKeyUsage certificate extension, with methods to
108
+ provide 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'>extendedKeyUsage</span><span class='tstring_end'>&quot;</span></span></pre></dd>
125
+
126
+ <dt id="AU_WEB_SERVER_AUTH-constant" class="">AU_WEB_SERVER_AUTH =
127
+ <div class="docstring">
128
+ <div class="discussion">
129
+
130
+ <p>The OpenSSL friendly name for the "serverAuth" extended 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'>TLS Web Server Authentication</span><span class='tstring_end'>&quot;</span></span></pre></dd>
141
+
142
+ <dt id="AU_WEB_CLIENT_AUTH-constant" class="">AU_WEB_CLIENT_AUTH =
143
+ <div class="docstring">
144
+ <div class="discussion">
145
+
146
+ <p>The OpenSSL friendly name for the "clientAuth" extended 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'>TLS Web Client Authentication</span><span class='tstring_end'>&quot;</span></span></pre></dd>
157
+
158
+ <dt id="AU_CODE_SIGNING-constant" class="">AU_CODE_SIGNING =
159
+ <div class="docstring">
160
+ <div class="discussion">
161
+
162
+ <p>The OpenSSL friendly name for the "codeSigning" extended 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'>Code Signing</span><span class='tstring_end'>&quot;</span></span></pre></dd>
173
+
174
+ <dt id="AU_EMAIL_PROTECTION-constant" class="">AU_EMAIL_PROTECTION =
175
+ <div class="docstring">
176
+ <div class="discussion">
177
+
178
+ <p>The OpenSSL friendly name for the "emailProtection" extended 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'>E-mail Protection</span><span class='tstring_end'>&quot;</span></span></pre></dd>
189
+
190
+ </dl>
191
+
192
+
193
+
194
+
195
+
196
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
197
+ <ul class="summary">
198
+
199
+ <li class="public ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#allowed_uses-instance_method" title="#allowed_uses (instance method)">- (Object) <strong>allowed_uses</strong> </a>
203
+
204
+
205
+
206
+ </span>
207
+
208
+
209
+
210
+
211
+ <span class="note title readonly">readonly</span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="summary_desc"><div class='inline'>
222
+ <p>An array of the key uses allowed.</p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ </ul>
229
+
230
+
231
+
232
+
233
+
234
+ <h2>
235
+ Instance Method Summary
236
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
237
+ </h2>
238
+
239
+ <ul class="summary">
240
+
241
+ <li class="public ">
242
+ <span class="summary_signature">
243
+
244
+ <a href="#allows%3F-instance_method" title="#allows? (instance method)">- (Boolean) <strong>allows?</strong>(friendly_use_name) </a>
245
+
246
+
247
+
248
+ </span>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+ <span class="summary_desc"><div class='inline'>
259
+ <p>Returns true if the given use is allowed by this extension.</p>
260
+ </div></span>
261
+
262
+ </li>
263
+
264
+
265
+ <li class="public ">
266
+ <span class="summary_signature">
267
+
268
+ <a href="#code_signing%3F-instance_method" title="#code_signing? (instance method)">- (Boolean) <strong>code_signing?</strong> </a>
269
+
270
+
271
+
272
+ </span>
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+ <span class="summary_desc"><div class='inline'></div></span>
283
+
284
+ </li>
285
+
286
+
287
+ <li class="public ">
288
+ <span class="summary_signature">
289
+
290
+ <a href="#email_protection%3F-instance_method" title="#email_protection? (instance method)">- (Boolean) <strong>email_protection?</strong> </a>
291
+
292
+
293
+
294
+ </span>
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+ <span class="summary_desc"><div class='inline'></div></span>
305
+
306
+ </li>
307
+
308
+
309
+ <li class="public ">
310
+ <span class="summary_signature">
311
+
312
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (ExtendedKeyUsage) <strong>initialize</strong>(*args) </a>
313
+
314
+
315
+
316
+ </span>
317
+
318
+
319
+ <span class="note title constructor">constructor</span>
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+ <span class="summary_desc"><div class='inline'>
329
+ <p>See OpenSSL::X509::Extension#initialize.</p>
330
+ </div></span>
331
+
332
+ </li>
333
+
334
+
335
+ <li class="public ">
336
+ <span class="summary_signature">
337
+
338
+ <a href="#web_client_authentication%3F-instance_method" title="#web_client_authentication? (instance method)">- (Boolean) <strong>web_client_authentication?</strong> </a>
339
+
340
+
341
+
342
+ </span>
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+ <span class="summary_desc"><div class='inline'></div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#web_server_authentication%3F-instance_method" title="#web_server_authentication? (instance method)">- (Boolean) <strong>web_server_authentication?</strong> </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="summary_desc"><div class='inline'></div></span>
375
+
376
+ </li>
377
+
378
+
379
+ </ul>
380
+
381
+
382
+
383
+ <div id="constructor_details" class="method_details_list">
384
+ <h2>Constructor Details</h2>
385
+
386
+ <div class="method_details first">
387
+ <h3 class="signature first" id="initialize-instance_method">
388
+
389
+ - (<tt><span class='object_link'><a href="" title="R509::Cert::Extensions::ExtendedKeyUsage (class)">ExtendedKeyUsage</a></span></tt>) <strong>initialize</strong>(*args)
390
+
391
+
392
+
393
+
394
+
395
+ </h3><div class="docstring">
396
+ <div class="discussion">
397
+
398
+ <p>See OpenSSL::X509::Extension#initialize</p>
399
+
400
+
401
+ </div>
402
+ </div>
403
+ <div class="tags">
404
+
405
+
406
+ </div><table class="source_code">
407
+ <tr>
408
+ <td>
409
+ <pre class="lines">
410
+
411
+
412
+ 151
413
+ 152
414
+ 153
415
+ 154
416
+ 155</pre>
417
+ </td>
418
+ <td>
419
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 151</span>
420
+
421
+ <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>
422
+ <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>
423
+
424
+ <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>
425
+ <span class='kw'>end</span></pre>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ </div>
432
+
433
+ <div id="instance_attr_details" class="attr_details">
434
+ <h2>Instance Attribute Details</h2>
435
+
436
+
437
+ <span id=""></span>
438
+ <span id="allowed_uses-instance_method"></span>
439
+ <div class="method_details first">
440
+ <h3 class="signature first" id="allowed_uses-instance_method">
441
+
442
+ - (<tt>Object</tt>) <strong>allowed_uses</strong> <span class="extras">(readonly)</span>
443
+
444
+
445
+
446
+
447
+
448
+ </h3><div class="docstring">
449
+ <div class="discussion">
450
+
451
+ <p>An array of the key uses allowed. See the AU_* constants in this class.</p>
452
+
453
+
454
+ </div>
455
+ </div>
456
+ <div class="tags">
457
+
458
+
459
+ </div><table class="source_code">
460
+ <tr>
461
+ <td>
462
+ <pre class="lines">
463
+
464
+
465
+ 148
466
+ 149
467
+ 150</pre>
468
+ </td>
469
+ <td>
470
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 148</span>
471
+
472
+ <span class='kw'>def</span> <span class='id identifier rubyid_allowed_uses'>allowed_uses</span>
473
+ <span class='ivar'>@allowed_uses</span>
474
+ <span class='kw'>end</span></pre>
475
+ </td>
476
+ </tr>
477
+ </table>
478
+ </div>
479
+
480
+ </div>
481
+
482
+
483
+ <div id="instance_method_details" class="method_details_list">
484
+ <h2>Instance Method Details</h2>
485
+
486
+
487
+ <div class="method_details first">
488
+ <h3 class="signature first" id="allows?-instance_method">
489
+
490
+ - (<tt>Boolean</tt>) <strong>allows?</strong>(friendly_use_name)
491
+
492
+
493
+
494
+
495
+
496
+ </h3><div class="docstring">
497
+ <div class="discussion">
498
+
499
+ <p>Returns true if the given use is allowed by this extension.</p>
500
+
501
+
502
+ </div>
503
+ </div>
504
+ <div class="tags">
505
+ <p class="tag_title">Parameters:</p>
506
+ <ul class="param">
507
+
508
+ <li>
509
+
510
+ <span class='name'>friendly_use_name</span>
511
+
512
+
513
+ <span class='type'>(<tt>string</tt>)</span>
514
+
515
+
516
+
517
+ &mdash;
518
+ <div class='inline'>
519
+ <p>One of the AU_* constants in this class.</p>
520
+ </div>
521
+
522
+ </li>
523
+
524
+ </ul>
525
+
526
+ <p class="tag_title">Returns:</p>
527
+ <ul class="return">
528
+
529
+ <li>
530
+
531
+
532
+ <span class='type'>(<tt>Boolean</tt>)</span>
533
+
534
+
535
+
536
+ </li>
537
+
538
+ </ul>
539
+
540
+ </div><table class="source_code">
541
+ <tr>
542
+ <td>
543
+ <pre class="lines">
544
+
545
+
546
+ 159
547
+ 160
548
+ 161</pre>
549
+ </td>
550
+ <td>
551
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 159</span>
552
+
553
+ <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>
554
+ <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>
555
+ <span class='kw'>end</span></pre>
556
+ </td>
557
+ </tr>
558
+ </table>
559
+ </div>
560
+
561
+ <div class="method_details ">
562
+ <h3 class="signature " id="code_signing?-instance_method">
563
+
564
+ - (<tt>Boolean</tt>) <strong>code_signing?</strong>
565
+
566
+
567
+
568
+
569
+
570
+ </h3><div class="docstring">
571
+ <div class="discussion">
572
+
573
+
574
+ </div>
575
+ </div>
576
+ <div class="tags">
577
+
578
+ <p class="tag_title">Returns:</p>
579
+ <ul class="return">
580
+
581
+ <li>
582
+
583
+
584
+ <span class='type'>(<tt>Boolean</tt>)</span>
585
+
586
+
587
+
588
+ </li>
589
+
590
+ </ul>
591
+
592
+ </div><table class="source_code">
593
+ <tr>
594
+ <td>
595
+ <pre class="lines">
596
+
597
+
598
+ 171
599
+ 172
600
+ 173</pre>
601
+ </td>
602
+ <td>
603
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 171</span>
604
+
605
+ <span class='kw'>def</span> <span class='id identifier rubyid_code_signing?'>code_signing?</span>
606
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_CODE_SIGNING</span> <span class='rparen'>)</span>
607
+ <span class='kw'>end</span></pre>
608
+ </td>
609
+ </tr>
610
+ </table>
611
+ </div>
612
+
613
+ <div class="method_details ">
614
+ <h3 class="signature " id="email_protection?-instance_method">
615
+
616
+ - (<tt>Boolean</tt>) <strong>email_protection?</strong>
617
+
618
+
619
+
620
+
621
+
622
+ </h3><div class="docstring">
623
+ <div class="discussion">
624
+
625
+
626
+ </div>
627
+ </div>
628
+ <div class="tags">
629
+
630
+ <p class="tag_title">Returns:</p>
631
+ <ul class="return">
632
+
633
+ <li>
634
+
635
+
636
+ <span class='type'>(<tt>Boolean</tt>)</span>
637
+
638
+
639
+
640
+ </li>
641
+
642
+ </ul>
643
+
644
+ </div><table class="source_code">
645
+ <tr>
646
+ <td>
647
+ <pre class="lines">
648
+
649
+
650
+ 175
651
+ 176
652
+ 177</pre>
653
+ </td>
654
+ <td>
655
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 175</span>
656
+
657
+ <span class='kw'>def</span> <span class='id identifier rubyid_email_protection?'>email_protection?</span>
658
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_EMAIL_PROTECTION</span> <span class='rparen'>)</span>
659
+ <span class='kw'>end</span></pre>
660
+ </td>
661
+ </tr>
662
+ </table>
663
+ </div>
664
+
665
+ <div class="method_details ">
666
+ <h3 class="signature " id="web_client_authentication?-instance_method">
667
+
668
+ - (<tt>Boolean</tt>) <strong>web_client_authentication?</strong>
669
+
670
+
671
+
672
+
673
+
674
+ </h3><div class="docstring">
675
+ <div class="discussion">
676
+
677
+
678
+ </div>
679
+ </div>
680
+ <div class="tags">
681
+
682
+ <p class="tag_title">Returns:</p>
683
+ <ul class="return">
684
+
685
+ <li>
686
+
687
+
688
+ <span class='type'>(<tt>Boolean</tt>)</span>
689
+
690
+
691
+
692
+ </li>
693
+
694
+ </ul>
695
+
696
+ </div><table class="source_code">
697
+ <tr>
698
+ <td>
699
+ <pre class="lines">
700
+
701
+
702
+ 167
703
+ 168
704
+ 169</pre>
705
+ </td>
706
+ <td>
707
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 167</span>
708
+
709
+ <span class='kw'>def</span> <span class='id identifier rubyid_web_client_authentication?'>web_client_authentication?</span>
710
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_WEB_CLIENT_AUTH</span> <span class='rparen'>)</span>
711
+ <span class='kw'>end</span></pre>
712
+ </td>
713
+ </tr>
714
+ </table>
715
+ </div>
716
+
717
+ <div class="method_details ">
718
+ <h3 class="signature " id="web_server_authentication?-instance_method">
719
+
720
+ - (<tt>Boolean</tt>) <strong>web_server_authentication?</strong>
721
+
722
+
723
+
724
+
725
+
726
+ </h3><div class="docstring">
727
+ <div class="discussion">
728
+
729
+
730
+ </div>
731
+ </div>
732
+ <div class="tags">
733
+
734
+ <p class="tag_title">Returns:</p>
735
+ <ul class="return">
736
+
737
+ <li>
738
+
739
+
740
+ <span class='type'>(<tt>Boolean</tt>)</span>
741
+
742
+
743
+
744
+ </li>
745
+
746
+ </ul>
747
+
748
+ </div><table class="source_code">
749
+ <tr>
750
+ <td>
751
+ <pre class="lines">
752
+
753
+
754
+ 163
755
+ 164
756
+ 165</pre>
757
+ </td>
758
+ <td>
759
+ <pre class="code"><span class="info file"># File 'lib/r509/cert/extensions.rb', line 163</span>
760
+
761
+ <span class='kw'>def</span> <span class='id identifier rubyid_web_server_authentication?'>web_server_authentication?</span>
762
+ <span class='id identifier rubyid_allows?'>allows?</span><span class='lparen'>(</span> <span class='const'>AU_WEB_SERVER_AUTH</span> <span class='rparen'>)</span>
763
+ <span class='kw'>end</span></pre>
764
+ </td>
765
+ </tr>
766
+ </table>
767
+ </div>
768
+
769
+ </div>
770
+
771
+ </div>
772
+
773
+ <div id="footer">
774
+ Generated on Tue Oct 23 22:48:03 2012 by
775
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
776
+ 0.8.0 (ruby-1.9.3).
777
+ </div>
778
+
779
+ </body>
780
+ </html>