r509 0.8.1 → 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +343 -151
- data/Rakefile +26 -23
- data/bin/r509 +126 -112
- data/bin/r509-parse +24 -24
- data/doc/R509.html +169 -7
- data/doc/R509/ASN1.html +370 -0
- data/doc/R509/ASN1/GeneralName.html +1121 -0
- data/doc/R509/ASN1/GeneralNames.html +843 -0
- data/doc/R509/ASN1/NoticeReference.html +392 -0
- data/doc/R509/ASN1/PolicyInformation.html +387 -0
- data/doc/R509/ASN1/PolicyQualifiers.html +455 -0
- data/doc/R509/ASN1/UserNotice.html +386 -0
- data/doc/R509/{Crl.html → CRL.html} +7 -7
- data/doc/R509/CRL/Administrator.html +1559 -0
- data/doc/R509/{Crl/Parser.html → CRL/SignedList.html} +501 -210
- data/doc/R509/{Csr.html → CSR.html} +444 -314
- data/doc/R509/Cert.html +866 -617
- data/doc/R509/Cert/Extensions.html +52 -41
- data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +70 -35
- data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +387 -4
- data/doc/R509/Cert/Extensions/BasicConstraints.html +61 -25
- data/doc/R509/Cert/Extensions/CRLDistributionPoints.html +354 -0
- data/doc/R509/Cert/Extensions/CertificatePolicies.html +340 -0
- data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +440 -49
- data/doc/R509/Cert/Extensions/{CrlDistributionPoints.html → InhibitAnyPolicy.html} +52 -35
- data/doc/R509/Cert/Extensions/KeyUsage.html +247 -121
- data/doc/R509/Cert/Extensions/NameConstraints.html +445 -0
- data/doc/R509/Cert/Extensions/OCSPNoCheck.html +239 -0
- data/doc/R509/Cert/Extensions/PolicyConstraints.html +424 -0
- data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +437 -62
- data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +52 -10
- data/doc/R509/CertificateAuthority.html +4 -4
- data/doc/R509/CertificateAuthority/Signer.html +154 -187
- data/doc/R509/Config.html +6 -6
- data/doc/R509/Config/{CaConfig.html → CAConfig.html} +451 -348
- data/doc/R509/Config/{CaConfigPool.html → CAConfigPool.html} +47 -47
- data/doc/R509/Config/CAProfile.html +1015 -0
- data/doc/R509/Config/SubjectItemPolicy.html +86 -86
- data/doc/R509/IOHelpers.html +22 -22
- data/doc/R509/MessageDigest.html +14 -14
- data/doc/R509/NameSanitizer.html +53 -53
- data/doc/R509/{Ocsp.html → OCSP.html} +9 -9
- data/doc/R509/{Ocsp → OCSP}/Request.html +7 -7
- data/doc/R509/{Ocsp → OCSP}/Request/Nonce.html +56 -11
- data/doc/R509/{Ocsp → OCSP}/Response.html +44 -44
- data/doc/R509/{OidMapper.html → OIDMapper.html} +23 -39
- data/doc/R509/PrivateKey.html +415 -168
- data/doc/R509/R509Error.html +3 -3
- data/doc/R509/{Spki.html → SPKI.html} +354 -192
- data/doc/R509/Subject.html +224 -113
- data/doc/R509/Validity.html +27 -5
- data/doc/R509/Validity/Checker.html +13 -13
- data/doc/R509/Validity/DefaultChecker.html +13 -13
- data/doc/R509/Validity/DefaultWriter.html +14 -14
- data/doc/R509/Validity/Status.html +39 -39
- data/doc/R509/Validity/Writer.html +18 -18
- data/doc/_index.html +138 -35
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +10 -0
- data/doc/file.README.html +368 -171
- data/doc/file.r509.html +92 -69
- data/doc/frames.html +1 -1
- data/doc/index.html +368 -171
- data/doc/method_list.html +910 -390
- data/doc/top-level-namespace.html +3 -3
- data/lib/r509.rb +32 -16
- data/lib/r509/asn1.rb +375 -0
- data/lib/r509/cert.rb +381 -364
- data/lib/r509/cert/extensions.rb +443 -76
- data/lib/r509/certificate_authority.rb +407 -0
- data/lib/r509/config.rb +547 -351
- data/lib/r509/crl.rb +336 -366
- data/lib/r509/csr.rb +278 -289
- data/lib/r509/ec-hack.rb +37 -0
- data/lib/r509/exceptions.rb +3 -3
- data/lib/r509/io_helpers.rb +44 -44
- data/lib/r509/message_digest.rb +53 -0
- data/lib/r509/ocsp.rb +80 -70
- data/lib/r509/oid_mapper.rb +32 -0
- data/lib/r509/private_key.rb +228 -0
- data/lib/r509/spki.rb +145 -93
- data/lib/r509/subject.rb +203 -110
- data/lib/r509/validity.rb +70 -68
- data/lib/r509/version.rb +2 -2
- data/r509.yaml +92 -69
- data/spec/asn1_spec.rb +402 -0
- data/spec/cert/extensions_spec.rb +957 -494
- data/spec/cert_spec.rb +382 -307
- data/spec/certificate_authority_spec.rb +668 -250
- data/spec/config_spec.rb +515 -302
- data/spec/crl_spec.rb +197 -198
- data/spec/csr_spec.rb +334 -289
- data/spec/fixtures.rb +247 -171
- data/spec/fixtures/cert1.der +0 -0
- data/spec/fixtures/cert1.pem +0 -0
- data/spec/fixtures/cert1_public_key_modulus.txt +0 -0
- data/spec/fixtures/cert3.p12 +0 -0
- data/spec/fixtures/cert3.pem +0 -0
- data/spec/fixtures/cert3_key.pem +0 -0
- data/spec/fixtures/cert3_key_des3.pem +0 -0
- data/spec/fixtures/cert4.pem +0 -0
- data/spec/fixtures/cert5.pem +0 -0
- data/spec/fixtures/cert6.pem +0 -0
- data/spec/fixtures/cert_expired.pem +0 -0
- data/spec/fixtures/cert_inhibit.pem +24 -0
- data/spec/fixtures/cert_name_constraints.pem +29 -0
- data/spec/fixtures/cert_not_yet_valid.pem +0 -0
- data/spec/fixtures/cert_ocsp_no_check.pem +18 -0
- data/spec/fixtures/cert_policy_constraints.pem +31 -0
- data/spec/fixtures/cert_san.pem +0 -0
- data/spec/fixtures/cert_san2.pem +0 -0
- data/spec/fixtures/cert_unknown_extension.pem +28 -0
- data/spec/fixtures/config_pool_test_minimal.yaml +11 -11
- data/spec/fixtures/config_test.yaml +54 -36
- data/spec/fixtures/config_test_dsa.yaml +35 -0
- data/spec/fixtures/config_test_ec.yaml +35 -0
- data/spec/fixtures/config_test_engine_key.yaml +5 -5
- data/spec/fixtures/config_test_engine_no_key_name.yaml +4 -4
- data/spec/fixtures/config_test_minimal.yaml +4 -4
- data/spec/fixtures/config_test_password.yaml +5 -5
- data/spec/fixtures/config_test_various.yaml +111 -74
- data/spec/fixtures/crl_list_file.txt +0 -0
- data/spec/fixtures/crl_with_reason.pem +0 -0
- data/spec/fixtures/csr1.der +0 -0
- data/spec/fixtures/csr1.pem +0 -0
- data/spec/fixtures/csr1_key.der +0 -0
- data/spec/fixtures/csr1_key.pem +0 -0
- data/spec/fixtures/csr1_key_encrypted_des3.pem +0 -0
- data/spec/fixtures/csr1_newlines.pem +0 -0
- data/spec/fixtures/csr1_no_begin_end.pem +0 -0
- data/spec/fixtures/csr1_public_key_modulus.txt +0 -0
- data/spec/fixtures/csr2.pem +0 -0
- data/spec/fixtures/csr2_key.pem +0 -0
- data/spec/fixtures/csr3.pem +0 -0
- data/spec/fixtures/csr4.pem +0 -0
- data/spec/fixtures/csr_dsa.pem +0 -0
- data/spec/fixtures/csr_invalid_signature.pem +0 -0
- data/spec/fixtures/dsa_key.pem +0 -0
- data/spec/fixtures/dsa_root.cer +28 -0
- data/spec/fixtures/dsa_root.key +20 -0
- data/spec/fixtures/ec_csr2.der +0 -0
- data/spec/fixtures/ec_csr2.pem +8 -0
- data/spec/fixtures/ec_key1.der +0 -0
- data/spec/fixtures/ec_key1.pem +6 -0
- data/spec/fixtures/ec_key1_encrypted.pem +9 -0
- data/spec/fixtures/ec_key2.pem +6 -0
- data/spec/fixtures/hmacsha1.sig +1 -0
- data/spec/fixtures/hmacsha512.sig +1 -0
- data/spec/fixtures/key4.pem +0 -0
- data/spec/fixtures/key4_encrypted_des3.pem +0 -0
- data/spec/fixtures/missing_key_identifier_ca.cer +0 -0
- data/spec/fixtures/missing_key_identifier_ca.key +0 -0
- data/spec/fixtures/ocsptest.r509.local.pem +0 -0
- data/spec/fixtures/ocsptest.r509.local_ocsp_request.der +0 -0
- data/spec/fixtures/ocsptest2.r509.local.pem +0 -0
- data/spec/fixtures/second_ca.cer +0 -0
- data/spec/fixtures/second_ca.key +0 -0
- data/spec/fixtures/spkac.der +0 -0
- data/spec/fixtures/spkac.txt +0 -0
- data/spec/fixtures/spkac_dsa.txt +1 -1
- data/spec/fixtures/spkac_dsa_no_verify.txt +1 -0
- data/spec/fixtures/spkac_ec.txt +1 -0
- data/spec/fixtures/spkac_rsa_newlines.txt +13 -0
- data/spec/fixtures/stca.pem +0 -0
- data/spec/fixtures/stca_ocsp_request.der +0 -0
- data/spec/fixtures/stca_ocsp_response.der +0 -0
- data/spec/fixtures/test1.csr +0 -0
- data/spec/fixtures/test_ca.cer +0 -0
- data/spec/fixtures/test_ca.key +0 -0
- data/spec/fixtures/test_ca.p12 +0 -0
- data/spec/fixtures/test_ca_des3.key +0 -0
- data/spec/fixtures/test_ca_ec.cer +14 -0
- data/spec/fixtures/test_ca_ec.key +6 -0
- data/spec/fixtures/test_ca_ec_ee.cer +22 -0
- data/spec/fixtures/test_ca_ec_ee.key +6 -0
- data/spec/fixtures/test_ca_ocsp.cer +0 -0
- data/spec/fixtures/test_ca_ocsp.key +0 -0
- data/spec/fixtures/test_ca_ocsp.p12 +0 -0
- data/spec/fixtures/test_ca_ocsp_chain.txt +0 -0
- data/spec/fixtures/test_ca_ocsp_response.der +0 -0
- data/spec/fixtures/test_ca_subroot.cer +0 -0
- data/spec/fixtures/test_ca_subroot.key +0 -0
- data/spec/fixtures/test_ca_subroot_ocsp.cer +0 -0
- data/spec/fixtures/test_ca_subroot_ocsp.key +0 -0
- data/spec/fixtures/test_ca_subroot_ocsp_response.der +0 -0
- data/spec/fixtures/unknown_oid.csr +0 -0
- data/spec/message_digest_spec.rb +104 -84
- data/spec/ocsp_spec.rb +105 -105
- data/spec/oid_mapper_spec.rb +21 -21
- data/spec/private_key_spec.rb +275 -0
- data/spec/r509_spec.rb +35 -0
- data/spec/spec_helper.rb +15 -6
- data/spec/spki_spec.rb +221 -142
- data/spec/subject_spec.rb +232 -164
- data/spec/validity_spec.rb +91 -91
- metadata +79 -25
- data/doc/R509/Config/CaProfile.html +0 -651
- data/doc/R509/Crl/Administrator.html +0 -2073
- data/lib/r509/certificateauthority.rb +0 -290
- data/lib/r509/messagedigest.rb +0 -49
- data/lib/r509/oidmapper.rb +0 -32
- data/lib/r509/privatekey.rb +0 -185
- data/spec/privatekey_spec.rb +0 -198
@@ -0,0 +1,386 @@
|
|
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::ASN1::UserNotice
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.5
|
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 (U)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../ASN1.html" title="R509::ASN1 (module)">ASN1</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">UserNotice</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::ASN1::UserNotice
|
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::ASN1::UserNotice</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/r509/asn1.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>UserNotice ::= SEQUENCE {</p>
|
106
|
+
|
107
|
+
<pre class="code ruby"><code class="ruby">noticeRef NoticeReference OPTIONAL,
|
108
|
+
explicitText DisplayText OPTIONAL }</code></pre>
|
109
|
+
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
<div class="tags">
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
121
|
+
<ul class="summary">
|
122
|
+
|
123
|
+
<li class="public ">
|
124
|
+
<span class="summary_signature">
|
125
|
+
|
126
|
+
<a href="#explicit_text-instance_method" title="#explicit_text (instance method)">- (Object) <strong>explicit_text</strong> </a>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
</span>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<span class="note title readonly">readonly</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>Returns the value of attribute explicit_text.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#notice_reference-instance_method" title="#notice_reference (instance method)">- (Object) <strong>notice_reference</strong> </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="note title readonly">readonly</span>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<span class="summary_desc"><div class='inline'>
|
175
|
+
<p>Returns the value of attribute notice_reference.</p>
|
176
|
+
</div></span>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
|
181
|
+
</ul>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<h2>
|
188
|
+
Instance Method Summary
|
189
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
190
|
+
</h2>
|
191
|
+
|
192
|
+
<ul class="summary">
|
193
|
+
|
194
|
+
<li class="public ">
|
195
|
+
<span class="summary_signature">
|
196
|
+
|
197
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (UserNotice) <strong>initialize</strong>(data) </a>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</span>
|
202
|
+
|
203
|
+
|
204
|
+
<span class="note title constructor">constructor</span>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>A new instance of UserNotice.</p>
|
215
|
+
</div></span>
|
216
|
+
|
217
|
+
</li>
|
218
|
+
|
219
|
+
|
220
|
+
</ul>
|
221
|
+
|
222
|
+
|
223
|
+
<div id="constructor_details" class="method_details_list">
|
224
|
+
<h2>Constructor Details</h2>
|
225
|
+
|
226
|
+
<div class="method_details first">
|
227
|
+
<h3 class="signature first" id="initialize-instance_method">
|
228
|
+
|
229
|
+
- (<tt><span class='object_link'><a href="" title="R509::ASN1::UserNotice (class)">UserNotice</a></span></tt>) <strong>initialize</strong>(data)
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
</h3><div class="docstring">
|
236
|
+
<div class="discussion">
|
237
|
+
|
238
|
+
<p>A new instance of UserNotice</p>
|
239
|
+
|
240
|
+
|
241
|
+
</div>
|
242
|
+
</div>
|
243
|
+
<div class="tags">
|
244
|
+
|
245
|
+
|
246
|
+
</div><table class="source_code">
|
247
|
+
<tr>
|
248
|
+
<td>
|
249
|
+
<pre class="lines">
|
250
|
+
|
251
|
+
|
252
|
+
340
|
253
|
+
341
|
254
|
+
342
|
255
|
+
343
|
256
|
+
344
|
257
|
+
345
|
258
|
+
346
|
259
|
+
347
|
260
|
+
348
|
261
|
+
349
|
262
|
+
350</pre>
|
263
|
+
</td>
|
264
|
+
<td>
|
265
|
+
<pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 340</span>
|
266
|
+
|
267
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
268
|
+
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_qualifier'>qualifier</span><span class='op'>|</span>
|
269
|
+
<span class='comment'>#if we find another sequence, that's a noticeReference, otherwise it's explicitText
|
270
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_qualifier'>qualifier</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='rparen'>)</span>
|
271
|
+
<span class='ivar'>@notice_reference</span> <span class='op'>=</span> <span class='const'>NoticeReference</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_qualifier'>qualifier</span><span class='rparen'>)</span>
|
272
|
+
<span class='kw'>else</span>
|
273
|
+
<span class='ivar'>@explicit_text</span> <span class='op'>=</span> <span class='id identifier rubyid_qualifier'>qualifier</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
274
|
+
<span class='kw'>end</span>
|
275
|
+
|
276
|
+
<span class='kw'>end</span> <span class='kw'>if</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:each</span><span class='rparen'>)</span>
|
277
|
+
<span class='kw'>end</span></pre>
|
278
|
+
</td>
|
279
|
+
</tr>
|
280
|
+
</table>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div id="instance_attr_details" class="attr_details">
|
286
|
+
<h2>Instance Attribute Details</h2>
|
287
|
+
|
288
|
+
|
289
|
+
<span id=""></span>
|
290
|
+
<div class="method_details first">
|
291
|
+
<h3 class="signature first" id="explicit_text-instance_method">
|
292
|
+
|
293
|
+
- (<tt>Object</tt>) <strong>explicit_text</strong> <span class="extras">(readonly)</span>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
</h3><div class="docstring">
|
300
|
+
<div class="discussion">
|
301
|
+
|
302
|
+
<p>Returns the value of attribute explicit_text</p>
|
303
|
+
|
304
|
+
|
305
|
+
</div>
|
306
|
+
</div>
|
307
|
+
<div class="tags">
|
308
|
+
|
309
|
+
|
310
|
+
</div><table class="source_code">
|
311
|
+
<tr>
|
312
|
+
<td>
|
313
|
+
<pre class="lines">
|
314
|
+
|
315
|
+
|
316
|
+
339
|
317
|
+
340
|
318
|
+
341</pre>
|
319
|
+
</td>
|
320
|
+
<td>
|
321
|
+
<pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 339</span>
|
322
|
+
|
323
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_explicit_text'>explicit_text</span>
|
324
|
+
<span class='ivar'>@explicit_text</span>
|
325
|
+
<span class='kw'>end</span></pre>
|
326
|
+
</td>
|
327
|
+
</tr>
|
328
|
+
</table>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
|
332
|
+
<span id=""></span>
|
333
|
+
<div class="method_details ">
|
334
|
+
<h3 class="signature " id="notice_reference-instance_method">
|
335
|
+
|
336
|
+
- (<tt>Object</tt>) <strong>notice_reference</strong> <span class="extras">(readonly)</span>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</h3><div class="docstring">
|
343
|
+
<div class="discussion">
|
344
|
+
|
345
|
+
<p>Returns the value of attribute notice_reference</p>
|
346
|
+
|
347
|
+
|
348
|
+
</div>
|
349
|
+
</div>
|
350
|
+
<div class="tags">
|
351
|
+
|
352
|
+
|
353
|
+
</div><table class="source_code">
|
354
|
+
<tr>
|
355
|
+
<td>
|
356
|
+
<pre class="lines">
|
357
|
+
|
358
|
+
|
359
|
+
339
|
360
|
+
340
|
361
|
+
341</pre>
|
362
|
+
</td>
|
363
|
+
<td>
|
364
|
+
<pre class="code"><span class="info file"># File 'lib/r509/asn1.rb', line 339</span>
|
365
|
+
|
366
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_notice_reference'>notice_reference</span>
|
367
|
+
<span class='ivar'>@notice_reference</span>
|
368
|
+
<span class='kw'>end</span></pre>
|
369
|
+
</td>
|
370
|
+
</tr>
|
371
|
+
</table>
|
372
|
+
</div>
|
373
|
+
|
374
|
+
</div>
|
375
|
+
|
376
|
+
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div id="footer">
|
380
|
+
Generated on Tue Apr 16 10:49:56 2013 by
|
381
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
382
|
+
0.8.5 (ruby-1.9.3).
|
383
|
+
</div>
|
384
|
+
|
385
|
+
</body>
|
386
|
+
</html>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: R509::
|
7
|
+
Module: R509::CRL
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<a href="../_index.html">Index (C)</a> »
|
35
35
|
<span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">CRL</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: R509::
|
66
|
+
<div id="content"><h1>Module: R509::CRL
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -101,7 +101,7 @@
|
|
101
101
|
|
102
102
|
|
103
103
|
|
104
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="
|
104
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="CRL/Administrator.html" title="R509::CRL::Administrator (class)">Administrator</a></span>, <span class='object_link'><a href="CRL/SignedList.html" title="R509::CRL::SignedList (class)">SignedList</a></span>
|
105
105
|
|
106
106
|
|
107
107
|
</p>
|
@@ -117,9 +117,9 @@
|
|
117
117
|
</div>
|
118
118
|
|
119
119
|
<div id="footer">
|
120
|
-
Generated on
|
120
|
+
Generated on Tue Apr 16 10:49:55 2013 by
|
121
121
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
122
|
-
0.8.
|
122
|
+
0.8.5 (ruby-1.9.3).
|
123
123
|
</div>
|
124
124
|
|
125
125
|
</body>
|
@@ -0,0 +1,1559 @@
|
|
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::CRL::Administrator
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.5
|
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 (A)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../CRL.html" title="R509::CRL (module)">CRL</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Administrator</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::CRL::Administrator
|
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::CRL::Administrator</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2"><span class='object_link'><a href="../IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></dd>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r1 last">Defined in:</dt>
|
101
|
+
<dd class="r1 last">lib/r509/crl.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>Used to manage revocations and generate CRLs</p>
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
<div class="tags">
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
122
|
+
<ul class="summary">
|
123
|
+
|
124
|
+
<li class="public ">
|
125
|
+
<span class="summary_signature">
|
126
|
+
|
127
|
+
<a href="#crl-instance_method" title="#crl (instance method)">- (Object) <strong>crl</strong> </a>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
</span>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<span class="note title readonly">readonly</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'>
|
147
|
+
<p>Returns the value of attribute crl.</p>
|
148
|
+
</div></span>
|
149
|
+
|
150
|
+
</li>
|
151
|
+
|
152
|
+
|
153
|
+
<li class="public ">
|
154
|
+
<span class="summary_signature">
|
155
|
+
|
156
|
+
<a href="#crl_list_file-instance_method" title="#crl_list_file (instance method)">- (Object) <strong>crl_list_file</strong> </a>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
</span>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<span class="note title readonly">readonly</span>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
<span class="summary_desc"><div class='inline'>
|
176
|
+
<p>Returns the value of attribute crl_list_file.</p>
|
177
|
+
</div></span>
|
178
|
+
|
179
|
+
</li>
|
180
|
+
|
181
|
+
|
182
|
+
<li class="public ">
|
183
|
+
<span class="summary_signature">
|
184
|
+
|
185
|
+
<a href="#crl_number-instance_method" title="#crl_number (instance method)">- (Object) <strong>crl_number</strong> </a>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
</span>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<span class="note title readonly">readonly</span>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<span class="summary_desc"><div class='inline'>
|
205
|
+
<p>Returns the value of attribute crl_number.</p>
|
206
|
+
</div></span>
|
207
|
+
|
208
|
+
</li>
|
209
|
+
|
210
|
+
|
211
|
+
<li class="public ">
|
212
|
+
<span class="summary_signature">
|
213
|
+
|
214
|
+
<a href="#crl_number_file-instance_method" title="#crl_number_file (instance method)">- (Object) <strong>crl_number_file</strong> </a>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
</span>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<span class="note title readonly">readonly</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
234
|
+
<p>Returns the value of attribute crl_number_file.</p>
|
235
|
+
</div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#validity_hours-instance_method" title="#validity_hours (instance method)">- (Object) <strong>validity_hours</strong> </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<span class="note title readonly">readonly</span>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
<span class="summary_desc"><div class='inline'>
|
263
|
+
<p>Returns the value of attribute validity_hours.</p>
|
264
|
+
</div></span>
|
265
|
+
|
266
|
+
</li>
|
267
|
+
|
268
|
+
|
269
|
+
</ul>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<h2>
|
276
|
+
Instance Method Summary
|
277
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
278
|
+
</h2>
|
279
|
+
|
280
|
+
<ul class="summary">
|
281
|
+
|
282
|
+
<li class="public ">
|
283
|
+
<span class="summary_signature">
|
284
|
+
|
285
|
+
<a href="#generate_crl-instance_method" title="#generate_crl (instance method)">- (String) <strong>generate_crl</strong> </a>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
<span class="summary_desc"><div class='inline'>
|
300
|
+
<p>Remove serial from revocation list.</p>
|
301
|
+
</div></span>
|
302
|
+
|
303
|
+
</li>
|
304
|
+
|
305
|
+
|
306
|
+
<li class="public ">
|
307
|
+
<span class="summary_signature">
|
308
|
+
|
309
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Administrator) <strong>initialize</strong>(config) </a>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</span>
|
314
|
+
|
315
|
+
|
316
|
+
<span class="note title constructor">constructor</span>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
<span class="summary_desc"><div class='inline'>
|
326
|
+
<p>A new instance of Administrator.</p>
|
327
|
+
</div></span>
|
328
|
+
|
329
|
+
</li>
|
330
|
+
|
331
|
+
|
332
|
+
<li class="public ">
|
333
|
+
<span class="summary_signature">
|
334
|
+
|
335
|
+
<a href="#revoke_cert-instance_method" title="#revoke_cert (instance method)">- (Object) <strong>revoke_cert</strong>(serial, reason = nil, revoke_time = Time.now.to_i, generate_and_save = true) </a>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
</span>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
<span class="summary_desc"><div class='inline'>
|
350
|
+
<p>Adds a certificate to the revocation list.</p>
|
351
|
+
</div></span>
|
352
|
+
|
353
|
+
</li>
|
354
|
+
|
355
|
+
|
356
|
+
<li class="public ">
|
357
|
+
<span class="summary_signature">
|
358
|
+
|
359
|
+
<a href="#revoked%3F-instance_method" title="#revoked? (instance method)">- (Boolean) <strong>revoked?</strong>(serial) </a>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
</span>
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
<span class="summary_desc"><div class='inline'>
|
374
|
+
<p>Indicates whether the serial number has been revoked, or not.</p>
|
375
|
+
</div></span>
|
376
|
+
|
377
|
+
</li>
|
378
|
+
|
379
|
+
|
380
|
+
<li class="public ">
|
381
|
+
<span class="summary_signature">
|
382
|
+
|
383
|
+
<a href="#revoked_cert-instance_method" title="#revoked_cert (instance method)">- (Array) <strong>revoked_cert</strong>(serial) </a>
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
</span>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
<span class="summary_desc"><div class='inline'>
|
398
|
+
<p>Serial, reason, revoke_time tuple.</p>
|
399
|
+
</div></span>
|
400
|
+
|
401
|
+
</li>
|
402
|
+
|
403
|
+
|
404
|
+
<li class="public ">
|
405
|
+
<span class="summary_signature">
|
406
|
+
|
407
|
+
<a href="#revoked_certs-instance_method" title="#revoked_certs (instance method)">- (Array<Array>) <strong>revoked_certs</strong> </a>
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
</span>
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
<span class="summary_desc"><div class='inline'>
|
422
|
+
<p>Returns an array of serial, reason, revoke_time tuples.</p>
|
423
|
+
</div></span>
|
424
|
+
|
425
|
+
</li>
|
426
|
+
|
427
|
+
|
428
|
+
<li class="public ">
|
429
|
+
<span class="summary_signature">
|
430
|
+
|
431
|
+
<a href="#save_crl_list-instance_method" title="#save_crl_list (instance method)">- (Object) <strong>save_crl_list</strong>(filename_or_io = @crl_list_file) </a>
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
</span>
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
<span class="summary_desc"><div class='inline'>
|
446
|
+
<p>Saves the CRL list to a filename or IO.</p>
|
447
|
+
</div></span>
|
448
|
+
|
449
|
+
</li>
|
450
|
+
|
451
|
+
|
452
|
+
<li class="public ">
|
453
|
+
<span class="summary_signature">
|
454
|
+
|
455
|
+
<a href="#save_crl_number-instance_method" title="#save_crl_number (instance method)">- (Object) <strong>save_crl_number</strong>(filename_or_io = @crl_number_file) </a>
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
</span>
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
<span class="summary_desc"><div class='inline'>
|
470
|
+
<p>Save the CRL number to a filename or IO.</p>
|
471
|
+
</div></span>
|
472
|
+
|
473
|
+
</li>
|
474
|
+
|
475
|
+
|
476
|
+
<li class="public ">
|
477
|
+
<span class="summary_signature">
|
478
|
+
|
479
|
+
<a href="#unrevoke_cert-instance_method" title="#unrevoke_cert (instance method)">- (Object) <strong>unrevoke_cert</strong>(serial) </a>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
</span>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
<span class="summary_desc"><div class='inline'>
|
494
|
+
<p>Remove serial from revocation list.</p>
|
495
|
+
</div></span>
|
496
|
+
|
497
|
+
</li>
|
498
|
+
|
499
|
+
|
500
|
+
</ul>
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></h3>
|
513
|
+
<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>
|
514
|
+
<div id="constructor_details" class="method_details_list">
|
515
|
+
<h2>Constructor Details</h2>
|
516
|
+
|
517
|
+
<div class="method_details first">
|
518
|
+
<h3 class="signature first" id="initialize-instance_method">
|
519
|
+
|
520
|
+
- (<tt><span class='object_link'><a href="" title="R509::CRL::Administrator (class)">Administrator</a></span></tt>) <strong>initialize</strong>(config)
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
</h3><div class="docstring">
|
527
|
+
<div class="discussion">
|
528
|
+
|
529
|
+
<p>A new instance of Administrator</p>
|
530
|
+
|
531
|
+
|
532
|
+
</div>
|
533
|
+
</div>
|
534
|
+
<div class="tags">
|
535
|
+
<p class="tag_title">Parameters:</p>
|
536
|
+
<ul class="param">
|
537
|
+
|
538
|
+
<li>
|
539
|
+
|
540
|
+
<span class='name'>config</span>
|
541
|
+
|
542
|
+
|
543
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Config/CAConfig.html" title="R509::Config::CAConfig (class)">R509::Config::CAConfig</a></span></tt>)</span>
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
</li>
|
548
|
+
|
549
|
+
</ul>
|
550
|
+
|
551
|
+
|
552
|
+
</div><table class="source_code">
|
553
|
+
<tr>
|
554
|
+
<td>
|
555
|
+
<pre class="lines">
|
556
|
+
|
557
|
+
|
558
|
+
141
|
559
|
+
142
|
560
|
+
143
|
561
|
+
144
|
562
|
+
145
|
563
|
+
146
|
564
|
+
147
|
565
|
+
148
|
566
|
+
149
|
567
|
+
150
|
568
|
+
151
|
569
|
+
152
|
570
|
+
153
|
571
|
+
154
|
572
|
+
155
|
573
|
+
156
|
574
|
+
157
|
575
|
+
158
|
576
|
+
159
|
577
|
+
160
|
578
|
+
161
|
579
|
+
162</pre>
|
580
|
+
</td>
|
581
|
+
<td>
|
582
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 141</span>
|
583
|
+
|
584
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
585
|
+
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span>
|
586
|
+
|
587
|
+
<span class='kw'>unless</span> <span class='ivar'>@config</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'>Config</span><span class='op'>::</span><span class='const'>CAConfig</span><span class='rparen'>)</span>
|
588
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509Error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>config must be a kind of R509::Config::CAConfig</span><span class='tstring_end'>"</span></span>
|
589
|
+
<span class='kw'>end</span>
|
590
|
+
|
591
|
+
<span class='ivar'>@validity_hours</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_crl_validity_hours'>crl_validity_hours</span>
|
592
|
+
<span class='ivar'>@start_skew_seconds</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_crl_start_skew_seconds'>crl_start_skew_seconds</span>
|
593
|
+
<span class='ivar'>@crl</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
594
|
+
|
595
|
+
<span class='ivar'>@crl_number_file</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_crl_number_file'>crl_number_file</span>
|
596
|
+
<span class='kw'>if</span> <span class='kw'>not</span> <span class='ivar'>@crl_number_file</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
597
|
+
<span class='ivar'>@crl_number</span> <span class='op'>=</span> <span class='id identifier rubyid_read_data'>read_data</span><span class='lparen'>(</span><span class='ivar'>@crl_number_file</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
598
|
+
<span class='kw'>else</span>
|
599
|
+
<span class='ivar'>@crl_number</span> <span class='op'>=</span> <span class='int'>0</span>
|
600
|
+
<span class='kw'>end</span>
|
601
|
+
|
602
|
+
|
603
|
+
<span class='ivar'>@crl_list_file</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_crl_list_file'>crl_list_file</span>
|
604
|
+
<span class='id identifier rubyid_load_crl_list'>load_crl_list</span><span class='lparen'>(</span><span class='ivar'>@crl_list_file</span><span class='rparen'>)</span>
|
605
|
+
<span class='kw'>end</span></pre>
|
606
|
+
</td>
|
607
|
+
</tr>
|
608
|
+
</table>
|
609
|
+
</div>
|
610
|
+
|
611
|
+
</div>
|
612
|
+
|
613
|
+
<div id="instance_attr_details" class="attr_details">
|
614
|
+
<h2>Instance Attribute Details</h2>
|
615
|
+
|
616
|
+
|
617
|
+
<span id=""></span>
|
618
|
+
<div class="method_details first">
|
619
|
+
<h3 class="signature first" id="crl-instance_method">
|
620
|
+
|
621
|
+
- (<tt>Object</tt>) <strong>crl</strong> <span class="extras">(readonly)</span>
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
</h3><div class="docstring">
|
628
|
+
<div class="discussion">
|
629
|
+
|
630
|
+
<p>Returns the value of attribute crl</p>
|
631
|
+
|
632
|
+
|
633
|
+
</div>
|
634
|
+
</div>
|
635
|
+
<div class="tags">
|
636
|
+
|
637
|
+
|
638
|
+
</div><table class="source_code">
|
639
|
+
<tr>
|
640
|
+
<td>
|
641
|
+
<pre class="lines">
|
642
|
+
|
643
|
+
|
644
|
+
138
|
645
|
+
139
|
646
|
+
140</pre>
|
647
|
+
</td>
|
648
|
+
<td>
|
649
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 138</span>
|
650
|
+
|
651
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_crl'>crl</span>
|
652
|
+
<span class='ivar'>@crl</span>
|
653
|
+
<span class='kw'>end</span></pre>
|
654
|
+
</td>
|
655
|
+
</tr>
|
656
|
+
</table>
|
657
|
+
</div>
|
658
|
+
|
659
|
+
|
660
|
+
<span id=""></span>
|
661
|
+
<div class="method_details ">
|
662
|
+
<h3 class="signature " id="crl_list_file-instance_method">
|
663
|
+
|
664
|
+
- (<tt>Object</tt>) <strong>crl_list_file</strong> <span class="extras">(readonly)</span>
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
</h3><div class="docstring">
|
671
|
+
<div class="discussion">
|
672
|
+
|
673
|
+
<p>Returns the value of attribute crl_list_file</p>
|
674
|
+
|
675
|
+
|
676
|
+
</div>
|
677
|
+
</div>
|
678
|
+
<div class="tags">
|
679
|
+
|
680
|
+
|
681
|
+
</div><table class="source_code">
|
682
|
+
<tr>
|
683
|
+
<td>
|
684
|
+
<pre class="lines">
|
685
|
+
|
686
|
+
|
687
|
+
138
|
688
|
+
139
|
689
|
+
140</pre>
|
690
|
+
</td>
|
691
|
+
<td>
|
692
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 138</span>
|
693
|
+
|
694
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_crl_list_file'>crl_list_file</span>
|
695
|
+
<span class='ivar'>@crl_list_file</span>
|
696
|
+
<span class='kw'>end</span></pre>
|
697
|
+
</td>
|
698
|
+
</tr>
|
699
|
+
</table>
|
700
|
+
</div>
|
701
|
+
|
702
|
+
|
703
|
+
<span id=""></span>
|
704
|
+
<div class="method_details ">
|
705
|
+
<h3 class="signature " id="crl_number-instance_method">
|
706
|
+
|
707
|
+
- (<tt>Object</tt>) <strong>crl_number</strong> <span class="extras">(readonly)</span>
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
</h3><div class="docstring">
|
714
|
+
<div class="discussion">
|
715
|
+
|
716
|
+
<p>Returns the value of attribute crl_number</p>
|
717
|
+
|
718
|
+
|
719
|
+
</div>
|
720
|
+
</div>
|
721
|
+
<div class="tags">
|
722
|
+
|
723
|
+
|
724
|
+
</div><table class="source_code">
|
725
|
+
<tr>
|
726
|
+
<td>
|
727
|
+
<pre class="lines">
|
728
|
+
|
729
|
+
|
730
|
+
138
|
731
|
+
139
|
732
|
+
140</pre>
|
733
|
+
</td>
|
734
|
+
<td>
|
735
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 138</span>
|
736
|
+
|
737
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_crl_number'>crl_number</span>
|
738
|
+
<span class='ivar'>@crl_number</span>
|
739
|
+
<span class='kw'>end</span></pre>
|
740
|
+
</td>
|
741
|
+
</tr>
|
742
|
+
</table>
|
743
|
+
</div>
|
744
|
+
|
745
|
+
|
746
|
+
<span id=""></span>
|
747
|
+
<div class="method_details ">
|
748
|
+
<h3 class="signature " id="crl_number_file-instance_method">
|
749
|
+
|
750
|
+
- (<tt>Object</tt>) <strong>crl_number_file</strong> <span class="extras">(readonly)</span>
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
</h3><div class="docstring">
|
757
|
+
<div class="discussion">
|
758
|
+
|
759
|
+
<p>Returns the value of attribute crl_number_file</p>
|
760
|
+
|
761
|
+
|
762
|
+
</div>
|
763
|
+
</div>
|
764
|
+
<div class="tags">
|
765
|
+
|
766
|
+
|
767
|
+
</div><table class="source_code">
|
768
|
+
<tr>
|
769
|
+
<td>
|
770
|
+
<pre class="lines">
|
771
|
+
|
772
|
+
|
773
|
+
138
|
774
|
+
139
|
775
|
+
140</pre>
|
776
|
+
</td>
|
777
|
+
<td>
|
778
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 138</span>
|
779
|
+
|
780
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_crl_number_file'>crl_number_file</span>
|
781
|
+
<span class='ivar'>@crl_number_file</span>
|
782
|
+
<span class='kw'>end</span></pre>
|
783
|
+
</td>
|
784
|
+
</tr>
|
785
|
+
</table>
|
786
|
+
</div>
|
787
|
+
|
788
|
+
|
789
|
+
<span id=""></span>
|
790
|
+
<div class="method_details ">
|
791
|
+
<h3 class="signature " id="validity_hours-instance_method">
|
792
|
+
|
793
|
+
- (<tt>Object</tt>) <strong>validity_hours</strong> <span class="extras">(readonly)</span>
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
</h3><div class="docstring">
|
800
|
+
<div class="discussion">
|
801
|
+
|
802
|
+
<p>Returns the value of attribute validity_hours</p>
|
803
|
+
|
804
|
+
|
805
|
+
</div>
|
806
|
+
</div>
|
807
|
+
<div class="tags">
|
808
|
+
|
809
|
+
|
810
|
+
</div><table class="source_code">
|
811
|
+
<tr>
|
812
|
+
<td>
|
813
|
+
<pre class="lines">
|
814
|
+
|
815
|
+
|
816
|
+
138
|
817
|
+
139
|
818
|
+
140</pre>
|
819
|
+
</td>
|
820
|
+
<td>
|
821
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 138</span>
|
822
|
+
|
823
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validity_hours'>validity_hours</span>
|
824
|
+
<span class='ivar'>@validity_hours</span>
|
825
|
+
<span class='kw'>end</span></pre>
|
826
|
+
</td>
|
827
|
+
</tr>
|
828
|
+
</table>
|
829
|
+
</div>
|
830
|
+
|
831
|
+
</div>
|
832
|
+
|
833
|
+
|
834
|
+
<div id="instance_method_details" class="method_details_list">
|
835
|
+
<h2>Instance Method Details</h2>
|
836
|
+
|
837
|
+
|
838
|
+
<div class="method_details first">
|
839
|
+
<h3 class="signature first" id="generate_crl-instance_method">
|
840
|
+
|
841
|
+
- (<tt>String</tt>) <strong>generate_crl</strong>
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
</h3><div class="docstring">
|
848
|
+
<div class="discussion">
|
849
|
+
|
850
|
+
<p>Remove serial from revocation list</p>
|
851
|
+
|
852
|
+
|
853
|
+
</div>
|
854
|
+
</div>
|
855
|
+
<div class="tags">
|
856
|
+
|
857
|
+
<p class="tag_title">Returns:</p>
|
858
|
+
<ul class="return">
|
859
|
+
|
860
|
+
<li>
|
861
|
+
|
862
|
+
|
863
|
+
<span class='type'>(<tt>String</tt>)</span>
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
—
|
868
|
+
<div class='inline'>
|
869
|
+
<p>PEM encoded signed CRL</p>
|
870
|
+
</div>
|
871
|
+
|
872
|
+
</li>
|
873
|
+
|
874
|
+
</ul>
|
875
|
+
|
876
|
+
</div><table class="source_code">
|
877
|
+
<tr>
|
878
|
+
<td>
|
879
|
+
<pre class="lines">
|
880
|
+
|
881
|
+
|
882
|
+
228
|
883
|
+
229
|
884
|
+
230
|
885
|
+
231
|
886
|
+
232
|
887
|
+
233
|
888
|
+
234
|
889
|
+
235
|
890
|
+
236
|
891
|
+
237
|
892
|
+
238
|
893
|
+
239
|
894
|
+
240
|
895
|
+
241
|
896
|
+
242
|
897
|
+
243
|
898
|
+
244
|
899
|
+
245
|
900
|
+
246
|
901
|
+
247
|
902
|
+
248
|
903
|
+
249
|
904
|
+
250
|
905
|
+
251
|
906
|
+
252
|
907
|
+
253
|
908
|
+
254
|
909
|
+
255
|
910
|
+
256
|
911
|
+
257
|
912
|
+
258
|
913
|
+
259
|
914
|
+
260
|
915
|
+
261
|
916
|
+
262
|
917
|
+
263
|
918
|
+
264</pre>
|
919
|
+
</td>
|
920
|
+
<td>
|
921
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 228</span>
|
922
|
+
|
923
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_generate_crl'>generate_crl</span>
|
924
|
+
<span class='id identifier rubyid_crl'>crl</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>X509</span><span class='op'>::</span><span class='const'>CRL</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
925
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='int'>1</span>
|
926
|
+
<span class='id identifier rubyid_now'>now</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
927
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_last_update'>last_update</span> <span class='op'>=</span> <span class='id identifier rubyid_now'>now</span><span class='op'>-</span><span class='ivar'>@start_skew_seconds</span>
|
928
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_next_update'>next_update</span> <span class='op'>=</span> <span class='id identifier rubyid_now'>now</span><span class='op'>+</span><span class='ivar'>@validity_hours</span><span class='op'>*</span><span class='int'>3600</span>
|
929
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_issuer'>issuer</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
930
|
+
|
931
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_revoked_certs'>revoked_certs</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_serial'>serial</span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span><span class='comma'>,</span> <span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='op'>|</span>
|
932
|
+
<span class='id identifier rubyid_revoked'>revoked</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>X509</span><span class='op'>::</span><span class='const'>Revoked</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
933
|
+
<span class='id identifier rubyid_revoked'>revoked</span><span class='period'>.</span><span class='id identifier rubyid_serial'>serial</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>BN</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
934
|
+
<span class='id identifier rubyid_revoked'>revoked</span><span class='period'>.</span><span class='id identifier rubyid_time'>time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_at'>at</span><span class='lparen'>(</span><span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='rparen'>)</span>
|
935
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_reason'>reason</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
936
|
+
<span class='id identifier rubyid_enum'>enum</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Enumerated</span><span class='lparen'>(</span><span class='id identifier rubyid_reason'>reason</span><span class='rparen'>)</span> <span class='comment'>#see reason codes below
|
937
|
+
</span> <span class='id identifier rubyid_ext'>ext</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>X509</span><span class='op'>::</span><span class='const'>Extension</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>CRLReason</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_enum'>enum</span><span class='rparen'>)</span>
|
938
|
+
<span class='id identifier rubyid_revoked'>revoked</span><span class='period'>.</span><span class='id identifier rubyid_add_extension'>add_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_ext'>ext</span><span class='rparen'>)</span>
|
939
|
+
<span class='kw'>end</span>
|
940
|
+
<span class='comment'>#now add it to the crl
|
941
|
+
</span> <span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_add_revoked'>add_revoked</span><span class='lparen'>(</span><span class='id identifier rubyid_revoked'>revoked</span><span class='rparen'>)</span>
|
942
|
+
<span class='kw'>end</span>
|
943
|
+
|
944
|
+
<span class='id identifier rubyid_ef'>ef</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>X509</span><span class='op'>::</span><span class='const'>ExtensionFactory</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
945
|
+
<span class='id identifier rubyid_ef'>ef</span><span class='period'>.</span><span class='id identifier rubyid_issuer_certificate'>issuer_certificate</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_cert'>cert</span>
|
946
|
+
<span class='id identifier rubyid_ef'>ef</span><span class='period'>.</span><span class='id identifier rubyid_crl'>crl</span> <span class='op'>=</span> <span class='id identifier rubyid_crl'>crl</span>
|
947
|
+
<span class='comment'>#grab crl number from file, increment, write back
|
948
|
+
</span> <span class='id identifier rubyid_crl_number'>crl_number</span> <span class='op'>=</span> <span class='id identifier rubyid_increment_crl_number'>increment_crl_number</span>
|
949
|
+
<span class='id identifier rubyid_crlnum'>crlnum</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Integer</span><span class='lparen'>(</span><span class='id identifier rubyid_crl_number'>crl_number</span><span class='rparen'>)</span>
|
950
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_add_extension'>add_extension</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'>Extension</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>crlNumber</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_crlnum'>crlnum</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
951
|
+
<span class='id identifier rubyid_extensions'>extensions</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
952
|
+
<span class='id identifier rubyid_extensions'>extensions</span> <span class='op'><<</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>authorityKeyIdentifier</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>keyid:always,issuer:always</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rbracket'>]</span>
|
953
|
+
<span class='id identifier rubyid_extensions'>extensions</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_oid'>oid</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_critical'>critical</span><span class='op'>|</span>
|
954
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_add_extension'>add_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_ef'>ef</span><span class='period'>.</span><span class='id identifier rubyid_create_extension'>create_extension</span><span class='lparen'>(</span><span class='id identifier rubyid_oid'>oid</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_critical'>critical</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
955
|
+
<span class='rbrace'>}</span>
|
956
|
+
<span class='id identifier rubyid_crl'>crl</span><span class='period'>.</span><span class='id identifier rubyid_sign'>sign</span><span class='lparen'>(</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_ca_cert'>ca_cert</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
|
957
|
+
<span class='ivar'>@crl</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>CRL</span><span class='op'>::</span><span class='const'>SignedList</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_crl'>crl</span>
|
958
|
+
<span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span>
|
959
|
+
<span class='kw'>end</span></pre>
|
960
|
+
</td>
|
961
|
+
</tr>
|
962
|
+
</table>
|
963
|
+
</div>
|
964
|
+
|
965
|
+
<div class="method_details ">
|
966
|
+
<h3 class="signature " id="revoke_cert-instance_method">
|
967
|
+
|
968
|
+
- (<tt>Object</tt>) <strong>revoke_cert</strong>(serial, reason = nil, revoke_time = Time.now.to_i, generate_and_save = true)
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
</h3><div class="docstring">
|
975
|
+
<div class="discussion">
|
976
|
+
|
977
|
+
<p>Adds a certificate to the revocation list. After calling you must call
|
978
|
+
generate_crl to sign a new CRL</p>
|
979
|
+
|
980
|
+
<p>reason codes defined by rfc 5280</p>
|
981
|
+
|
982
|
+
<p>CRLReason ::= ENUMERATED {</p>
|
983
|
+
|
984
|
+
<pre class="code ruby"><code class="ruby">unspecified (0),
|
985
|
+
keyCompromise (1),
|
986
|
+
cACompromise (2),
|
987
|
+
affiliationChanged (3),
|
988
|
+
superseded (4),
|
989
|
+
cessationOfOperation (5),
|
990
|
+
certificateHold (6),
|
991
|
+
removeFromCRL (8),
|
992
|
+
privilegeWithdrawn (9),
|
993
|
+
aACompromise (10) }</code></pre>
|
994
|
+
|
995
|
+
|
996
|
+
</div>
|
997
|
+
</div>
|
998
|
+
<div class="tags">
|
999
|
+
<p class="tag_title">Parameters:</p>
|
1000
|
+
<ul class="param">
|
1001
|
+
|
1002
|
+
<li>
|
1003
|
+
|
1004
|
+
<span class='name'>serial</span>
|
1005
|
+
|
1006
|
+
|
1007
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
—
|
1012
|
+
<div class='inline'>
|
1013
|
+
<p>serial number of the certificate to revoke</p>
|
1014
|
+
</div>
|
1015
|
+
|
1016
|
+
</li>
|
1017
|
+
|
1018
|
+
<li>
|
1019
|
+
|
1020
|
+
<span class='name'>reason</span>
|
1021
|
+
|
1022
|
+
|
1023
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1024
|
+
|
1025
|
+
|
1026
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1027
|
+
|
1028
|
+
|
1029
|
+
—
|
1030
|
+
<div class='inline'>
|
1031
|
+
<p>reason for revocation</p>
|
1032
|
+
</div>
|
1033
|
+
|
1034
|
+
</li>
|
1035
|
+
|
1036
|
+
<li>
|
1037
|
+
|
1038
|
+
<span class='name'>revoke_time</span>
|
1039
|
+
|
1040
|
+
|
1041
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1042
|
+
|
1043
|
+
|
1044
|
+
<em class="default">(defaults to: <tt>Time.now.to_i</tt>)</em>
|
1045
|
+
|
1046
|
+
|
1047
|
+
</li>
|
1048
|
+
|
1049
|
+
<li>
|
1050
|
+
|
1051
|
+
<span class='name'>generate_and_save</span>
|
1052
|
+
|
1053
|
+
|
1054
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1055
|
+
|
1056
|
+
|
1057
|
+
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1058
|
+
|
1059
|
+
|
1060
|
+
—
|
1061
|
+
<div class='inline'>
|
1062
|
+
<p>whether we want to generate the CRL and save its file (default=true)</p>
|
1063
|
+
</div>
|
1064
|
+
|
1065
|
+
</li>
|
1066
|
+
|
1067
|
+
</ul>
|
1068
|
+
|
1069
|
+
|
1070
|
+
</div><table class="source_code">
|
1071
|
+
<tr>
|
1072
|
+
<td>
|
1073
|
+
<pre class="lines">
|
1074
|
+
|
1075
|
+
|
1076
|
+
197
|
1077
|
+
198
|
1078
|
+
199
|
1079
|
+
200
|
1080
|
+
201
|
1081
|
+
202
|
1082
|
+
203
|
1083
|
+
204
|
1084
|
+
205
|
1085
|
+
206
|
1086
|
+
207
|
1087
|
+
208
|
1088
|
+
209
|
1089
|
+
210
|
1090
|
+
211
|
1091
|
+
212
|
1092
|
+
213</pre>
|
1093
|
+
</td>
|
1094
|
+
<td>
|
1095
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 197</span>
|
1096
|
+
|
1097
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_revoke_cert'>revoke_cert</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='comma'>,</span><span class='id identifier rubyid_reason'>reason</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='op'>=</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span> <span class='id identifier rubyid_generate_and_save'>generate_and_save</span><span class='op'>=</span><span class='kw'>true</span><span class='rparen'>)</span>
|
1098
|
+
<span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_reason'>reason</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>10</span><span class='rparen'>)</span>
|
1099
|
+
<span class='id identifier rubyid_reason'>reason</span> <span class='op'>=</span> <span class='int'>0</span>
|
1100
|
+
<span class='kw'>end</span>
|
1101
|
+
<span class='id identifier rubyid_serial'>serial</span> <span class='op'>=</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1102
|
+
<span class='id identifier rubyid_reason'>reason</span> <span class='op'>=</span> <span class='id identifier rubyid_reason'>reason</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1103
|
+
<span class='id identifier rubyid_revoke_time'>revoke_time</span> <span class='op'>=</span> <span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
1104
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_revoked?'>revoked?</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
1105
|
+
<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'>"</span><span class='tstring_content'>Cannot revoke a previously revoked certificate</span><span class='tstring_end'>"</span></span>
|
1106
|
+
<span class='kw'>end</span>
|
1107
|
+
<span class='ivar'>@revoked_certs</span><span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:reason</span> <span class='op'>=></span> <span class='id identifier rubyid_reason'>reason</span><span class='comma'>,</span> <span class='symbol'>:revoke_time</span> <span class='op'>=></span> <span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='rbrace'>}</span>
|
1108
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_generate_and_save'>generate_and_save</span>
|
1109
|
+
<span class='id identifier rubyid_generate_crl'>generate_crl</span>
|
1110
|
+
<span class='id identifier rubyid_save_crl_list'>save_crl_list</span>
|
1111
|
+
<span class='kw'>end</span>
|
1112
|
+
<span class='kw'>nil</span>
|
1113
|
+
<span class='kw'>end</span></pre>
|
1114
|
+
</td>
|
1115
|
+
</tr>
|
1116
|
+
</table>
|
1117
|
+
</div>
|
1118
|
+
|
1119
|
+
<div class="method_details ">
|
1120
|
+
<h3 class="signature " id="revoked?-instance_method">
|
1121
|
+
|
1122
|
+
- (<tt>Boolean</tt>) <strong>revoked?</strong>(serial)
|
1123
|
+
|
1124
|
+
|
1125
|
+
|
1126
|
+
|
1127
|
+
|
1128
|
+
</h3><div class="docstring">
|
1129
|
+
<div class="discussion">
|
1130
|
+
|
1131
|
+
<p>Indicates whether the serial number has been revoked, or not.</p>
|
1132
|
+
|
1133
|
+
|
1134
|
+
</div>
|
1135
|
+
</div>
|
1136
|
+
<div class="tags">
|
1137
|
+
<p class="tag_title">Parameters:</p>
|
1138
|
+
<ul class="param">
|
1139
|
+
|
1140
|
+
<li>
|
1141
|
+
|
1142
|
+
<span class='name'>serial</span>
|
1143
|
+
|
1144
|
+
|
1145
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1146
|
+
|
1147
|
+
|
1148
|
+
|
1149
|
+
—
|
1150
|
+
<div class='inline'>
|
1151
|
+
<p>The serial number we want to check</p>
|
1152
|
+
</div>
|
1153
|
+
|
1154
|
+
</li>
|
1155
|
+
|
1156
|
+
</ul>
|
1157
|
+
|
1158
|
+
<p class="tag_title">Returns:</p>
|
1159
|
+
<ul class="return">
|
1160
|
+
|
1161
|
+
<li>
|
1162
|
+
|
1163
|
+
|
1164
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
—
|
1169
|
+
<div class='inline'>
|
1170
|
+
<p>True if the serial number was revoked. False, otherwise.</p>
|
1171
|
+
</div>
|
1172
|
+
|
1173
|
+
</li>
|
1174
|
+
|
1175
|
+
</ul>
|
1176
|
+
|
1177
|
+
</div><table class="source_code">
|
1178
|
+
<tr>
|
1179
|
+
<td>
|
1180
|
+
<pre class="lines">
|
1181
|
+
|
1182
|
+
|
1183
|
+
168
|
1184
|
+
169
|
1185
|
+
170</pre>
|
1186
|
+
</td>
|
1187
|
+
<td>
|
1188
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 168</span>
|
1189
|
+
|
1190
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_revoked?'>revoked?</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
1191
|
+
<span class='ivar'>@revoked_certs</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
1192
|
+
<span class='kw'>end</span></pre>
|
1193
|
+
</td>
|
1194
|
+
</tr>
|
1195
|
+
</table>
|
1196
|
+
</div>
|
1197
|
+
|
1198
|
+
<div class="method_details ">
|
1199
|
+
<h3 class="signature " id="revoked_cert-instance_method">
|
1200
|
+
|
1201
|
+
- (<tt>Array</tt>) <strong>revoked_cert</strong>(serial)
|
1202
|
+
|
1203
|
+
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
</h3><div class="docstring">
|
1208
|
+
<div class="discussion">
|
1209
|
+
|
1210
|
+
<p>Serial, reason, revoke_time tuple</p>
|
1211
|
+
|
1212
|
+
|
1213
|
+
</div>
|
1214
|
+
</div>
|
1215
|
+
<div class="tags">
|
1216
|
+
|
1217
|
+
<p class="tag_title">Returns:</p>
|
1218
|
+
<ul class="return">
|
1219
|
+
|
1220
|
+
<li>
|
1221
|
+
|
1222
|
+
|
1223
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
1224
|
+
|
1225
|
+
|
1226
|
+
|
1227
|
+
—
|
1228
|
+
<div class='inline'>
|
1229
|
+
<p>serial, reason, revoke_time tuple</p>
|
1230
|
+
</div>
|
1231
|
+
|
1232
|
+
</li>
|
1233
|
+
|
1234
|
+
</ul>
|
1235
|
+
|
1236
|
+
</div><table class="source_code">
|
1237
|
+
<tr>
|
1238
|
+
<td>
|
1239
|
+
<pre class="lines">
|
1240
|
+
|
1241
|
+
|
1242
|
+
173
|
1243
|
+
174
|
1244
|
+
175</pre>
|
1245
|
+
</td>
|
1246
|
+
<td>
|
1247
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 173</span>
|
1248
|
+
|
1249
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_revoked_cert'>revoked_cert</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
1250
|
+
<span class='ivar'>@revoked_certs</span><span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='rbracket'>]</span>
|
1251
|
+
<span class='kw'>end</span></pre>
|
1252
|
+
</td>
|
1253
|
+
</tr>
|
1254
|
+
</table>
|
1255
|
+
</div>
|
1256
|
+
|
1257
|
+
<div class="method_details ">
|
1258
|
+
<h3 class="signature " id="revoked_certs-instance_method">
|
1259
|
+
|
1260
|
+
- (<tt>Array<Array></tt>) <strong>revoked_certs</strong>
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
1265
|
+
|
1266
|
+
</h3><div class="docstring">
|
1267
|
+
<div class="discussion">
|
1268
|
+
|
1269
|
+
<p>Returns an array of serial, reason, revoke_time tuples.</p>
|
1270
|
+
|
1271
|
+
|
1272
|
+
</div>
|
1273
|
+
</div>
|
1274
|
+
<div class="tags">
|
1275
|
+
|
1276
|
+
<p class="tag_title">Returns:</p>
|
1277
|
+
<ul class="return">
|
1278
|
+
|
1279
|
+
<li>
|
1280
|
+
|
1281
|
+
|
1282
|
+
<span class='type'>(<tt>Array<Array></tt>)</span>
|
1283
|
+
|
1284
|
+
|
1285
|
+
|
1286
|
+
—
|
1287
|
+
<div class='inline'>
|
1288
|
+
<p>Returns an array of serial, reason, revoke_time tuples.</p>
|
1289
|
+
</div>
|
1290
|
+
|
1291
|
+
</li>
|
1292
|
+
|
1293
|
+
</ul>
|
1294
|
+
|
1295
|
+
</div><table class="source_code">
|
1296
|
+
<tr>
|
1297
|
+
<td>
|
1298
|
+
<pre class="lines">
|
1299
|
+
|
1300
|
+
|
1301
|
+
268
|
1302
|
+
269
|
1303
|
+
270
|
1304
|
+
271
|
1305
|
+
272
|
1306
|
+
273
|
1307
|
+
274</pre>
|
1308
|
+
</td>
|
1309
|
+
<td>
|
1310
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 268</span>
|
1311
|
+
|
1312
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_revoked_certs'>revoked_certs</span>
|
1313
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1314
|
+
<span class='ivar'>@revoked_certs</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</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_serial'>serial</span><span class='op'>|</span>
|
1315
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'><<</span> <span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='comma'>,</span> <span class='ivar'>@revoked_certs</span><span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:reason</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='ivar'>@revoked_certs</span><span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:revoke_time</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
|
1316
|
+
<span class='kw'>end</span>
|
1317
|
+
<span class='id identifier rubyid_ret'>ret</span>
|
1318
|
+
<span class='kw'>end</span></pre>
|
1319
|
+
</td>
|
1320
|
+
</tr>
|
1321
|
+
</table>
|
1322
|
+
</div>
|
1323
|
+
|
1324
|
+
<div class="method_details ">
|
1325
|
+
<h3 class="signature " id="save_crl_list-instance_method">
|
1326
|
+
|
1327
|
+
- (<tt>Object</tt>) <strong>save_crl_list</strong>(filename_or_io = @crl_list_file)
|
1328
|
+
|
1329
|
+
|
1330
|
+
|
1331
|
+
|
1332
|
+
|
1333
|
+
</h3><div class="docstring">
|
1334
|
+
<div class="discussion">
|
1335
|
+
|
1336
|
+
<p>Saves the CRL list to a filename or IO. If the class was initialized with
|
1337
|
+
:crl_list_file, then the filename specified by that will be used by
|
1338
|
+
default.</p>
|
1339
|
+
|
1340
|
+
|
1341
|
+
</div>
|
1342
|
+
</div>
|
1343
|
+
<div class="tags">
|
1344
|
+
<p class="tag_title">Parameters:</p>
|
1345
|
+
<ul class="param">
|
1346
|
+
|
1347
|
+
<li>
|
1348
|
+
|
1349
|
+
<span class='name'>filename_or_io</span>
|
1350
|
+
|
1351
|
+
|
1352
|
+
<span class='type'>(<tt>String</tt>, <tt>#write</tt>, <tt>nil</tt>)</span>
|
1353
|
+
|
1354
|
+
|
1355
|
+
<em class="default">(defaults to: <tt>@crl_list_file</tt>)</em>
|
1356
|
+
|
1357
|
+
|
1358
|
+
—
|
1359
|
+
<div class='inline'>
|
1360
|
+
<p>If provided, the generated crl will be written to either the file (if a
|
1361
|
+
string), or IO. If nil, then the @crl_list_file will be used. If that is
|
1362
|
+
nil, then an error will be raised.</p>
|
1363
|
+
</div>
|
1364
|
+
|
1365
|
+
</li>
|
1366
|
+
|
1367
|
+
</ul>
|
1368
|
+
|
1369
|
+
|
1370
|
+
</div><table class="source_code">
|
1371
|
+
<tr>
|
1372
|
+
<td>
|
1373
|
+
<pre class="lines">
|
1374
|
+
|
1375
|
+
|
1376
|
+
283
|
1377
|
+
284
|
1378
|
+
285
|
1379
|
+
286
|
1380
|
+
287
|
1381
|
+
288
|
1382
|
+
289
|
1383
|
+
290
|
1384
|
+
291
|
1385
|
+
292</pre>
|
1386
|
+
</td>
|
1387
|
+
<td>
|
1388
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 283</span>
|
1389
|
+
|
1390
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_save_crl_list'>save_crl_list</span><span class='lparen'>(</span><span class='id identifier rubyid_filename_or_io'>filename_or_io</span> <span class='op'>=</span> <span class='ivar'>@crl_list_file</span><span class='rparen'>)</span>
|
1391
|
+
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_filename_or_io'>filename_or_io</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1392
|
+
|
1393
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1394
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_revoked_certs'>revoked_certs</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_serial'>serial</span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span><span class='comma'>,</span> <span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='op'>|</span>
|
1395
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'><<</span> <span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='comma'>,</span> <span class='id identifier rubyid_revoke_time'>revoke_time</span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>,</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1396
|
+
<span class='kw'>end</span>
|
1397
|
+
<span class='id identifier rubyid_write_data'>write_data</span><span class='lparen'>(</span><span class='id identifier rubyid_filename_or_io'>filename_or_io</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1398
|
+
<span class='kw'>nil</span>
|
1399
|
+
<span class='kw'>end</span></pre>
|
1400
|
+
</td>
|
1401
|
+
</tr>
|
1402
|
+
</table>
|
1403
|
+
</div>
|
1404
|
+
|
1405
|
+
<div class="method_details ">
|
1406
|
+
<h3 class="signature " id="save_crl_number-instance_method">
|
1407
|
+
|
1408
|
+
- (<tt>Object</tt>) <strong>save_crl_number</strong>(filename_or_io = @crl_number_file)
|
1409
|
+
|
1410
|
+
|
1411
|
+
|
1412
|
+
|
1413
|
+
|
1414
|
+
</h3><div class="docstring">
|
1415
|
+
<div class="discussion">
|
1416
|
+
|
1417
|
+
<p>Save the CRL number to a filename or IO. If the class was initialized with
|
1418
|
+
:crl_number_file, then the filename specified by that will be used by
|
1419
|
+
default.</p>
|
1420
|
+
|
1421
|
+
|
1422
|
+
</div>
|
1423
|
+
</div>
|
1424
|
+
<div class="tags">
|
1425
|
+
<p class="tag_title">Parameters:</p>
|
1426
|
+
<ul class="param">
|
1427
|
+
|
1428
|
+
<li>
|
1429
|
+
|
1430
|
+
<span class='name'>filename_or_io</span>
|
1431
|
+
|
1432
|
+
|
1433
|
+
<span class='type'>(<tt>String</tt>, <tt>#write</tt>, <tt>nil</tt>)</span>
|
1434
|
+
|
1435
|
+
|
1436
|
+
<em class="default">(defaults to: <tt>@crl_number_file</tt>)</em>
|
1437
|
+
|
1438
|
+
|
1439
|
+
—
|
1440
|
+
<div class='inline'>
|
1441
|
+
<p>If provided, the current crl number will be written to either the file (if
|
1442
|
+
a string), or IO. If nil, then the @crl_number_file will be used. If that
|
1443
|
+
is nil, then an error will be raised.</p>
|
1444
|
+
</div>
|
1445
|
+
|
1446
|
+
</li>
|
1447
|
+
|
1448
|
+
</ul>
|
1449
|
+
|
1450
|
+
|
1451
|
+
</div><table class="source_code">
|
1452
|
+
<tr>
|
1453
|
+
<td>
|
1454
|
+
<pre class="lines">
|
1455
|
+
|
1456
|
+
|
1457
|
+
301
|
1458
|
+
302
|
1459
|
+
303
|
1460
|
+
304
|
1461
|
+
305
|
1462
|
+
306
|
1463
|
+
307</pre>
|
1464
|
+
</td>
|
1465
|
+
<td>
|
1466
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 301</span>
|
1467
|
+
|
1468
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_save_crl_number'>save_crl_number</span><span class='lparen'>(</span><span class='id identifier rubyid_filename_or_io'>filename_or_io</span> <span class='op'>=</span> <span class='ivar'>@crl_number_file</span><span class='rparen'>)</span>
|
1469
|
+
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_filename_or_io'>filename_or_io</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1470
|
+
<span class='comment'># No valid filename or IO was specified, so bail.
|
1471
|
+
</span>
|
1472
|
+
<span class='id identifier rubyid_write_data'>write_data</span><span class='lparen'>(</span><span class='id identifier rubyid_filename_or_io'>filename_or_io</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_crl_number'>crl_number</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
1473
|
+
<span class='kw'>nil</span>
|
1474
|
+
<span class='kw'>end</span></pre>
|
1475
|
+
</td>
|
1476
|
+
</tr>
|
1477
|
+
</table>
|
1478
|
+
</div>
|
1479
|
+
|
1480
|
+
<div class="method_details ">
|
1481
|
+
<h3 class="signature " id="unrevoke_cert-instance_method">
|
1482
|
+
|
1483
|
+
- (<tt>Object</tt>) <strong>unrevoke_cert</strong>(serial)
|
1484
|
+
|
1485
|
+
|
1486
|
+
|
1487
|
+
|
1488
|
+
|
1489
|
+
</h3><div class="docstring">
|
1490
|
+
<div class="discussion">
|
1491
|
+
|
1492
|
+
<p>Remove serial from revocation list. After unrevoking you must call
|
1493
|
+
generate_crl to sign a new CRL</p>
|
1494
|
+
|
1495
|
+
|
1496
|
+
</div>
|
1497
|
+
</div>
|
1498
|
+
<div class="tags">
|
1499
|
+
<p class="tag_title">Parameters:</p>
|
1500
|
+
<ul class="param">
|
1501
|
+
|
1502
|
+
<li>
|
1503
|
+
|
1504
|
+
<span class='name'>serial</span>
|
1505
|
+
|
1506
|
+
|
1507
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1508
|
+
|
1509
|
+
|
1510
|
+
|
1511
|
+
—
|
1512
|
+
<div class='inline'>
|
1513
|
+
<p>serial number of the certificate to remove from revocation</p>
|
1514
|
+
</div>
|
1515
|
+
|
1516
|
+
</li>
|
1517
|
+
|
1518
|
+
</ul>
|
1519
|
+
|
1520
|
+
|
1521
|
+
</div><table class="source_code">
|
1522
|
+
<tr>
|
1523
|
+
<td>
|
1524
|
+
<pre class="lines">
|
1525
|
+
|
1526
|
+
|
1527
|
+
218
|
1528
|
+
219
|
1529
|
+
220
|
1530
|
+
221
|
1531
|
+
222
|
1532
|
+
223</pre>
|
1533
|
+
</td>
|
1534
|
+
<td>
|
1535
|
+
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 218</span>
|
1536
|
+
|
1537
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_unrevoke_cert'>unrevoke_cert</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
1538
|
+
<span class='ivar'>@revoked_certs</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
|
1539
|
+
<span class='id identifier rubyid_generate_crl'>generate_crl</span>
|
1540
|
+
<span class='id identifier rubyid_save_crl_list'>save_crl_list</span>
|
1541
|
+
<span class='kw'>nil</span>
|
1542
|
+
<span class='kw'>end</span></pre>
|
1543
|
+
</td>
|
1544
|
+
</tr>
|
1545
|
+
</table>
|
1546
|
+
</div>
|
1547
|
+
|
1548
|
+
</div>
|
1549
|
+
|
1550
|
+
</div>
|
1551
|
+
|
1552
|
+
<div id="footer">
|
1553
|
+
Generated on Tue Apr 16 10:49:56 2013 by
|
1554
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1555
|
+
0.8.5 (ruby-1.9.3).
|
1556
|
+
</div>
|
1557
|
+
|
1558
|
+
</body>
|
1559
|
+
</html>
|