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,127 @@
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
+ Module: R509::Config
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>
36
+ &raquo;
37
+ <span class="title">Config</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>Module: R509::Config
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/r509/config.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>Module to contain all configuration related classes (e.g. CaConfig,
91
+ CaProfile, SubjectItemPolicy)</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+
104
+
105
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Config/CaConfig.html" title="R509::Config::CaConfig (class)">CaConfig</a></span>, <span class='object_link'><a href="Config/CaConfigPool.html" title="R509::Config::CaConfigPool (class)">CaConfigPool</a></span>, <span class='object_link'><a href="Config/CaProfile.html" title="R509::Config::CaProfile (class)">CaProfile</a></span>, <span class='object_link'><a href="Config/SubjectItemPolicy.html" title="R509::Config::SubjectItemPolicy (class)">SubjectItemPolicy</a></span>
106
+
107
+
108
+ </p>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ </div>
119
+
120
+ <div id="footer">
121
+ Generated on Tue Oct 23 22:48:01 2012 by
122
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
+ 0.8.0 (ruby-1.9.3).
124
+ </div>
125
+
126
+ </body>
127
+ </html>
@@ -0,0 +1,2144 @@
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::Config::CaConfig
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="../Config.html" title="R509::Config (module)">Config</a></span></span>
36
+ &raquo;
37
+ <span class="title">CaConfig</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::Config::CaConfig
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">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">R509::Config::CaConfig</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+ <dt class="r2">Extended by:</dt>
92
+ <dd class="r2"><span class='object_link'><a href="../IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></dd>
93
+
94
+
95
+
96
+
97
+ <dt class="r1">Includes:</dt>
98
+ <dd class="r1"><span class='object_link'><a href="../IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></dd>
99
+
100
+
101
+
102
+
103
+
104
+ <dt class="r2 last">Defined in:</dt>
105
+ <dd class="r2 last">lib/r509/config.rb</dd>
106
+
107
+ </dl>
108
+ <div class="clear"></div>
109
+
110
+ <h2>Overview</h2><div class="docstring">
111
+ <div class="discussion">
112
+
113
+ <p>Stores a configuration for our CA.</p>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+
124
+
125
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#ca_cert-instance_method" title="#ca_cert (instance method)">- (Object) <strong>ca_cert</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>Returns the value of attribute ca_cert.</p>
150
+ </div></span>
151
+
152
+ </li>
153
+
154
+
155
+ <li class="public ">
156
+ <span class="summary_signature">
157
+
158
+ <a href="#cdp_location-instance_method" title="#cdp_location (instance method)">- (Object) <strong>cdp_location</strong> </a>
159
+
160
+
161
+
162
+ </span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <span class="summary_desc"><div class='inline'>
176
+ <p>Returns the value of attribute cdp_location.</p>
177
+ </div></span>
178
+
179
+ </li>
180
+
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#crl_list_file-instance_method" title="#crl_list_file (instance method)">- (Object) <strong>crl_list_file</strong> </a>
186
+
187
+
188
+
189
+ </span>
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'>
203
+ <p>Returns the value of attribute crl_list_file.</p>
204
+ </div></span>
205
+
206
+ </li>
207
+
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#crl_number_file-instance_method" title="#crl_number_file (instance method)">- (Object) <strong>crl_number_file</strong> </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+ <span class="summary_desc"><div class='inline'>
230
+ <p>Returns the value of attribute crl_number_file.</p>
231
+ </div></span>
232
+
233
+ </li>
234
+
235
+
236
+ <li class="public ">
237
+ <span class="summary_signature">
238
+
239
+ <a href="#crl_start_skew_seconds-instance_method" title="#crl_start_skew_seconds (instance method)">- (Object) <strong>crl_start_skew_seconds</strong> </a>
240
+
241
+
242
+
243
+ </span>
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+ <span class="summary_desc"><div class='inline'>
257
+ <p>Returns the value of attribute crl_start_skew_seconds.</p>
258
+ </div></span>
259
+
260
+ </li>
261
+
262
+
263
+ <li class="public ">
264
+ <span class="summary_signature">
265
+
266
+ <a href="#crl_validity_hours-instance_method" title="#crl_validity_hours (instance method)">- (Object) <strong>crl_validity_hours</strong> </a>
267
+
268
+
269
+
270
+ </span>
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <span class="summary_desc"><div class='inline'>
284
+ <p>Returns the value of attribute crl_validity_hours.</p>
285
+ </div></span>
286
+
287
+ </li>
288
+
289
+
290
+ <li class="public ">
291
+ <span class="summary_signature">
292
+
293
+ <a href="#message_digest-instance_method" title="#message_digest (instance method)">- (Object) <strong>message_digest</strong> </a>
294
+
295
+
296
+
297
+ </span>
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+ <span class="summary_desc"><div class='inline'>
311
+ <p>Returns the value of attribute message_digest.</p>
312
+ </div></span>
313
+
314
+ </li>
315
+
316
+
317
+ <li class="public ">
318
+ <span class="summary_signature">
319
+
320
+ <a href="#ocsp_chain-instance_method" title="#ocsp_chain (instance method)">- (Object) <strong>ocsp_chain</strong> </a>
321
+
322
+
323
+
324
+ </span>
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+ <span class="summary_desc"><div class='inline'>
338
+ <p>Returns the value of attribute ocsp_chain.</p>
339
+ </div></span>
340
+
341
+ </li>
342
+
343
+
344
+ <li class="public ">
345
+ <span class="summary_signature">
346
+
347
+ <a href="#ocsp_location-instance_method" title="#ocsp_location (instance method)">- (Object) <strong>ocsp_location</strong> </a>
348
+
349
+
350
+
351
+ </span>
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+ <span class="summary_desc"><div class='inline'>
365
+ <p>Returns the value of attribute ocsp_location.</p>
366
+ </div></span>
367
+
368
+ </li>
369
+
370
+
371
+ <li class="public ">
372
+ <span class="summary_signature">
373
+
374
+ <a href="#ocsp_start_skew_seconds-instance_method" title="#ocsp_start_skew_seconds (instance method)">- (Object) <strong>ocsp_start_skew_seconds</strong> </a>
375
+
376
+
377
+
378
+ </span>
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+ <span class="summary_desc"><div class='inline'>
392
+ <p>Returns the value of attribute ocsp_start_skew_seconds.</p>
393
+ </div></span>
394
+
395
+ </li>
396
+
397
+
398
+ <li class="public ">
399
+ <span class="summary_signature">
400
+
401
+ <a href="#ocsp_validity_hours-instance_method" title="#ocsp_validity_hours (instance method)">- (Object) <strong>ocsp_validity_hours</strong> </a>
402
+
403
+
404
+
405
+ </span>
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+ <span class="summary_desc"><div class='inline'>
419
+ <p>Returns the value of attribute ocsp_validity_hours.</p>
420
+ </div></span>
421
+
422
+ </li>
423
+
424
+
425
+ </ul>
426
+
427
+
428
+
429
+
430
+
431
+ <h2>
432
+ Class Method Summary
433
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
434
+ </h2>
435
+
436
+ <ul class="summary">
437
+
438
+ <li class="public ">
439
+ <span class="summary_signature">
440
+
441
+ <a href="#from_yaml-class_method" title="from_yaml (class method)">+ (Object) <strong>from_yaml</strong>(conf_name, yaml_data, opts = {}) </a>
442
+
443
+
444
+
445
+ </span>
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+ <span class="summary_desc"><div class='inline'>
456
+ <p>Loads the named configuration config from a yaml string.</p>
457
+ </div></span>
458
+
459
+ </li>
460
+
461
+
462
+ <li class="public ">
463
+ <span class="summary_signature">
464
+
465
+ <a href="#load_from_hash-class_method" title="load_from_hash (class method)">+ (Object) <strong>load_from_hash</strong>(conf, opts = {}) </a>
466
+
467
+
468
+
469
+ </span>
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+ <span class="summary_desc"><div class='inline'>
480
+ <p>Load the configuration from a data hash.</p>
481
+ </div></span>
482
+
483
+ </li>
484
+
485
+
486
+ <li class="public ">
487
+ <span class="summary_signature">
488
+
489
+ <a href="#load_yaml-class_method" title="load_yaml (class method)">+ (Object) <strong>load_yaml</strong>(conf_name, yaml_file, opts = {}) </a>
490
+
491
+
492
+
493
+ </span>
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+ <span class="summary_desc"><div class='inline'>
504
+ <p>Loads the named configuration config from a yaml file.</p>
505
+ </div></span>
506
+
507
+ </li>
508
+
509
+
510
+ </ul>
511
+
512
+ <h2>
513
+ Instance Method Summary
514
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
515
+ </h2>
516
+
517
+ <ul class="summary">
518
+
519
+ <li class="public ">
520
+ <span class="summary_signature">
521
+
522
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (CaConfig) <strong>initialize</strong>(opts = {}) </a>
523
+
524
+
525
+
526
+ </span>
527
+
528
+
529
+ <span class="note title constructor">constructor</span>
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+ <span class="summary_desc"><div class='inline'>
539
+ <p>OCSP signing delegate that constitutes the chain to attach to an OCSP
540
+ response.</p>
541
+ </div></span>
542
+
543
+ </li>
544
+
545
+
546
+ <li class="public ">
547
+ <span class="summary_signature">
548
+
549
+ <a href="#num_profiles-instance_method" title="#num_profiles (instance method)">- (Integer) <strong>num_profiles</strong> </a>
550
+
551
+
552
+
553
+ </span>
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+ <span class="summary_desc"><div class='inline'>
564
+ <p>The number of profiles.</p>
565
+ </div></span>
566
+
567
+ </li>
568
+
569
+
570
+ <li class="public ">
571
+ <span class="summary_signature">
572
+
573
+ <a href="#ocsp_cert-instance_method" title="#ocsp_cert (instance method)">- (R509::Cert) <strong>ocsp_cert</strong> </a>
574
+
575
+
576
+
577
+ </span>
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+ <span class="summary_desc"><div class='inline'>
588
+ <p>Either a custom OCSP cert or the ca_cert.</p>
589
+ </div></span>
590
+
591
+ </li>
592
+
593
+
594
+ <li class="public ">
595
+ <span class="summary_signature">
596
+
597
+ <a href="#profile-instance_method" title="#profile (instance method)">- (R509::Config::CaProfile) <strong>profile</strong>(prof) </a>
598
+
599
+
600
+
601
+ </span>
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+ <span class="summary_desc"><div class='inline'>
612
+ <p>The config profile.</p>
613
+ </div></span>
614
+
615
+ </li>
616
+
617
+
618
+ <li class="public ">
619
+ <span class="summary_signature">
620
+
621
+ <a href="#set_profile-instance_method" title="#set_profile (instance method)">- (Object) <strong>set_profile</strong>(name, prof) </a>
622
+
623
+
624
+
625
+ </span>
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+ <span class="summary_desc"><div class='inline'></div></span>
636
+
637
+ </li>
638
+
639
+
640
+ </ul>
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="../IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></h3>
653
+ <p class="inherited"><span class='object_link'><a href="../IOHelpers.html#read_data-instance_method" title="R509::IOHelpers#read_data (method)">read_data</a></span>, <span class='object_link'><a href="../IOHelpers.html#read_data-class_method" title="R509::IOHelpers.read_data (method)">read_data</a></span>, <span class='object_link'><a href="../IOHelpers.html#write_data-instance_method" title="R509::IOHelpers#write_data (method)">write_data</a></span>, <span class='object_link'><a href="../IOHelpers.html#write_data-class_method" title="R509::IOHelpers.write_data (method)">write_data</a></span></p>
654
+ <div id="constructor_details" class="method_details_list">
655
+ <h2>Constructor Details</h2>
656
+
657
+ <div class="method_details first">
658
+ <h3 class="signature first" id="initialize-instance_method">
659
+
660
+ - (<tt><span class='object_link'><a href="" title="R509::Config::CaConfig (class)">CaConfig</a></span></tt>) <strong>initialize</strong>(opts = {})
661
+
662
+
663
+
664
+
665
+
666
+ </h3><div class="docstring">
667
+ <div class="discussion">
668
+
669
+ <p>OCSP signing delegate that constitutes the chain to attach to an OCSP
670
+ response</p>
671
+
672
+
673
+ </div>
674
+ </div>
675
+ <div class="tags">
676
+ <p class="tag_title">Parameters:</p>
677
+ <ul class="param">
678
+
679
+ <li>
680
+
681
+ <span class='name'>opts</span>
682
+
683
+
684
+ <span class='type'>(<tt>Hash</tt>)</span>
685
+
686
+
687
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
688
+
689
+
690
+ &mdash;
691
+ <div class='inline'>
692
+ <p>a customizable set of options</p>
693
+ </div>
694
+
695
+ </li>
696
+
697
+ </ul>
698
+
699
+
700
+
701
+
702
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
703
+ <ul class="option">
704
+
705
+ <li>
706
+ <span class="name">:ca_cert</span>
707
+ <span class="type">(<tt><span class='object_link'><a href="../Cert.html" title="R509::Cert (class)">R509::Cert</a></span></tt>)</span>
708
+ <span class="default">
709
+
710
+ </span>
711
+ &mdash; <div class='inline'>
712
+ <p>Cert+Key pair</p>
713
+ </div>
714
+ </li>
715
+
716
+ <li>
717
+ <span class="name">:crl_validity_hours</span>
718
+ <span class="type">(<tt>Integer</tt>)</span>
719
+ <span class="default">
720
+
721
+ &mdash; default:
722
+ <tt>168</tt>
723
+
724
+ </span>
725
+ &mdash; <div class='inline'>
726
+ <p>The number of hours that a CRL will be valid. Defaults to 7 days.</p>
727
+ </div>
728
+ </li>
729
+
730
+ <li>
731
+ <span class="name">:profiles</span>
732
+ <span class="type">(<tt>Hash&lt;String, <span class='object_link'><a href="CaProfile.html" title="R509::Config::CaProfile (class)">R509::Config::CaProfile</a></span>&gt;</tt>)</span>
733
+ <span class="default">
734
+
735
+ </span>
736
+
737
+ </li>
738
+
739
+ <li>
740
+ <span class="name">:message_digest</span>
741
+ <span class="type">(<tt>String</tt>)</span>
742
+ <span class="default">
743
+
744
+ &mdash; default:
745
+ <tt>SHA1</tt>
746
+
747
+ </span>
748
+ &mdash; <div class='inline'>
749
+ <p>The hashing algorithm to use.</p>
750
+ </div>
751
+ </li>
752
+
753
+ <li>
754
+ <span class="name">:cdp_location</span>
755
+ <span class="type">(<tt>String</tt>)</span>
756
+ <span class="default">
757
+
758
+ </span>
759
+
760
+ </li>
761
+
762
+ <li>
763
+ <span class="name">:ocsp_location</span>
764
+ <span class="type">(<tt>String</tt>)</span>
765
+ <span class="default">
766
+
767
+ </span>
768
+
769
+ </li>
770
+
771
+ <li>
772
+ <span class="name">:crl_number_file</span>
773
+ <span class="type">(<tt>String</tt>)</span>
774
+ <span class="default">
775
+
776
+ </span>
777
+ &mdash; <div class='inline'>
778
+ <p>The file that we will save the CRL numbers to. defaults to a StringIO
779
+ object if not provided</p>
780
+ </div>
781
+ </li>
782
+
783
+ <li>
784
+ <span class="name">:crl_list_file</span>
785
+ <span class="type">(<tt>String</tt>)</span>
786
+ <span class="default">
787
+
788
+ </span>
789
+ &mdash; <div class='inline'>
790
+ <p>The file that we will save the CRL list data to. defaults to a StringIO
791
+ object if not provided</p>
792
+ </div>
793
+ </li>
794
+
795
+ <li>
796
+ <span class="name">:ocsp_cert</span>
797
+ <span class="type">(<tt><span class='object_link'><a href="../Cert.html" title="R509::Cert (class)">R509::Cert</a></span></tt>)</span>
798
+ <span class="default">
799
+
800
+ </span>
801
+ &mdash; <div class='inline'>
802
+ <p>An optional cert+key pair</p>
803
+ </div>
804
+ </li>
805
+
806
+ <li>
807
+ <span class="name">:ocsp_chain</span>
808
+ <span class="type">(<tt>Array&lt;OpenSSL::X509::Certificate&gt;</tt>)</span>
809
+ <span class="default">
810
+
811
+ </span>
812
+ &mdash; <div class='inline'>
813
+ <p>An optional array</p>
814
+ </div>
815
+ </li>
816
+
817
+ </ul>
818
+
819
+
820
+
821
+ </div><table class="source_code">
822
+ <tr>
823
+ <td>
824
+ <pre class="lines">
825
+
826
+
827
+ 150
828
+ 151
829
+ 152
830
+ 153
831
+ 154
832
+ 155
833
+ 156
834
+ 157
835
+ 158
836
+ 159
837
+ 160
838
+ 161
839
+ 162
840
+ 163
841
+ 164
842
+ 165
843
+ 166
844
+ 167
845
+ 168
846
+ 169
847
+ 170
848
+ 171
849
+ 172
850
+ 173
851
+ 174
852
+ 175
853
+ 176
854
+ 177
855
+ 178
856
+ 179
857
+ 180
858
+ 181
859
+ 182
860
+ 183
861
+ 184
862
+ 185
863
+ 186
864
+ 187
865
+ 188
866
+ 189
867
+ 190</pre>
868
+ </td>
869
+ <td>
870
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 150</span>
871
+
872
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
873
+ <span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:ca_cert</span><span class='rparen'>)</span> <span class='kw'>then</span>
874
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Config object requires that you pass :ca_cert</span><span class='tstring_end'>'</span></span>
875
+ <span class='kw'>end</span>
876
+
877
+ <span class='ivar'>@ca_cert</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ca_cert</span><span class='rbracket'>]</span>
878
+
879
+ <span class='kw'>if</span> <span class='kw'>not</span> <span class='ivar'>@ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='rparen'>)</span> <span class='kw'>then</span>
880
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:ca_cert must be of type R509::Cert</span><span class='tstring_end'>'</span></span>
881
+ <span class='kw'>end</span>
882
+
883
+ <span class='comment'>#ocsp data
884
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:ocsp_cert</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_cert</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_cert</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
885
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:ocsp_cert, if provided, must be of type R509::Cert</span><span class='tstring_end'>'</span></span>
886
+ <span class='kw'>end</span>
887
+ <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:ocsp_cert</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_cert</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_cert</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_has_private_key?'>has_private_key?</span>
888
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:ocsp_cert must contain a private key, not just a certificate</span><span class='tstring_end'>'</span></span>
889
+ <span class='kw'>end</span>
890
+ <span class='ivar'>@ocsp_cert</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_cert</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_cert</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
891
+ <span class='ivar'>@ocsp_location</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_location</span><span class='rbracket'>]</span>
892
+ <span class='ivar'>@ocsp_chain</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_chain</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_chain</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
893
+ <span class='ivar'>@ocsp_validity_hours</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_validity_hours</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>168</span>
894
+ <span class='ivar'>@ocsp_start_skew_seconds</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ocsp_start_skew_seconds</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>3600</span>
895
+
896
+ <span class='ivar'>@crl_validity_hours</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:crl_validity_hours</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>168</span>
897
+ <span class='ivar'>@crl_start_skew_seconds</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:crl_start_skew_seconds</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>3600</span>
898
+ <span class='ivar'>@crl_number_file</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:crl_number_file</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
899
+ <span class='ivar'>@crl_list_file</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:crl_list_file</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
900
+ <span class='ivar'>@cdp_location</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cdp_location</span><span class='rbracket'>]</span>
901
+ <span class='ivar'>@message_digest</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:message_digest</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>SHA1</span><span class='tstring_end'>&quot;</span></span>
902
+
903
+
904
+
905
+ <span class='ivar'>@profiles</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
906
+ <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:profiles</span><span class='rbracket'>]</span>
907
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:profiles</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_prof'>prof</span><span class='op'>|</span>
908
+ <span class='id identifier rubyid_set_profile'>set_profile</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_prof'>prof</span><span class='rparen'>)</span>
909
+ <span class='kw'>end</span>
910
+ <span class='kw'>end</span>
911
+
912
+ <span class='kw'>end</span></pre>
913
+ </td>
914
+ </tr>
915
+ </table>
916
+ </div>
917
+
918
+ </div>
919
+
920
+ <div id="instance_attr_details" class="attr_details">
921
+ <h2>Instance Attribute Details</h2>
922
+
923
+
924
+ <span id="ca_cert=-instance_method"></span>
925
+ <span id="ca_cert-instance_method"></span>
926
+ <div class="method_details first">
927
+ <h3 class="signature first" id="ca_cert-instance_method">
928
+
929
+ - (<tt>Object</tt>) <strong>ca_cert</strong>
930
+
931
+
932
+
933
+
934
+
935
+ </h3><div class="docstring">
936
+ <div class="discussion">
937
+
938
+ <p>Returns the value of attribute ca_cert</p>
939
+
940
+
941
+ </div>
942
+ </div>
943
+ <div class="tags">
944
+
945
+
946
+ </div><table class="source_code">
947
+ <tr>
948
+ <td>
949
+ <pre class="lines">
950
+
951
+
952
+ 130
953
+ 131
954
+ 132</pre>
955
+ </td>
956
+ <td>
957
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
958
+
959
+ <span class='kw'>def</span> <span class='id identifier rubyid_ca_cert'>ca_cert</span>
960
+ <span class='ivar'>@ca_cert</span>
961
+ <span class='kw'>end</span></pre>
962
+ </td>
963
+ </tr>
964
+ </table>
965
+ </div>
966
+
967
+
968
+ <span id="cdp_location=-instance_method"></span>
969
+ <span id="cdp_location-instance_method"></span>
970
+ <div class="method_details ">
971
+ <h3 class="signature " id="cdp_location-instance_method">
972
+
973
+ - (<tt>Object</tt>) <strong>cdp_location</strong>
974
+
975
+
976
+
977
+
978
+
979
+ </h3><div class="docstring">
980
+ <div class="discussion">
981
+
982
+ <p>Returns the value of attribute cdp_location</p>
983
+
984
+
985
+ </div>
986
+ </div>
987
+ <div class="tags">
988
+
989
+
990
+ </div><table class="source_code">
991
+ <tr>
992
+ <td>
993
+ <pre class="lines">
994
+
995
+
996
+ 130
997
+ 131
998
+ 132</pre>
999
+ </td>
1000
+ <td>
1001
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1002
+
1003
+ <span class='kw'>def</span> <span class='id identifier rubyid_cdp_location'>cdp_location</span>
1004
+ <span class='ivar'>@cdp_location</span>
1005
+ <span class='kw'>end</span></pre>
1006
+ </td>
1007
+ </tr>
1008
+ </table>
1009
+ </div>
1010
+
1011
+
1012
+ <span id="crl_list_file=-instance_method"></span>
1013
+ <span id="crl_list_file-instance_method"></span>
1014
+ <div class="method_details ">
1015
+ <h3 class="signature " id="crl_list_file-instance_method">
1016
+
1017
+ - (<tt>Object</tt>) <strong>crl_list_file</strong>
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+ </h3><div class="docstring">
1024
+ <div class="discussion">
1025
+
1026
+ <p>Returns the value of attribute crl_list_file</p>
1027
+
1028
+
1029
+ </div>
1030
+ </div>
1031
+ <div class="tags">
1032
+
1033
+
1034
+ </div><table class="source_code">
1035
+ <tr>
1036
+ <td>
1037
+ <pre class="lines">
1038
+
1039
+
1040
+ 130
1041
+ 131
1042
+ 132</pre>
1043
+ </td>
1044
+ <td>
1045
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1046
+
1047
+ <span class='kw'>def</span> <span class='id identifier rubyid_crl_list_file'>crl_list_file</span>
1048
+ <span class='ivar'>@crl_list_file</span>
1049
+ <span class='kw'>end</span></pre>
1050
+ </td>
1051
+ </tr>
1052
+ </table>
1053
+ </div>
1054
+
1055
+
1056
+ <span id="crl_number_file=-instance_method"></span>
1057
+ <span id="crl_number_file-instance_method"></span>
1058
+ <div class="method_details ">
1059
+ <h3 class="signature " id="crl_number_file-instance_method">
1060
+
1061
+ - (<tt>Object</tt>) <strong>crl_number_file</strong>
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+ </h3><div class="docstring">
1068
+ <div class="discussion">
1069
+
1070
+ <p>Returns the value of attribute crl_number_file</p>
1071
+
1072
+
1073
+ </div>
1074
+ </div>
1075
+ <div class="tags">
1076
+
1077
+
1078
+ </div><table class="source_code">
1079
+ <tr>
1080
+ <td>
1081
+ <pre class="lines">
1082
+
1083
+
1084
+ 130
1085
+ 131
1086
+ 132</pre>
1087
+ </td>
1088
+ <td>
1089
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1090
+
1091
+ <span class='kw'>def</span> <span class='id identifier rubyid_crl_number_file'>crl_number_file</span>
1092
+ <span class='ivar'>@crl_number_file</span>
1093
+ <span class='kw'>end</span></pre>
1094
+ </td>
1095
+ </tr>
1096
+ </table>
1097
+ </div>
1098
+
1099
+
1100
+ <span id="crl_start_skew_seconds=-instance_method"></span>
1101
+ <span id="crl_start_skew_seconds-instance_method"></span>
1102
+ <div class="method_details ">
1103
+ <h3 class="signature " id="crl_start_skew_seconds-instance_method">
1104
+
1105
+ - (<tt>Object</tt>) <strong>crl_start_skew_seconds</strong>
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+ </h3><div class="docstring">
1112
+ <div class="discussion">
1113
+
1114
+ <p>Returns the value of attribute crl_start_skew_seconds</p>
1115
+
1116
+
1117
+ </div>
1118
+ </div>
1119
+ <div class="tags">
1120
+
1121
+
1122
+ </div><table class="source_code">
1123
+ <tr>
1124
+ <td>
1125
+ <pre class="lines">
1126
+
1127
+
1128
+ 130
1129
+ 131
1130
+ 132</pre>
1131
+ </td>
1132
+ <td>
1133
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1134
+
1135
+ <span class='kw'>def</span> <span class='id identifier rubyid_crl_start_skew_seconds'>crl_start_skew_seconds</span>
1136
+ <span class='ivar'>@crl_start_skew_seconds</span>
1137
+ <span class='kw'>end</span></pre>
1138
+ </td>
1139
+ </tr>
1140
+ </table>
1141
+ </div>
1142
+
1143
+
1144
+ <span id="crl_validity_hours=-instance_method"></span>
1145
+ <span id="crl_validity_hours-instance_method"></span>
1146
+ <div class="method_details ">
1147
+ <h3 class="signature " id="crl_validity_hours-instance_method">
1148
+
1149
+ - (<tt>Object</tt>) <strong>crl_validity_hours</strong>
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+ </h3><div class="docstring">
1156
+ <div class="discussion">
1157
+
1158
+ <p>Returns the value of attribute crl_validity_hours</p>
1159
+
1160
+
1161
+ </div>
1162
+ </div>
1163
+ <div class="tags">
1164
+
1165
+
1166
+ </div><table class="source_code">
1167
+ <tr>
1168
+ <td>
1169
+ <pre class="lines">
1170
+
1171
+
1172
+ 130
1173
+ 131
1174
+ 132</pre>
1175
+ </td>
1176
+ <td>
1177
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1178
+
1179
+ <span class='kw'>def</span> <span class='id identifier rubyid_crl_validity_hours'>crl_validity_hours</span>
1180
+ <span class='ivar'>@crl_validity_hours</span>
1181
+ <span class='kw'>end</span></pre>
1182
+ </td>
1183
+ </tr>
1184
+ </table>
1185
+ </div>
1186
+
1187
+
1188
+ <span id="message_digest=-instance_method"></span>
1189
+ <span id="message_digest-instance_method"></span>
1190
+ <div class="method_details ">
1191
+ <h3 class="signature " id="message_digest-instance_method">
1192
+
1193
+ - (<tt>Object</tt>) <strong>message_digest</strong>
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+ </h3><div class="docstring">
1200
+ <div class="discussion">
1201
+
1202
+ <p>Returns the value of attribute message_digest</p>
1203
+
1204
+
1205
+ </div>
1206
+ </div>
1207
+ <div class="tags">
1208
+
1209
+
1210
+ </div><table class="source_code">
1211
+ <tr>
1212
+ <td>
1213
+ <pre class="lines">
1214
+
1215
+
1216
+ 130
1217
+ 131
1218
+ 132</pre>
1219
+ </td>
1220
+ <td>
1221
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1222
+
1223
+ <span class='kw'>def</span> <span class='id identifier rubyid_message_digest'>message_digest</span>
1224
+ <span class='ivar'>@message_digest</span>
1225
+ <span class='kw'>end</span></pre>
1226
+ </td>
1227
+ </tr>
1228
+ </table>
1229
+ </div>
1230
+
1231
+
1232
+ <span id="ocsp_chain=-instance_method"></span>
1233
+ <span id="ocsp_chain-instance_method"></span>
1234
+ <div class="method_details ">
1235
+ <h3 class="signature " id="ocsp_chain-instance_method">
1236
+
1237
+ - (<tt>Object</tt>) <strong>ocsp_chain</strong>
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+ </h3><div class="docstring">
1244
+ <div class="discussion">
1245
+
1246
+ <p>Returns the value of attribute ocsp_chain</p>
1247
+
1248
+
1249
+ </div>
1250
+ </div>
1251
+ <div class="tags">
1252
+
1253
+
1254
+ </div><table class="source_code">
1255
+ <tr>
1256
+ <td>
1257
+ <pre class="lines">
1258
+
1259
+
1260
+ 130
1261
+ 131
1262
+ 132</pre>
1263
+ </td>
1264
+ <td>
1265
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1266
+
1267
+ <span class='kw'>def</span> <span class='id identifier rubyid_ocsp_chain'>ocsp_chain</span>
1268
+ <span class='ivar'>@ocsp_chain</span>
1269
+ <span class='kw'>end</span></pre>
1270
+ </td>
1271
+ </tr>
1272
+ </table>
1273
+ </div>
1274
+
1275
+
1276
+ <span id="ocsp_location=-instance_method"></span>
1277
+ <span id="ocsp_location-instance_method"></span>
1278
+ <div class="method_details ">
1279
+ <h3 class="signature " id="ocsp_location-instance_method">
1280
+
1281
+ - (<tt>Object</tt>) <strong>ocsp_location</strong>
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+ </h3><div class="docstring">
1288
+ <div class="discussion">
1289
+
1290
+ <p>Returns the value of attribute ocsp_location</p>
1291
+
1292
+
1293
+ </div>
1294
+ </div>
1295
+ <div class="tags">
1296
+
1297
+
1298
+ </div><table class="source_code">
1299
+ <tr>
1300
+ <td>
1301
+ <pre class="lines">
1302
+
1303
+
1304
+ 130
1305
+ 131
1306
+ 132</pre>
1307
+ </td>
1308
+ <td>
1309
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1310
+
1311
+ <span class='kw'>def</span> <span class='id identifier rubyid_ocsp_location'>ocsp_location</span>
1312
+ <span class='ivar'>@ocsp_location</span>
1313
+ <span class='kw'>end</span></pre>
1314
+ </td>
1315
+ </tr>
1316
+ </table>
1317
+ </div>
1318
+
1319
+
1320
+ <span id="ocsp_start_skew_seconds=-instance_method"></span>
1321
+ <span id="ocsp_start_skew_seconds-instance_method"></span>
1322
+ <div class="method_details ">
1323
+ <h3 class="signature " id="ocsp_start_skew_seconds-instance_method">
1324
+
1325
+ - (<tt>Object</tt>) <strong>ocsp_start_skew_seconds</strong>
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+ </h3><div class="docstring">
1332
+ <div class="discussion">
1333
+
1334
+ <p>Returns the value of attribute ocsp_start_skew_seconds</p>
1335
+
1336
+
1337
+ </div>
1338
+ </div>
1339
+ <div class="tags">
1340
+
1341
+
1342
+ </div><table class="source_code">
1343
+ <tr>
1344
+ <td>
1345
+ <pre class="lines">
1346
+
1347
+
1348
+ 130
1349
+ 131
1350
+ 132</pre>
1351
+ </td>
1352
+ <td>
1353
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1354
+
1355
+ <span class='kw'>def</span> <span class='id identifier rubyid_ocsp_start_skew_seconds'>ocsp_start_skew_seconds</span>
1356
+ <span class='ivar'>@ocsp_start_skew_seconds</span>
1357
+ <span class='kw'>end</span></pre>
1358
+ </td>
1359
+ </tr>
1360
+ </table>
1361
+ </div>
1362
+
1363
+
1364
+ <span id="ocsp_validity_hours=-instance_method"></span>
1365
+ <span id="ocsp_validity_hours-instance_method"></span>
1366
+ <div class="method_details ">
1367
+ <h3 class="signature " id="ocsp_validity_hours-instance_method">
1368
+
1369
+ - (<tt>Object</tt>) <strong>ocsp_validity_hours</strong>
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+ </h3><div class="docstring">
1376
+ <div class="discussion">
1377
+
1378
+ <p>Returns the value of attribute ocsp_validity_hours</p>
1379
+
1380
+
1381
+ </div>
1382
+ </div>
1383
+ <div class="tags">
1384
+
1385
+
1386
+ </div><table class="source_code">
1387
+ <tr>
1388
+ <td>
1389
+ <pre class="lines">
1390
+
1391
+
1392
+ 130
1393
+ 131
1394
+ 132</pre>
1395
+ </td>
1396
+ <td>
1397
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 130</span>
1398
+
1399
+ <span class='kw'>def</span> <span class='id identifier rubyid_ocsp_validity_hours'>ocsp_validity_hours</span>
1400
+ <span class='ivar'>@ocsp_validity_hours</span>
1401
+ <span class='kw'>end</span></pre>
1402
+ </td>
1403
+ </tr>
1404
+ </table>
1405
+ </div>
1406
+
1407
+ </div>
1408
+
1409
+
1410
+ <div id="class_method_details" class="method_details_list">
1411
+ <h2>Class Method Details</h2>
1412
+
1413
+
1414
+ <div class="method_details first">
1415
+ <h3 class="signature first" id="from_yaml-class_method">
1416
+
1417
+ + (<tt>Object</tt>) <strong>from_yaml</strong>(conf_name, yaml_data, opts = {})
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+ </h3><div class="docstring">
1424
+ <div class="discussion">
1425
+
1426
+ <p>Loads the named configuration config from a yaml string.</p>
1427
+
1428
+
1429
+ </div>
1430
+ </div>
1431
+ <div class="tags">
1432
+ <p class="tag_title">Parameters:</p>
1433
+ <ul class="param">
1434
+
1435
+ <li>
1436
+
1437
+ <span class='name'>conf_name</span>
1438
+
1439
+
1440
+ <span class='type'>(<tt>String</tt>)</span>
1441
+
1442
+
1443
+
1444
+ &mdash;
1445
+ <div class='inline'>
1446
+ <p>The name of the config within the file. Note that a single yaml file can
1447
+ contain more than one configuration.</p>
1448
+ </div>
1449
+
1450
+ </li>
1451
+
1452
+ <li>
1453
+
1454
+ <span class='name'>yaml_data</span>
1455
+
1456
+
1457
+ <span class='type'>(<tt>String</tt>)</span>
1458
+
1459
+
1460
+
1461
+ &mdash;
1462
+ <div class='inline'>
1463
+ <p>The filename to load yaml config data from.</p>
1464
+ </div>
1465
+
1466
+ </li>
1467
+
1468
+ </ul>
1469
+
1470
+
1471
+ </div><table class="source_code">
1472
+ <tr>
1473
+ <td>
1474
+ <pre class="lines">
1475
+
1476
+
1477
+ 331
1478
+ 332
1479
+ 333
1480
+ 334</pre>
1481
+ </td>
1482
+ <td>
1483
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 331</span>
1484
+
1485
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_yaml'>from_yaml</span><span class='lparen'>(</span><span class='id identifier rubyid_conf_name'>conf_name</span><span class='comma'>,</span> <span class='id identifier rubyid_yaml_data'>yaml_data</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1486
+ <span class='id identifier rubyid_conf'>conf</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_yaml_data'>yaml_data</span><span class='rparen'>)</span>
1487
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_from_hash'>load_from_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='id identifier rubyid_conf_name'>conf_name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
1488
+ <span class='kw'>end</span></pre>
1489
+ </td>
1490
+ </tr>
1491
+ </table>
1492
+ </div>
1493
+
1494
+ <div class="method_details ">
1495
+ <h3 class="signature " id="load_from_hash-class_method">
1496
+
1497
+ + (<tt>Object</tt>) <strong>load_from_hash</strong>(conf, opts = {})
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+ </h3><div class="docstring">
1504
+ <div class="discussion">
1505
+
1506
+ <p>Load the configuration from a data hash. The same type that might be used
1507
+ when loading from a YAML file.</p>
1508
+
1509
+
1510
+ </div>
1511
+ </div>
1512
+ <div class="tags">
1513
+ <p class="tag_title">Parameters:</p>
1514
+ <ul class="param">
1515
+
1516
+ <li>
1517
+
1518
+ <span class='name'>conf</span>
1519
+
1520
+
1521
+ <span class='type'>(<tt>Hash</tt>)</span>
1522
+
1523
+
1524
+
1525
+ &mdash;
1526
+ <div class='inline'>
1527
+ <p>A hash containing all the configuration options</p>
1528
+ </div>
1529
+
1530
+ </li>
1531
+
1532
+ <li>
1533
+
1534
+ <span class='name'>opts</span>
1535
+
1536
+
1537
+ <span class='type'>(<tt>Hash</tt>)</span>
1538
+
1539
+
1540
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1541
+
1542
+
1543
+ &mdash;
1544
+ <div class='inline'>
1545
+ <p>a customizable set of options</p>
1546
+ </div>
1547
+
1548
+ </li>
1549
+
1550
+ </ul>
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1558
+ <ul class="option">
1559
+
1560
+ <li>
1561
+ <span class="name">:ca_root_path</span>
1562
+ <span class="type">(<tt>String</tt>)</span>
1563
+ <span class="default">
1564
+
1565
+ </span>
1566
+ &mdash; <div class='inline'>
1567
+ <p>The root path for the CA. Defaults to the current working directory.</p>
1568
+ </div>
1569
+ </li>
1570
+
1571
+ </ul>
1572
+
1573
+
1574
+
1575
+ </div><table class="source_code">
1576
+ <tr>
1577
+ <td>
1578
+ <pre class="lines">
1579
+
1580
+
1581
+ 228
1582
+ 229
1583
+ 230
1584
+ 231
1585
+ 232
1586
+ 233
1587
+ 234
1588
+ 235
1589
+ 236
1590
+ 237
1591
+ 238
1592
+ 239
1593
+ 240
1594
+ 241
1595
+ 242
1596
+ 243
1597
+ 244
1598
+ 245
1599
+ 246
1600
+ 247
1601
+ 248
1602
+ 249
1603
+ 250
1604
+ 251
1605
+ 252
1606
+ 253
1607
+ 254
1608
+ 255
1609
+ 256
1610
+ 257
1611
+ 258
1612
+ 259
1613
+ 260
1614
+ 261
1615
+ 262
1616
+ 263
1617
+ 264
1618
+ 265
1619
+ 266
1620
+ 267
1621
+ 268
1622
+ 269
1623
+ 270
1624
+ 271
1625
+ 272
1626
+ 273
1627
+ 274
1628
+ 275
1629
+ 276
1630
+ 277
1631
+ 278
1632
+ 279
1633
+ 280
1634
+ 281
1635
+ 282
1636
+ 283
1637
+ 284
1638
+ 285
1639
+ 286
1640
+ 287
1641
+ 288
1642
+ 289
1643
+ 290
1644
+ 291
1645
+ 292
1646
+ 293
1647
+ 294
1648
+ 295
1649
+ 296
1650
+ 297
1651
+ 298
1652
+ 299
1653
+ 300
1654
+ 301
1655
+ 302
1656
+ 303
1657
+ 304
1658
+ 305
1659
+ 306
1660
+ 307
1661
+ 308
1662
+ 309
1663
+ 310
1664
+ 311
1665
+ 312
1666
+ 313
1667
+ 314
1668
+ 315
1669
+ 316</pre>
1670
+ </td>
1671
+ <td>
1672
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 228</span>
1673
+
1674
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_from_hash'>load_from_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_conf'>conf</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1675
+ <span class='kw'>if</span> <span class='id identifier rubyid_conf'>conf</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1676
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>conf not found</span><span class='tstring_end'>&quot;</span></span>
1677
+ <span class='kw'>end</span>
1678
+ <span class='kw'>unless</span> <span class='id identifier rubyid_conf'>conf</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
1679
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>conf must be a Hash</span><span class='tstring_end'>&quot;</span></span>
1680
+ <span class='kw'>end</span>
1681
+
1682
+ <span class='id identifier rubyid_ca_root_path'>ca_root_path</span> <span class='op'>=</span> <span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:ca_root_path</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_getwd'>getwd</span><span class='rparen'>)</span>
1683
+
1684
+ <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span><span class='lparen'>(</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1685
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509Error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ca_root_path is not a directory: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1686
+ <span class='kw'>end</span>
1687
+
1688
+ <span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ca_cert</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
1689
+
1690
+ <span class='kw'>if</span> <span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>engine</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1691
+ <span class='id identifier rubyid_ca_cert'>ca_cert</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_with_engine'>load_with_engine</span><span class='lparen'>(</span><span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span><span class='comma'>,</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1692
+ <span class='kw'>end</span>
1693
+
1694
+ <span class='kw'>if</span> <span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pkcs12</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1695
+ <span class='id identifier rubyid_ca_cert'>ca_cert</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_with_pkcs12'>load_with_pkcs12</span><span class='lparen'>(</span><span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span><span class='comma'>,</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1696
+ <span class='kw'>end</span>
1697
+
1698
+ <span class='kw'>if</span> <span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cert</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1699
+ <span class='id identifier rubyid_ca_cert'>ca_cert</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_with_key'>load_with_key</span><span class='lparen'>(</span><span class='id identifier rubyid_ca_cert_hash'>ca_cert_hash</span><span class='comma'>,</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1700
+ <span class='kw'>end</span>
1701
+
1702
+ <span class='kw'>if</span> <span class='id identifier rubyid_conf'>conf</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1703
+ <span class='kw'>if</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>engine</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1704
+ <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_with_engine'>load_with_engine</span><span class='lparen'>(</span><span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1705
+ <span class='kw'>end</span>
1706
+
1707
+ <span class='kw'>if</span> <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pkcs12</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1708
+ <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_with_pkcs12'>load_with_pkcs12</span><span class='lparen'>(</span><span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1709
+ <span class='kw'>end</span>
1710
+
1711
+ <span class='kw'>if</span> <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cert</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1712
+ <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_with_key'>load_with_key</span><span class='lparen'>(</span><span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_cert</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='rparen'>)</span>
1713
+ <span class='kw'>end</span>
1714
+ <span class='kw'>end</span>
1715
+
1716
+ <span class='id identifier rubyid_ocsp_chain'>ocsp_chain</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1717
+ <span class='kw'>if</span> <span class='id identifier rubyid_conf'>conf</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_chain</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1718
+ <span class='id identifier rubyid_ocsp_chain_data'>ocsp_chain_data</span> <span class='op'>=</span> <span class='id identifier rubyid_read_data'>read_data</span><span class='lparen'>(</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span><span class='op'>+</span><span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ocsp_chain</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
1719
+ <span class='id identifier rubyid_cert_regex'>cert_regex</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>-----BEGIN CERTIFICATE-----.+?-----END CERTIFICATE-----</span><span class='regexp_end'>/m</span></span>
1720
+ <span class='id identifier rubyid_ocsp_chain_data'>ocsp_chain_data</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='id identifier rubyid_cert_regex'>cert_regex</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cert'>cert</span><span class='op'>|</span>
1721
+ <span class='id identifier rubyid_ocsp_chain'>ocsp_chain</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>X509</span><span class='op'>::</span><span class='const'>Certificate</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_cert'>cert</span><span class='rparen'>)</span><span class='rparen'>)</span>
1722
+ <span class='kw'>end</span>
1723
+ <span class='kw'>end</span>
1724
+
1725
+ <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1726
+ <span class='symbol'>:ca_cert</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='comma'>,</span>
1727
+ <span class='symbol'>:ocsp_cert</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span><span class='comma'>,</span>
1728
+ <span class='symbol'>:ocsp_chain</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_ocsp_chain'>ocsp_chain</span><span class='comma'>,</span>
1729
+ <span class='symbol'>:crl_validity_hours</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>crl_validity_hours</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1730
+ <span class='symbol'>:ocsp_validity_hours</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ocsp_validity_hours</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1731
+ <span class='symbol'>:ocsp_start_skew_seconds</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ocsp_start_skew_seconds</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1732
+ <span class='symbol'>:ocsp_location</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ocsp_location</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1733
+ <span class='symbol'>:cdp_location</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cdp_location</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1734
+ <span class='symbol'>:message_digest</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message_digest</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1735
+ <span class='rbrace'>}</span>
1736
+
1737
+ <span class='kw'>if</span> <span class='id identifier rubyid_conf'>conf</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>crl_list</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1738
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:crl_list_file</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span> <span class='op'>+</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>crl_list</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1739
+ <span class='kw'>end</span>
1740
+
1741
+ <span class='kw'>if</span> <span class='id identifier rubyid_conf'>conf</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>crl_number</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1742
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:crl_number_file</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_ca_root_path'>ca_root_path</span> <span class='op'>+</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>crl_number</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
1743
+ <span class='kw'>end</span>
1744
+
1745
+
1746
+ <span class='id identifier rubyid_profs'>profs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1747
+ <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>profiles</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</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_profile'>profile</span><span class='op'>|</span>
1748
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>profiles</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_profile'>profile</span><span class='rbracket'>]</span>
1749
+ <span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>subject_item_policy</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1750
+ <span class='id identifier rubyid_subject_item_policy'>subject_item_policy</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Config</span><span class='op'>::</span><span class='const'>SubjectItemPolicy</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>subject_item_policy</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
1751
+ <span class='kw'>end</span>
1752
+ <span class='id identifier rubyid_profs'>profs</span><span class='lbracket'>[</span><span class='id identifier rubyid_profile'>profile</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Config</span><span class='op'>::</span><span class='const'>CaProfile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:key_usage</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>key_usage</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1753
+ <span class='symbol'>:extended_key_usage</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>extended_key_usage</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1754
+ <span class='symbol'>:basic_constraints</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>basic_constraints</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1755
+ <span class='symbol'>:certificate_policies</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>certificate_policies</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
1756
+ <span class='symbol'>:subject_item_policy</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_subject_item_policy'>subject_item_policy</span><span class='rparen'>)</span>
1757
+ <span class='kw'>end</span> <span class='kw'>unless</span> <span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>profiles</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1758
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:profiles</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_profs'>profs</span>
1759
+
1760
+ <span class='comment'># Create the instance.
1761
+ </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
1762
+ <span class='kw'>end</span></pre>
1763
+ </td>
1764
+ </tr>
1765
+ </table>
1766
+ </div>
1767
+
1768
+ <div class="method_details ">
1769
+ <h3 class="signature " id="load_yaml-class_method">
1770
+
1771
+ + (<tt>Object</tt>) <strong>load_yaml</strong>(conf_name, yaml_file, opts = {})
1772
+
1773
+
1774
+
1775
+
1776
+
1777
+ </h3><div class="docstring">
1778
+ <div class="discussion">
1779
+
1780
+ <p>Loads the named configuration config from a yaml file.</p>
1781
+
1782
+
1783
+ </div>
1784
+ </div>
1785
+ <div class="tags">
1786
+ <p class="tag_title">Parameters:</p>
1787
+ <ul class="param">
1788
+
1789
+ <li>
1790
+
1791
+ <span class='name'>conf_name</span>
1792
+
1793
+
1794
+ <span class='type'>(<tt>String</tt>)</span>
1795
+
1796
+
1797
+
1798
+ &mdash;
1799
+ <div class='inline'>
1800
+ <p>The name of the config within the file. Note that a single yaml file can
1801
+ contain more than one configuration.</p>
1802
+ </div>
1803
+
1804
+ </li>
1805
+
1806
+ <li>
1807
+
1808
+ <span class='name'>yaml_file</span>
1809
+
1810
+
1811
+ <span class='type'>(<tt>String</tt>)</span>
1812
+
1813
+
1814
+
1815
+ &mdash;
1816
+ <div class='inline'>
1817
+ <p>The filename to load yaml config data from.</p>
1818
+ </div>
1819
+
1820
+ </li>
1821
+
1822
+ </ul>
1823
+
1824
+
1825
+ </div><table class="source_code">
1826
+ <tr>
1827
+ <td>
1828
+ <pre class="lines">
1829
+
1830
+
1831
+ 322
1832
+ 323
1833
+ 324
1834
+ 325</pre>
1835
+ </td>
1836
+ <td>
1837
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 322</span>
1838
+
1839
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_yaml'>load_yaml</span><span class='lparen'>(</span><span class='id identifier rubyid_conf_name'>conf_name</span><span class='comma'>,</span> <span class='id identifier rubyid_yaml_file'>yaml_file</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1840
+ <span class='id identifier rubyid_conf'>conf</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span><span class='lparen'>(</span><span class='id identifier rubyid_yaml_file'>yaml_file</span><span class='rparen'>)</span>
1841
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_from_hash'>load_from_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_conf'>conf</span><span class='lbracket'>[</span><span class='id identifier rubyid_conf_name'>conf_name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
1842
+ <span class='kw'>end</span></pre>
1843
+ </td>
1844
+ </tr>
1845
+ </table>
1846
+ </div>
1847
+
1848
+ </div>
1849
+
1850
+ <div id="instance_method_details" class="method_details_list">
1851
+ <h2>Instance Method Details</h2>
1852
+
1853
+
1854
+ <div class="method_details first">
1855
+ <h3 class="signature first" id="num_profiles-instance_method">
1856
+
1857
+ - (<tt>Integer</tt>) <strong>num_profiles</strong>
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+ </h3><div class="docstring">
1864
+ <div class="discussion">
1865
+
1866
+ <p>The number of profiles</p>
1867
+
1868
+
1869
+ </div>
1870
+ </div>
1871
+ <div class="tags">
1872
+
1873
+ <p class="tag_title">Returns:</p>
1874
+ <ul class="return">
1875
+
1876
+ <li>
1877
+
1878
+
1879
+ <span class='type'>(<tt>Integer</tt>)</span>
1880
+
1881
+
1882
+
1883
+ &mdash;
1884
+ <div class='inline'>
1885
+ <p>The number of profiles</p>
1886
+ </div>
1887
+
1888
+ </li>
1889
+
1890
+ </ul>
1891
+
1892
+ </div><table class="source_code">
1893
+ <tr>
1894
+ <td>
1895
+ <pre class="lines">
1896
+
1897
+
1898
+ 216
1899
+ 217
1900
+ 218</pre>
1901
+ </td>
1902
+ <td>
1903
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 216</span>
1904
+
1905
+ <span class='kw'>def</span> <span class='id identifier rubyid_num_profiles'>num_profiles</span>
1906
+ <span class='ivar'>@profiles</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
1907
+ <span class='kw'>end</span></pre>
1908
+ </td>
1909
+ </tr>
1910
+ </table>
1911
+ </div>
1912
+
1913
+ <div class="method_details ">
1914
+ <h3 class="signature " id="ocsp_cert-instance_method">
1915
+
1916
+ - (<tt><span class='object_link'><a href="../Cert.html" title="R509::Cert (class)">R509::Cert</a></span></tt>) <strong>ocsp_cert</strong>
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+ </h3><div class="docstring">
1923
+ <div class="discussion">
1924
+
1925
+ <p>Either a custom OCSP cert or the ca_cert</p>
1926
+
1927
+
1928
+ </div>
1929
+ </div>
1930
+ <div class="tags">
1931
+
1932
+ <p class="tag_title">Returns:</p>
1933
+ <ul class="return">
1934
+
1935
+ <li>
1936
+
1937
+
1938
+ <span class='type'>(<tt><span class='object_link'><a href="../Cert.html" title="R509::Cert (class)">R509::Cert</a></span></tt>)</span>
1939
+
1940
+
1941
+
1942
+ &mdash;
1943
+ <div class='inline'>
1944
+ <p>either a custom OCSP cert or the ca_cert</p>
1945
+ </div>
1946
+
1947
+ </li>
1948
+
1949
+ </ul>
1950
+
1951
+ </div><table class="source_code">
1952
+ <tr>
1953
+ <td>
1954
+ <pre class="lines">
1955
+
1956
+
1957
+ 193
1958
+ 194
1959
+ 195</pre>
1960
+ </td>
1961
+ <td>
1962
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 193</span>
1963
+
1964
+ <span class='kw'>def</span> <span class='id identifier rubyid_ocsp_cert'>ocsp_cert</span>
1965
+ <span class='kw'>if</span> <span class='ivar'>@ocsp_cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span> <span class='ivar'>@ca_cert</span> <span class='kw'>else</span> <span class='ivar'>@ocsp_cert</span> <span class='kw'>end</span>
1966
+ <span class='kw'>end</span></pre>
1967
+ </td>
1968
+ </tr>
1969
+ </table>
1970
+ </div>
1971
+
1972
+ <div class="method_details ">
1973
+ <h3 class="signature " id="profile-instance_method">
1974
+
1975
+ - (<tt><span class='object_link'><a href="CaProfile.html" title="R509::Config::CaProfile (class)">R509::Config::CaProfile</a></span></tt>) <strong>profile</strong>(prof)
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+ </h3><div class="docstring">
1982
+ <div class="discussion">
1983
+
1984
+ <p>The config profile.</p>
1985
+
1986
+
1987
+ </div>
1988
+ </div>
1989
+ <div class="tags">
1990
+ <p class="tag_title">Parameters:</p>
1991
+ <ul class="param">
1992
+
1993
+ <li>
1994
+
1995
+ <span class='name'>prof</span>
1996
+
1997
+
1998
+ <span class='type'>(<tt>String</tt>)</span>
1999
+
2000
+
2001
+
2002
+ </li>
2003
+
2004
+ </ul>
2005
+
2006
+ <p class="tag_title">Returns:</p>
2007
+ <ul class="return">
2008
+
2009
+ <li>
2010
+
2011
+
2012
+ <span class='type'>(<tt><span class='object_link'><a href="CaProfile.html" title="R509::Config::CaProfile (class)">R509::Config::CaProfile</a></span></tt>)</span>
2013
+
2014
+
2015
+
2016
+ &mdash;
2017
+ <div class='inline'>
2018
+ <p>The config profile.</p>
2019
+ </div>
2020
+
2021
+ </li>
2022
+
2023
+ </ul>
2024
+
2025
+ </div><table class="source_code">
2026
+ <tr>
2027
+ <td>
2028
+ <pre class="lines">
2029
+
2030
+
2031
+ 208
2032
+ 209
2033
+ 210
2034
+ 211
2035
+ 212
2036
+ 213</pre>
2037
+ </td>
2038
+ <td>
2039
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 208</span>
2040
+
2041
+ <span class='kw'>def</span> <span class='id identifier rubyid_profile'>profile</span><span class='lparen'>(</span><span class='id identifier rubyid_prof'>prof</span><span class='rparen'>)</span>
2042
+ <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@profiles</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_prof'>prof</span><span class='rparen'>)</span>
2043
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>R509Error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>unknown profile '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_prof'>prof</span><span class='rbrace'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>&quot;</span></span>
2044
+ <span class='kw'>end</span>
2045
+ <span class='ivar'>@profiles</span><span class='lbracket'>[</span><span class='id identifier rubyid_prof'>prof</span><span class='rbracket'>]</span>
2046
+ <span class='kw'>end</span></pre>
2047
+ </td>
2048
+ </tr>
2049
+ </table>
2050
+ </div>
2051
+
2052
+ <div class="method_details ">
2053
+ <h3 class="signature " id="set_profile-instance_method">
2054
+
2055
+ - (<tt>Object</tt>) <strong>set_profile</strong>(name, prof)
2056
+
2057
+
2058
+
2059
+
2060
+
2061
+ </h3><div class="docstring">
2062
+ <div class="discussion">
2063
+
2064
+
2065
+ </div>
2066
+ </div>
2067
+ <div class="tags">
2068
+ <p class="tag_title">Parameters:</p>
2069
+ <ul class="param">
2070
+
2071
+ <li>
2072
+
2073
+ <span class='name'>name</span>
2074
+
2075
+
2076
+ <span class='type'>(<tt>String</tt>)</span>
2077
+
2078
+
2079
+
2080
+ &mdash;
2081
+ <div class='inline'>
2082
+ <p>The name of the profile</p>
2083
+ </div>
2084
+
2085
+ </li>
2086
+
2087
+ <li>
2088
+
2089
+ <span class='name'>prof</span>
2090
+
2091
+
2092
+ <span class='type'>(<tt><span class='object_link'><a href="CaProfile.html" title="R509::Config::CaProfile (class)">R509::Config::CaProfile</a></span></tt>)</span>
2093
+
2094
+
2095
+
2096
+ &mdash;
2097
+ <div class='inline'>
2098
+ <p>The profile configuration</p>
2099
+ </div>
2100
+
2101
+ </li>
2102
+
2103
+ </ul>
2104
+
2105
+
2106
+ </div><table class="source_code">
2107
+ <tr>
2108
+ <td>
2109
+ <pre class="lines">
2110
+
2111
+
2112
+ 199
2113
+ 200
2114
+ 201
2115
+ 202
2116
+ 203
2117
+ 204</pre>
2118
+ </td>
2119
+ <td>
2120
+ <pre class="code"><span class="info file"># File 'lib/r509/config.rb', line 199</span>
2121
+
2122
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_profile'>set_profile</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_prof'>prof</span><span class='rparen'>)</span>
2123
+ <span class='kw'>unless</span> <span class='id identifier rubyid_prof'>prof</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Config</span><span class='op'>::</span><span class='const'>CaProfile</span><span class='rparen'>)</span>
2124
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>TypeError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>profile is supposed to be a R509::Config::CaProfile</span><span class='tstring_end'>&quot;</span></span>
2125
+ <span class='kw'>end</span>
2126
+ <span class='ivar'>@profiles</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_prof'>prof</span>
2127
+ <span class='kw'>end</span></pre>
2128
+ </td>
2129
+ </tr>
2130
+ </table>
2131
+ </div>
2132
+
2133
+ </div>
2134
+
2135
+ </div>
2136
+
2137
+ <div id="footer">
2138
+ Generated on Tue Oct 23 22:48:02 2012 by
2139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2140
+ 0.8.0 (ruby-1.9.3).
2141
+ </div>
2142
+
2143
+ </body>
2144
+ </html>