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
@@ -1,2073 +0,0 @@
|
|
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.2.1
|
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_list_file-instance_method" title="#crl_list_file (instance method)">- (Object) <strong>crl_list_file</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_list_file.</p>
|
148
|
-
</div></span>
|
149
|
-
|
150
|
-
</li>
|
151
|
-
|
152
|
-
|
153
|
-
<li class="public ">
|
154
|
-
<span class="summary_signature">
|
155
|
-
|
156
|
-
<a href="#crl_number-instance_method" title="#crl_number (instance method)">- (Object) <strong>crl_number</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_number.</p>
|
177
|
-
</div></span>
|
178
|
-
|
179
|
-
</li>
|
180
|
-
|
181
|
-
|
182
|
-
<li class="public ">
|
183
|
-
<span class="summary_signature">
|
184
|
-
|
185
|
-
<a href="#crl_number_file-instance_method" title="#crl_number_file (instance method)">- (Object) <strong>crl_number_file</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_file.</p>
|
206
|
-
</div></span>
|
207
|
-
|
208
|
-
</li>
|
209
|
-
|
210
|
-
|
211
|
-
<li class="public ">
|
212
|
-
<span class="summary_signature">
|
213
|
-
|
214
|
-
<a href="#validity_hours-instance_method" title="#validity_hours (instance method)">- (Object) <strong>validity_hours</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 validity_hours.</p>
|
235
|
-
</div></span>
|
236
|
-
|
237
|
-
</li>
|
238
|
-
|
239
|
-
|
240
|
-
</ul>
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<h2>
|
247
|
-
Instance Method Summary
|
248
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
249
|
-
</h2>
|
250
|
-
|
251
|
-
<ul class="summary">
|
252
|
-
|
253
|
-
<li class="public ">
|
254
|
-
<span class="summary_signature">
|
255
|
-
|
256
|
-
<a href="#generate_crl-instance_method" title="#generate_crl (instance method)">- (String) <strong>generate_crl</strong> </a>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
</span>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<span class="summary_desc"><div class='inline'>
|
271
|
-
<p>Remove serial from revocation list.</p>
|
272
|
-
</div></span>
|
273
|
-
|
274
|
-
</li>
|
275
|
-
|
276
|
-
|
277
|
-
<li class="public ">
|
278
|
-
<span class="summary_signature">
|
279
|
-
|
280
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Administrator) <strong>initialize</strong>(config) </a>
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
</span>
|
285
|
-
|
286
|
-
|
287
|
-
<span class="note title constructor">constructor</span>
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
<span class="summary_desc"><div class='inline'>
|
297
|
-
<p>A new instance of Administrator.</p>
|
298
|
-
</div></span>
|
299
|
-
|
300
|
-
</li>
|
301
|
-
|
302
|
-
|
303
|
-
<li class="public ">
|
304
|
-
<span class="summary_signature">
|
305
|
-
|
306
|
-
<a href="#last_update-instance_method" title="#last_update (instance method)">- (Time) <strong>last_update</strong> </a>
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
</span>
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
<span class="summary_desc"><div class='inline'>
|
321
|
-
<p>Returns the signing time of the CRL.</p>
|
322
|
-
</div></span>
|
323
|
-
|
324
|
-
</li>
|
325
|
-
|
326
|
-
|
327
|
-
<li class="public ">
|
328
|
-
<span class="summary_signature">
|
329
|
-
|
330
|
-
<a href="#next_update-instance_method" title="#next_update (instance method)">- (Time) <strong>next_update</strong> </a>
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
</span>
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
<span class="summary_desc"><div class='inline'>
|
345
|
-
<p>Returns the next update time for the CRL.</p>
|
346
|
-
</div></span>
|
347
|
-
|
348
|
-
</li>
|
349
|
-
|
350
|
-
|
351
|
-
<li class="public ">
|
352
|
-
<span class="summary_signature">
|
353
|
-
|
354
|
-
<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>
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
</span>
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
<span class="summary_desc"><div class='inline'>
|
369
|
-
<p>Adds a certificate to the revocation list.</p>
|
370
|
-
</div></span>
|
371
|
-
|
372
|
-
</li>
|
373
|
-
|
374
|
-
|
375
|
-
<li class="public ">
|
376
|
-
<span class="summary_signature">
|
377
|
-
|
378
|
-
<a href="#revoked%3F-instance_method" title="#revoked? (instance method)">- (Boolean) <strong>revoked?</strong>(serial) </a>
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
</span>
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
<span class="summary_desc"><div class='inline'>
|
393
|
-
<p>Indicates whether the serial number has been revoked, or not.</p>
|
394
|
-
</div></span>
|
395
|
-
|
396
|
-
</li>
|
397
|
-
|
398
|
-
|
399
|
-
<li class="public ">
|
400
|
-
<span class="summary_signature">
|
401
|
-
|
402
|
-
<a href="#revoked_cert-instance_method" title="#revoked_cert (instance method)">- (Array) <strong>revoked_cert</strong>(serial) </a>
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
</span>
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
<span class="summary_desc"><div class='inline'>
|
417
|
-
<p>Serial, reason, revoke_time tuple.</p>
|
418
|
-
</div></span>
|
419
|
-
|
420
|
-
</li>
|
421
|
-
|
422
|
-
|
423
|
-
<li class="public ">
|
424
|
-
<span class="summary_signature">
|
425
|
-
|
426
|
-
<a href="#revoked_certs-instance_method" title="#revoked_certs (instance method)">- (Array<Array>) <strong>revoked_certs</strong> </a>
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
</span>
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
<span class="summary_desc"><div class='inline'>
|
441
|
-
<p>Returns an array of serial, reason, revoke_time tuples.</p>
|
442
|
-
</div></span>
|
443
|
-
|
444
|
-
</li>
|
445
|
-
|
446
|
-
|
447
|
-
<li class="public ">
|
448
|
-
<span class="summary_signature">
|
449
|
-
|
450
|
-
<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>
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
</span>
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
<span class="summary_desc"><div class='inline'>
|
465
|
-
<p>Saves the CRL list to a filename or IO.</p>
|
466
|
-
</div></span>
|
467
|
-
|
468
|
-
</li>
|
469
|
-
|
470
|
-
|
471
|
-
<li class="public ">
|
472
|
-
<span class="summary_signature">
|
473
|
-
|
474
|
-
<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>
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
</span>
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
<span class="summary_desc"><div class='inline'>
|
489
|
-
<p>Save the CRL number to a filename or IO.</p>
|
490
|
-
</div></span>
|
491
|
-
|
492
|
-
</li>
|
493
|
-
|
494
|
-
|
495
|
-
<li class="public ">
|
496
|
-
<span class="summary_signature">
|
497
|
-
|
498
|
-
<a href="#to_crl-instance_method" title="#to_crl (instance method)">- (R509::Crl::Parser) <strong>to_crl</strong> </a>
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
</span>
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
513
|
-
|
514
|
-
</li>
|
515
|
-
|
516
|
-
|
517
|
-
<li class="public ">
|
518
|
-
<span class="summary_signature">
|
519
|
-
|
520
|
-
<a href="#to_der-instance_method" title="#to_der (instance method)">- (String) <strong>to_der</strong> </a>
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
</span>
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
<span class="summary_desc"><div class='inline'>
|
535
|
-
<p>Returns the CRL in DER format.</p>
|
536
|
-
</div></span>
|
537
|
-
|
538
|
-
</li>
|
539
|
-
|
540
|
-
|
541
|
-
<li class="public ">
|
542
|
-
<span class="summary_signature">
|
543
|
-
|
544
|
-
<a href="#to_pem-instance_method" title="#to_pem (instance method)">- (String) <strong>to_pem</strong> </a>
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
(also: #to_s)
|
549
|
-
|
550
|
-
</span>
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
<span class="summary_desc"><div class='inline'>
|
561
|
-
<p>Returns the CRL in PEM format.</p>
|
562
|
-
</div></span>
|
563
|
-
|
564
|
-
</li>
|
565
|
-
|
566
|
-
|
567
|
-
<li class="public ">
|
568
|
-
<span class="summary_signature">
|
569
|
-
|
570
|
-
<a href="#unrevoke_cert-instance_method" title="#unrevoke_cert (instance method)">- (Object) <strong>unrevoke_cert</strong>(serial) </a>
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
</span>
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
<span class="summary_desc"><div class='inline'>
|
585
|
-
<p>Remove serial from revocation list.</p>
|
586
|
-
</div></span>
|
587
|
-
|
588
|
-
</li>
|
589
|
-
|
590
|
-
|
591
|
-
<li class="public ">
|
592
|
-
<span class="summary_signature">
|
593
|
-
|
594
|
-
<a href="#write_der-instance_method" title="#write_der (instance method)">- (Object) <strong>write_der</strong>(filename_or_io) </a>
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
</span>
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
<span class="summary_desc"><div class='inline'>
|
609
|
-
<p>Writes the CRL into the PEM format.</p>
|
610
|
-
</div></span>
|
611
|
-
|
612
|
-
</li>
|
613
|
-
|
614
|
-
|
615
|
-
<li class="public ">
|
616
|
-
<span class="summary_signature">
|
617
|
-
|
618
|
-
<a href="#write_pem-instance_method" title="#write_pem (instance method)">- (Object) <strong>write_pem</strong>(filename_or_io) </a>
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
</span>
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
<span class="summary_desc"><div class='inline'>
|
633
|
-
<p>Writes the CRL into the PEM format.</p>
|
634
|
-
</div></span>
|
635
|
-
|
636
|
-
</li>
|
637
|
-
|
638
|
-
|
639
|
-
</ul>
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="../IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></h3>
|
652
|
-
<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>
|
653
|
-
<div id="constructor_details" class="method_details_list">
|
654
|
-
<h2>Constructor Details</h2>
|
655
|
-
|
656
|
-
<div class="method_details first">
|
657
|
-
<h3 class="signature first" id="initialize-instance_method">
|
658
|
-
|
659
|
-
- (<tt><span class='object_link'><a href="" title="R509::Crl::Administrator (class)">Administrator</a></span></tt>) <strong>initialize</strong>(config)
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
</h3><div class="docstring">
|
666
|
-
<div class="discussion">
|
667
|
-
|
668
|
-
<p>A new instance of Administrator</p>
|
669
|
-
|
670
|
-
|
671
|
-
</div>
|
672
|
-
</div>
|
673
|
-
<div class="tags">
|
674
|
-
<p class="tag_title">Parameters:</p>
|
675
|
-
<ul class="param">
|
676
|
-
|
677
|
-
<li>
|
678
|
-
|
679
|
-
<span class='name'>config</span>
|
680
|
-
|
681
|
-
|
682
|
-
<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>
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
</li>
|
687
|
-
|
688
|
-
</ul>
|
689
|
-
|
690
|
-
|
691
|
-
</div><table class="source_code">
|
692
|
-
<tr>
|
693
|
-
<td>
|
694
|
-
<pre class="lines">
|
695
|
-
|
696
|
-
|
697
|
-
119
|
698
|
-
120
|
699
|
-
121
|
700
|
-
122
|
701
|
-
123
|
702
|
-
124
|
703
|
-
125
|
704
|
-
126
|
705
|
-
127
|
706
|
-
128
|
707
|
-
129
|
708
|
-
130
|
709
|
-
131
|
710
|
-
132
|
711
|
-
133
|
712
|
-
134
|
713
|
-
135
|
714
|
-
136
|
715
|
-
137
|
716
|
-
138
|
717
|
-
139
|
718
|
-
140</pre>
|
719
|
-
</td>
|
720
|
-
<td>
|
721
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 119</span>
|
722
|
-
|
723
|
-
<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>
|
724
|
-
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span>
|
725
|
-
|
726
|
-
<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>
|
727
|
-
<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>
|
728
|
-
<span class='kw'>end</span>
|
729
|
-
|
730
|
-
<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>
|
731
|
-
<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>
|
732
|
-
<span class='ivar'>@crl</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
733
|
-
|
734
|
-
<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>
|
735
|
-
<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>
|
736
|
-
<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>
|
737
|
-
<span class='kw'>else</span>
|
738
|
-
<span class='ivar'>@crl_number</span> <span class='op'>=</span> <span class='int'>0</span>
|
739
|
-
<span class='kw'>end</span>
|
740
|
-
|
741
|
-
|
742
|
-
<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>
|
743
|
-
<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>
|
744
|
-
<span class='kw'>end</span></pre>
|
745
|
-
</td>
|
746
|
-
</tr>
|
747
|
-
</table>
|
748
|
-
</div>
|
749
|
-
|
750
|
-
</div>
|
751
|
-
|
752
|
-
<div id="instance_attr_details" class="attr_details">
|
753
|
-
<h2>Instance Attribute Details</h2>
|
754
|
-
|
755
|
-
|
756
|
-
<span id=""></span>
|
757
|
-
<div class="method_details first">
|
758
|
-
<h3 class="signature first" id="crl_list_file-instance_method">
|
759
|
-
|
760
|
-
- (<tt>Object</tt>) <strong>crl_list_file</strong> <span class="extras">(readonly)</span>
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
</h3><div class="docstring">
|
767
|
-
<div class="discussion">
|
768
|
-
|
769
|
-
<p>Returns the value of attribute crl_list_file</p>
|
770
|
-
|
771
|
-
|
772
|
-
</div>
|
773
|
-
</div>
|
774
|
-
<div class="tags">
|
775
|
-
|
776
|
-
|
777
|
-
</div><table class="source_code">
|
778
|
-
<tr>
|
779
|
-
<td>
|
780
|
-
<pre class="lines">
|
781
|
-
|
782
|
-
|
783
|
-
116
|
784
|
-
117
|
785
|
-
118</pre>
|
786
|
-
</td>
|
787
|
-
<td>
|
788
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 116</span>
|
789
|
-
|
790
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_crl_list_file'>crl_list_file</span>
|
791
|
-
<span class='ivar'>@crl_list_file</span>
|
792
|
-
<span class='kw'>end</span></pre>
|
793
|
-
</td>
|
794
|
-
</tr>
|
795
|
-
</table>
|
796
|
-
</div>
|
797
|
-
|
798
|
-
|
799
|
-
<span id=""></span>
|
800
|
-
<div class="method_details ">
|
801
|
-
<h3 class="signature " id="crl_number-instance_method">
|
802
|
-
|
803
|
-
- (<tt>Object</tt>) <strong>crl_number</strong> <span class="extras">(readonly)</span>
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
</h3><div class="docstring">
|
810
|
-
<div class="discussion">
|
811
|
-
|
812
|
-
<p>Returns the value of attribute crl_number</p>
|
813
|
-
|
814
|
-
|
815
|
-
</div>
|
816
|
-
</div>
|
817
|
-
<div class="tags">
|
818
|
-
|
819
|
-
|
820
|
-
</div><table class="source_code">
|
821
|
-
<tr>
|
822
|
-
<td>
|
823
|
-
<pre class="lines">
|
824
|
-
|
825
|
-
|
826
|
-
116
|
827
|
-
117
|
828
|
-
118</pre>
|
829
|
-
</td>
|
830
|
-
<td>
|
831
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 116</span>
|
832
|
-
|
833
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_crl_number'>crl_number</span>
|
834
|
-
<span class='ivar'>@crl_number</span>
|
835
|
-
<span class='kw'>end</span></pre>
|
836
|
-
</td>
|
837
|
-
</tr>
|
838
|
-
</table>
|
839
|
-
</div>
|
840
|
-
|
841
|
-
|
842
|
-
<span id=""></span>
|
843
|
-
<div class="method_details ">
|
844
|
-
<h3 class="signature " id="crl_number_file-instance_method">
|
845
|
-
|
846
|
-
- (<tt>Object</tt>) <strong>crl_number_file</strong> <span class="extras">(readonly)</span>
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
</h3><div class="docstring">
|
853
|
-
<div class="discussion">
|
854
|
-
|
855
|
-
<p>Returns the value of attribute crl_number_file</p>
|
856
|
-
|
857
|
-
|
858
|
-
</div>
|
859
|
-
</div>
|
860
|
-
<div class="tags">
|
861
|
-
|
862
|
-
|
863
|
-
</div><table class="source_code">
|
864
|
-
<tr>
|
865
|
-
<td>
|
866
|
-
<pre class="lines">
|
867
|
-
|
868
|
-
|
869
|
-
116
|
870
|
-
117
|
871
|
-
118</pre>
|
872
|
-
</td>
|
873
|
-
<td>
|
874
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 116</span>
|
875
|
-
|
876
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_crl_number_file'>crl_number_file</span>
|
877
|
-
<span class='ivar'>@crl_number_file</span>
|
878
|
-
<span class='kw'>end</span></pre>
|
879
|
-
</td>
|
880
|
-
</tr>
|
881
|
-
</table>
|
882
|
-
</div>
|
883
|
-
|
884
|
-
|
885
|
-
<span id=""></span>
|
886
|
-
<div class="method_details ">
|
887
|
-
<h3 class="signature " id="validity_hours-instance_method">
|
888
|
-
|
889
|
-
- (<tt>Object</tt>) <strong>validity_hours</strong> <span class="extras">(readonly)</span>
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
</h3><div class="docstring">
|
896
|
-
<div class="discussion">
|
897
|
-
|
898
|
-
<p>Returns the value of attribute validity_hours</p>
|
899
|
-
|
900
|
-
|
901
|
-
</div>
|
902
|
-
</div>
|
903
|
-
<div class="tags">
|
904
|
-
|
905
|
-
|
906
|
-
</div><table class="source_code">
|
907
|
-
<tr>
|
908
|
-
<td>
|
909
|
-
<pre class="lines">
|
910
|
-
|
911
|
-
|
912
|
-
116
|
913
|
-
117
|
914
|
-
118</pre>
|
915
|
-
</td>
|
916
|
-
<td>
|
917
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 116</span>
|
918
|
-
|
919
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_validity_hours'>validity_hours</span>
|
920
|
-
<span class='ivar'>@validity_hours</span>
|
921
|
-
<span class='kw'>end</span></pre>
|
922
|
-
</td>
|
923
|
-
</tr>
|
924
|
-
</table>
|
925
|
-
</div>
|
926
|
-
|
927
|
-
</div>
|
928
|
-
|
929
|
-
|
930
|
-
<div id="instance_method_details" class="method_details_list">
|
931
|
-
<h2>Instance Method Details</h2>
|
932
|
-
|
933
|
-
|
934
|
-
<div class="method_details first">
|
935
|
-
<h3 class="signature first" id="generate_crl-instance_method">
|
936
|
-
|
937
|
-
- (<tt>String</tt>) <strong>generate_crl</strong>
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
</h3><div class="docstring">
|
944
|
-
<div class="discussion">
|
945
|
-
|
946
|
-
<p>Remove serial from revocation list</p>
|
947
|
-
|
948
|
-
|
949
|
-
</div>
|
950
|
-
</div>
|
951
|
-
<div class="tags">
|
952
|
-
|
953
|
-
<p class="tag_title">Returns:</p>
|
954
|
-
<ul class="return">
|
955
|
-
|
956
|
-
<li>
|
957
|
-
|
958
|
-
|
959
|
-
<span class='type'>(<tt>String</tt>)</span>
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
—
|
964
|
-
<div class='inline'>
|
965
|
-
<p>PEM encoded signed CRL</p>
|
966
|
-
</div>
|
967
|
-
|
968
|
-
</li>
|
969
|
-
|
970
|
-
</ul>
|
971
|
-
|
972
|
-
</div><table class="source_code">
|
973
|
-
<tr>
|
974
|
-
<td>
|
975
|
-
<pre class="lines">
|
976
|
-
|
977
|
-
|
978
|
-
258
|
979
|
-
259
|
980
|
-
260
|
981
|
-
261
|
982
|
-
262
|
983
|
-
263
|
984
|
-
264
|
985
|
-
265
|
986
|
-
266
|
987
|
-
267
|
988
|
-
268
|
989
|
-
269
|
990
|
-
270
|
991
|
-
271
|
992
|
-
272
|
993
|
-
273
|
994
|
-
274
|
995
|
-
275
|
996
|
-
276
|
997
|
-
277
|
998
|
-
278
|
999
|
-
279
|
1000
|
-
280
|
1001
|
-
281
|
1002
|
-
282
|
1003
|
-
283
|
1004
|
-
284
|
1005
|
-
285
|
1006
|
-
286
|
1007
|
-
287
|
1008
|
-
288
|
1009
|
-
289
|
1010
|
-
290
|
1011
|
-
291
|
1012
|
-
292
|
1013
|
-
293
|
1014
|
-
294</pre>
|
1015
|
-
</td>
|
1016
|
-
<td>
|
1017
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 258</span>
|
1018
|
-
|
1019
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_generate_crl'>generate_crl</span>
|
1020
|
-
<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>
|
1021
|
-
<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>
|
1022
|
-
<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>
|
1023
|
-
<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>
|
1024
|
-
<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>
|
1025
|
-
<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>
|
1026
|
-
|
1027
|
-
<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>
|
1028
|
-
<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>
|
1029
|
-
<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>
|
1030
|
-
<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>
|
1031
|
-
<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>
|
1032
|
-
<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
|
1033
|
-
</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>
|
1034
|
-
<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>
|
1035
|
-
<span class='kw'>end</span>
|
1036
|
-
<span class='comment'>#now add it to the crl
|
1037
|
-
</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>
|
1038
|
-
<span class='kw'>end</span>
|
1039
|
-
|
1040
|
-
<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>
|
1041
|
-
<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>
|
1042
|
-
<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>
|
1043
|
-
<span class='comment'>#grab crl number from file, increment, write back
|
1044
|
-
</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>
|
1045
|
-
<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>
|
1046
|
-
<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>
|
1047
|
-
<span class='id identifier rubyid_extensions'>extensions</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1048
|
-
<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>
|
1049
|
-
<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>
|
1050
|
-
<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>
|
1051
|
-
<span class='rbrace'>}</span>
|
1052
|
-
<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>
|
1053
|
-
<span class='ivar'>@crl</span> <span class='op'>=</span> <span class='id identifier rubyid_crl'>crl</span>
|
1054
|
-
<span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span>
|
1055
|
-
<span class='kw'>end</span></pre>
|
1056
|
-
</td>
|
1057
|
-
</tr>
|
1058
|
-
</table>
|
1059
|
-
</div>
|
1060
|
-
|
1061
|
-
<div class="method_details ">
|
1062
|
-
<h3 class="signature " id="last_update-instance_method">
|
1063
|
-
|
1064
|
-
- (<tt>Time</tt>) <strong>last_update</strong>
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
</h3><div class="docstring">
|
1071
|
-
<div class="discussion">
|
1072
|
-
|
1073
|
-
<p>Returns the signing time of the CRL</p>
|
1074
|
-
|
1075
|
-
|
1076
|
-
</div>
|
1077
|
-
</div>
|
1078
|
-
<div class="tags">
|
1079
|
-
|
1080
|
-
<p class="tag_title">Returns:</p>
|
1081
|
-
<ul class="return">
|
1082
|
-
|
1083
|
-
<li>
|
1084
|
-
|
1085
|
-
|
1086
|
-
<span class='type'>(<tt>Time</tt>)</span>
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
—
|
1091
|
-
<div class='inline'>
|
1092
|
-
<p>when the CRL was signed</p>
|
1093
|
-
</div>
|
1094
|
-
|
1095
|
-
</li>
|
1096
|
-
|
1097
|
-
</ul>
|
1098
|
-
|
1099
|
-
</div><table class="source_code">
|
1100
|
-
<tr>
|
1101
|
-
<td>
|
1102
|
-
<pre class="lines">
|
1103
|
-
|
1104
|
-
|
1105
|
-
196
|
1106
|
-
197
|
1107
|
-
198</pre>
|
1108
|
-
</td>
|
1109
|
-
<td>
|
1110
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 196</span>
|
1111
|
-
|
1112
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_last_update'>last_update</span>
|
1113
|
-
<span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_last_update'>last_update</span>
|
1114
|
-
<span class='kw'>end</span></pre>
|
1115
|
-
</td>
|
1116
|
-
</tr>
|
1117
|
-
</table>
|
1118
|
-
</div>
|
1119
|
-
|
1120
|
-
<div class="method_details ">
|
1121
|
-
<h3 class="signature " id="next_update-instance_method">
|
1122
|
-
|
1123
|
-
- (<tt>Time</tt>) <strong>next_update</strong>
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
</h3><div class="docstring">
|
1130
|
-
<div class="discussion">
|
1131
|
-
|
1132
|
-
<p>Returns the next update time for the CRL</p>
|
1133
|
-
|
1134
|
-
|
1135
|
-
</div>
|
1136
|
-
</div>
|
1137
|
-
<div class="tags">
|
1138
|
-
|
1139
|
-
<p class="tag_title">Returns:</p>
|
1140
|
-
<ul class="return">
|
1141
|
-
|
1142
|
-
<li>
|
1143
|
-
|
1144
|
-
|
1145
|
-
<span class='type'>(<tt>Time</tt>)</span>
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
—
|
1150
|
-
<div class='inline'>
|
1151
|
-
<p>when it will be updated next</p>
|
1152
|
-
</div>
|
1153
|
-
|
1154
|
-
</li>
|
1155
|
-
|
1156
|
-
</ul>
|
1157
|
-
|
1158
|
-
</div><table class="source_code">
|
1159
|
-
<tr>
|
1160
|
-
<td>
|
1161
|
-
<pre class="lines">
|
1162
|
-
|
1163
|
-
|
1164
|
-
203
|
1165
|
-
204
|
1166
|
-
205</pre>
|
1167
|
-
</td>
|
1168
|
-
<td>
|
1169
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 203</span>
|
1170
|
-
|
1171
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_next_update'>next_update</span>
|
1172
|
-
<span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_next_update'>next_update</span>
|
1173
|
-
<span class='kw'>end</span></pre>
|
1174
|
-
</td>
|
1175
|
-
</tr>
|
1176
|
-
</table>
|
1177
|
-
</div>
|
1178
|
-
|
1179
|
-
<div class="method_details ">
|
1180
|
-
<h3 class="signature " id="revoke_cert-instance_method">
|
1181
|
-
|
1182
|
-
- (<tt>Object</tt>) <strong>revoke_cert</strong>(serial, reason = nil, revoke_time = Time.now.to_i, generate_and_save = true)
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
</h3><div class="docstring">
|
1189
|
-
<div class="discussion">
|
1190
|
-
|
1191
|
-
<p>Adds a certificate to the revocation list. After calling you must call
|
1192
|
-
generate_crl to sign a new CRL</p>
|
1193
|
-
|
1194
|
-
|
1195
|
-
</div>
|
1196
|
-
</div>
|
1197
|
-
<div class="tags">
|
1198
|
-
<p class="tag_title">Parameters:</p>
|
1199
|
-
<ul class="param">
|
1200
|
-
|
1201
|
-
<li>
|
1202
|
-
|
1203
|
-
<span class='name'>serial</span>
|
1204
|
-
|
1205
|
-
|
1206
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
—
|
1211
|
-
<div class='inline'>
|
1212
|
-
<p>serial number of the certificate to revoke</p>
|
1213
|
-
</div>
|
1214
|
-
|
1215
|
-
</li>
|
1216
|
-
|
1217
|
-
<li>
|
1218
|
-
|
1219
|
-
<span class='name'>reason</span>
|
1220
|
-
|
1221
|
-
|
1222
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1223
|
-
|
1224
|
-
|
1225
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1226
|
-
|
1227
|
-
|
1228
|
-
—
|
1229
|
-
<div class='inline'>
|
1230
|
-
<p>reason for revocation</p>
|
1231
|
-
</div>
|
1232
|
-
|
1233
|
-
</li>
|
1234
|
-
|
1235
|
-
<li>
|
1236
|
-
|
1237
|
-
<span class='name'>revoke_time</span>
|
1238
|
-
|
1239
|
-
|
1240
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1241
|
-
|
1242
|
-
|
1243
|
-
<em class="default">(defaults to: <tt>Time.now.to_i</tt>)</em>
|
1244
|
-
|
1245
|
-
|
1246
|
-
</li>
|
1247
|
-
|
1248
|
-
<li>
|
1249
|
-
|
1250
|
-
<span class='name'>generate_and_save</span>
|
1251
|
-
|
1252
|
-
|
1253
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1254
|
-
|
1255
|
-
|
1256
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1257
|
-
|
1258
|
-
|
1259
|
-
—
|
1260
|
-
<div class='inline'>
|
1261
|
-
<p>whether we want to generate the CRL and save its file (default=true)</p>
|
1262
|
-
|
1263
|
-
<p>reason codes defined by rfc 5280</p>
|
1264
|
-
|
1265
|
-
<p>CRLReason ::= ENUMERATED {</p>
|
1266
|
-
|
1267
|
-
<pre class="code ruby"><code>unspecified (0),
|
1268
|
-
keyCompromise (1),
|
1269
|
-
cACompromise (2),
|
1270
|
-
affiliationChanged (3),
|
1271
|
-
superseded (4),
|
1272
|
-
cessationOfOperation (5),
|
1273
|
-
certificateHold (6),
|
1274
|
-
removeFromCRL (8),
|
1275
|
-
privilegeWithdrawn (9),
|
1276
|
-
aACompromise (10) }</code></pre>
|
1277
|
-
</div>
|
1278
|
-
|
1279
|
-
</li>
|
1280
|
-
|
1281
|
-
</ul>
|
1282
|
-
|
1283
|
-
|
1284
|
-
</div><table class="source_code">
|
1285
|
-
<tr>
|
1286
|
-
<td>
|
1287
|
-
<pre class="lines">
|
1288
|
-
|
1289
|
-
|
1290
|
-
227
|
1291
|
-
228
|
1292
|
-
229
|
1293
|
-
230
|
1294
|
-
231
|
1295
|
-
232
|
1296
|
-
233
|
1297
|
-
234
|
1298
|
-
235
|
1299
|
-
236
|
1300
|
-
237
|
1301
|
-
238
|
1302
|
-
239
|
1303
|
-
240
|
1304
|
-
241
|
1305
|
-
242
|
1306
|
-
243</pre>
|
1307
|
-
</td>
|
1308
|
-
<td>
|
1309
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 227</span>
|
1310
|
-
|
1311
|
-
<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>
|
1312
|
-
<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>
|
1313
|
-
<span class='id identifier rubyid_reason'>reason</span> <span class='op'>=</span> <span class='int'>0</span>
|
1314
|
-
<span class='kw'>end</span>
|
1315
|
-
<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>
|
1316
|
-
<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>
|
1317
|
-
<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>
|
1318
|
-
<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>
|
1319
|
-
<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>
|
1320
|
-
<span class='kw'>end</span>
|
1321
|
-
<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>
|
1322
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_generate_and_save'>generate_and_save</span>
|
1323
|
-
<span class='id identifier rubyid_generate_crl'>generate_crl</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1324
|
-
<span class='id identifier rubyid_save_crl_list'>save_crl_list</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1325
|
-
<span class='kw'>end</span>
|
1326
|
-
<span class='kw'>nil</span>
|
1327
|
-
<span class='kw'>end</span></pre>
|
1328
|
-
</td>
|
1329
|
-
</tr>
|
1330
|
-
</table>
|
1331
|
-
</div>
|
1332
|
-
|
1333
|
-
<div class="method_details ">
|
1334
|
-
<h3 class="signature " id="revoked?-instance_method">
|
1335
|
-
|
1336
|
-
- (<tt>Boolean</tt>) <strong>revoked?</strong>(serial)
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
</h3><div class="docstring">
|
1343
|
-
<div class="discussion">
|
1344
|
-
|
1345
|
-
<p>Indicates whether the serial number has been revoked, or not.</p>
|
1346
|
-
|
1347
|
-
|
1348
|
-
</div>
|
1349
|
-
</div>
|
1350
|
-
<div class="tags">
|
1351
|
-
<p class="tag_title">Parameters:</p>
|
1352
|
-
<ul class="param">
|
1353
|
-
|
1354
|
-
<li>
|
1355
|
-
|
1356
|
-
<span class='name'>serial</span>
|
1357
|
-
|
1358
|
-
|
1359
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
—
|
1364
|
-
<div class='inline'>
|
1365
|
-
<p>The serial number we want to check</p>
|
1366
|
-
</div>
|
1367
|
-
|
1368
|
-
</li>
|
1369
|
-
|
1370
|
-
</ul>
|
1371
|
-
|
1372
|
-
<p class="tag_title">Returns:</p>
|
1373
|
-
<ul class="return">
|
1374
|
-
|
1375
|
-
<li>
|
1376
|
-
|
1377
|
-
|
1378
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
—
|
1383
|
-
<div class='inline'>
|
1384
|
-
<p>True if the serial number was revoked. False, otherwise.</p>
|
1385
|
-
</div>
|
1386
|
-
|
1387
|
-
</li>
|
1388
|
-
|
1389
|
-
</ul>
|
1390
|
-
|
1391
|
-
</div><table class="source_code">
|
1392
|
-
<tr>
|
1393
|
-
<td>
|
1394
|
-
<pre class="lines">
|
1395
|
-
|
1396
|
-
|
1397
|
-
146
|
1398
|
-
147
|
1399
|
-
148</pre>
|
1400
|
-
</td>
|
1401
|
-
<td>
|
1402
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 146</span>
|
1403
|
-
|
1404
|
-
<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>
|
1405
|
-
<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>
|
1406
|
-
<span class='kw'>end</span></pre>
|
1407
|
-
</td>
|
1408
|
-
</tr>
|
1409
|
-
</table>
|
1410
|
-
</div>
|
1411
|
-
|
1412
|
-
<div class="method_details ">
|
1413
|
-
<h3 class="signature " id="revoked_cert-instance_method">
|
1414
|
-
|
1415
|
-
- (<tt>Array</tt>) <strong>revoked_cert</strong>(serial)
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
</h3><div class="docstring">
|
1422
|
-
<div class="discussion">
|
1423
|
-
|
1424
|
-
<p>Serial, reason, revoke_time tuple</p>
|
1425
|
-
|
1426
|
-
|
1427
|
-
</div>
|
1428
|
-
</div>
|
1429
|
-
<div class="tags">
|
1430
|
-
|
1431
|
-
<p class="tag_title">Returns:</p>
|
1432
|
-
<ul class="return">
|
1433
|
-
|
1434
|
-
<li>
|
1435
|
-
|
1436
|
-
|
1437
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
—
|
1442
|
-
<div class='inline'>
|
1443
|
-
<p>serial, reason, revoke_time tuple</p>
|
1444
|
-
</div>
|
1445
|
-
|
1446
|
-
</li>
|
1447
|
-
|
1448
|
-
</ul>
|
1449
|
-
|
1450
|
-
</div><table class="source_code">
|
1451
|
-
<tr>
|
1452
|
-
<td>
|
1453
|
-
<pre class="lines">
|
1454
|
-
|
1455
|
-
|
1456
|
-
151
|
1457
|
-
152
|
1458
|
-
153</pre>
|
1459
|
-
</td>
|
1460
|
-
<td>
|
1461
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 151</span>
|
1462
|
-
|
1463
|
-
<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>
|
1464
|
-
<span class='ivar'>@revoked_certs</span><span class='lbracket'>[</span><span class='id identifier rubyid_serial'>serial</span><span class='rbracket'>]</span>
|
1465
|
-
<span class='kw'>end</span></pre>
|
1466
|
-
</td>
|
1467
|
-
</tr>
|
1468
|
-
</table>
|
1469
|
-
</div>
|
1470
|
-
|
1471
|
-
<div class="method_details ">
|
1472
|
-
<h3 class="signature " id="revoked_certs-instance_method">
|
1473
|
-
|
1474
|
-
- (<tt>Array<Array></tt>) <strong>revoked_certs</strong>
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
</h3><div class="docstring">
|
1481
|
-
<div class="discussion">
|
1482
|
-
|
1483
|
-
<p>Returns an array of serial, reason, revoke_time tuples.</p>
|
1484
|
-
|
1485
|
-
|
1486
|
-
</div>
|
1487
|
-
</div>
|
1488
|
-
<div class="tags">
|
1489
|
-
|
1490
|
-
<p class="tag_title">Returns:</p>
|
1491
|
-
<ul class="return">
|
1492
|
-
|
1493
|
-
<li>
|
1494
|
-
|
1495
|
-
|
1496
|
-
<span class='type'>(<tt>Array<Array></tt>)</span>
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
—
|
1501
|
-
<div class='inline'>
|
1502
|
-
<p>Returns an array of serial, reason, revoke_time tuples.</p>
|
1503
|
-
</div>
|
1504
|
-
|
1505
|
-
</li>
|
1506
|
-
|
1507
|
-
</ul>
|
1508
|
-
|
1509
|
-
</div><table class="source_code">
|
1510
|
-
<tr>
|
1511
|
-
<td>
|
1512
|
-
<pre class="lines">
|
1513
|
-
|
1514
|
-
|
1515
|
-
298
|
1516
|
-
299
|
1517
|
-
300
|
1518
|
-
301
|
1519
|
-
302
|
1520
|
-
303
|
1521
|
-
304</pre>
|
1522
|
-
</td>
|
1523
|
-
<td>
|
1524
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 298</span>
|
1525
|
-
|
1526
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_revoked_certs'>revoked_certs</span>
|
1527
|
-
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1528
|
-
<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>
|
1529
|
-
<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>
|
1530
|
-
<span class='kw'>end</span>
|
1531
|
-
<span class='id identifier rubyid_ret'>ret</span>
|
1532
|
-
<span class='kw'>end</span></pre>
|
1533
|
-
</td>
|
1534
|
-
</tr>
|
1535
|
-
</table>
|
1536
|
-
</div>
|
1537
|
-
|
1538
|
-
<div class="method_details ">
|
1539
|
-
<h3 class="signature " id="save_crl_list-instance_method">
|
1540
|
-
|
1541
|
-
- (<tt>Object</tt>) <strong>save_crl_list</strong>(filename_or_io = @crl_list_file)
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
</h3><div class="docstring">
|
1548
|
-
<div class="discussion">
|
1549
|
-
|
1550
|
-
<p>Saves the CRL list to a filename or IO. If the class was initialized with
|
1551
|
-
:crl_list_file, then the filename specified by that will be used by
|
1552
|
-
default.</p>
|
1553
|
-
|
1554
|
-
|
1555
|
-
</div>
|
1556
|
-
</div>
|
1557
|
-
<div class="tags">
|
1558
|
-
<p class="tag_title">Parameters:</p>
|
1559
|
-
<ul class="param">
|
1560
|
-
|
1561
|
-
<li>
|
1562
|
-
|
1563
|
-
<span class='name'>filename_or_io</span>
|
1564
|
-
|
1565
|
-
|
1566
|
-
<span class='type'>(<tt>String</tt>, <tt>#write</tt>, <tt>nil</tt>)</span>
|
1567
|
-
|
1568
|
-
|
1569
|
-
<em class="default">(defaults to: <tt>@crl_list_file</tt>)</em>
|
1570
|
-
|
1571
|
-
|
1572
|
-
—
|
1573
|
-
<div class='inline'>
|
1574
|
-
<p>If provided, the generated crl will be written to either the file (if a
|
1575
|
-
string), or IO. If nil, then the @crl_list_file will be used. If that is
|
1576
|
-
nil, then an error will be raised.</p>
|
1577
|
-
</div>
|
1578
|
-
|
1579
|
-
</li>
|
1580
|
-
|
1581
|
-
</ul>
|
1582
|
-
|
1583
|
-
|
1584
|
-
</div><table class="source_code">
|
1585
|
-
<tr>
|
1586
|
-
<td>
|
1587
|
-
<pre class="lines">
|
1588
|
-
|
1589
|
-
|
1590
|
-
313
|
1591
|
-
314
|
1592
|
-
315
|
1593
|
-
316
|
1594
|
-
317
|
1595
|
-
318
|
1596
|
-
319
|
1597
|
-
320
|
1598
|
-
321
|
1599
|
-
322</pre>
|
1600
|
-
</td>
|
1601
|
-
<td>
|
1602
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 313</span>
|
1603
|
-
|
1604
|
-
<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>
|
1605
|
-
<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>
|
1606
|
-
|
1607
|
-
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1608
|
-
<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>
|
1609
|
-
<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>
|
1610
|
-
<span class='kw'>end</span>
|
1611
|
-
<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>
|
1612
|
-
<span class='kw'>nil</span>
|
1613
|
-
<span class='kw'>end</span></pre>
|
1614
|
-
</td>
|
1615
|
-
</tr>
|
1616
|
-
</table>
|
1617
|
-
</div>
|
1618
|
-
|
1619
|
-
<div class="method_details ">
|
1620
|
-
<h3 class="signature " id="save_crl_number-instance_method">
|
1621
|
-
|
1622
|
-
- (<tt>Object</tt>) <strong>save_crl_number</strong>(filename_or_io = @crl_number_file)
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
</h3><div class="docstring">
|
1629
|
-
<div class="discussion">
|
1630
|
-
|
1631
|
-
<p>Save the CRL number to a filename or IO. If the class was initialized with
|
1632
|
-
:crl_number_file, then the filename specified by that will be used by
|
1633
|
-
default.</p>
|
1634
|
-
|
1635
|
-
|
1636
|
-
</div>
|
1637
|
-
</div>
|
1638
|
-
<div class="tags">
|
1639
|
-
<p class="tag_title">Parameters:</p>
|
1640
|
-
<ul class="param">
|
1641
|
-
|
1642
|
-
<li>
|
1643
|
-
|
1644
|
-
<span class='name'>filename_or_io</span>
|
1645
|
-
|
1646
|
-
|
1647
|
-
<span class='type'>(<tt>String</tt>, <tt>#write</tt>, <tt>nil</tt>)</span>
|
1648
|
-
|
1649
|
-
|
1650
|
-
<em class="default">(defaults to: <tt>@crl_number_file</tt>)</em>
|
1651
|
-
|
1652
|
-
|
1653
|
-
—
|
1654
|
-
<div class='inline'>
|
1655
|
-
<p>If provided, the current crl number will be written to either the file (if
|
1656
|
-
a string), or IO. If nil, then the @crl_number_file will be used. If that
|
1657
|
-
is nil, then an error will be raised.</p>
|
1658
|
-
</div>
|
1659
|
-
|
1660
|
-
</li>
|
1661
|
-
|
1662
|
-
</ul>
|
1663
|
-
|
1664
|
-
|
1665
|
-
</div><table class="source_code">
|
1666
|
-
<tr>
|
1667
|
-
<td>
|
1668
|
-
<pre class="lines">
|
1669
|
-
|
1670
|
-
|
1671
|
-
331
|
1672
|
-
332
|
1673
|
-
333
|
1674
|
-
334
|
1675
|
-
335
|
1676
|
-
336
|
1677
|
-
337</pre>
|
1678
|
-
</td>
|
1679
|
-
<td>
|
1680
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 331</span>
|
1681
|
-
|
1682
|
-
<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>
|
1683
|
-
<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>
|
1684
|
-
<span class='comment'># No valid filename or IO was specified, so bail.
|
1685
|
-
</span>
|
1686
|
-
<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>
|
1687
|
-
<span class='kw'>nil</span>
|
1688
|
-
<span class='kw'>end</span></pre>
|
1689
|
-
</td>
|
1690
|
-
</tr>
|
1691
|
-
</table>
|
1692
|
-
</div>
|
1693
|
-
|
1694
|
-
<div class="method_details ">
|
1695
|
-
<h3 class="signature " id="to_crl-instance_method">
|
1696
|
-
|
1697
|
-
- (<tt><span class='object_link'><a href="Parser.html" title="R509::Crl::Parser (class)">R509::Crl::Parser</a></span></tt>) <strong>to_crl</strong>
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
</h3><div class="docstring">
|
1704
|
-
<div class="discussion">
|
1705
|
-
|
1706
|
-
|
1707
|
-
</div>
|
1708
|
-
</div>
|
1709
|
-
<div class="tags">
|
1710
|
-
|
1711
|
-
<p class="tag_title">Returns:</p>
|
1712
|
-
<ul class="return">
|
1713
|
-
|
1714
|
-
<li>
|
1715
|
-
|
1716
|
-
|
1717
|
-
<span class='type'>(<tt><span class='object_link'><a href="Parser.html" title="R509::Crl::Parser (class)">R509::Crl::Parser</a></span></tt>)</span>
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
</li>
|
1722
|
-
|
1723
|
-
</ul>
|
1724
|
-
|
1725
|
-
</div><table class="source_code">
|
1726
|
-
<tr>
|
1727
|
-
<td>
|
1728
|
-
<pre class="lines">
|
1729
|
-
|
1730
|
-
|
1731
|
-
172
|
1732
|
-
173
|
1733
|
-
174
|
1734
|
-
175</pre>
|
1735
|
-
</td>
|
1736
|
-
<td>
|
1737
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 172</span>
|
1738
|
-
|
1739
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_crl'>to_crl</span>
|
1740
|
-
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1741
|
-
<span class='kw'>return</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Crl</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@crl</span><span class='rparen'>)</span>
|
1742
|
-
<span class='kw'>end</span></pre>
|
1743
|
-
</td>
|
1744
|
-
</tr>
|
1745
|
-
</table>
|
1746
|
-
</div>
|
1747
|
-
|
1748
|
-
<div class="method_details ">
|
1749
|
-
<h3 class="signature " id="to_der-instance_method">
|
1750
|
-
|
1751
|
-
- (<tt>String</tt>) <strong>to_der</strong>
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
</h3><div class="docstring">
|
1758
|
-
<div class="discussion">
|
1759
|
-
|
1760
|
-
<p>Returns the CRL in DER format</p>
|
1761
|
-
|
1762
|
-
|
1763
|
-
</div>
|
1764
|
-
</div>
|
1765
|
-
<div class="tags">
|
1766
|
-
|
1767
|
-
<p class="tag_title">Returns:</p>
|
1768
|
-
<ul class="return">
|
1769
|
-
|
1770
|
-
<li>
|
1771
|
-
|
1772
|
-
|
1773
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
—
|
1778
|
-
<div class='inline'>
|
1779
|
-
<p>the CRL in DER format</p>
|
1780
|
-
</div>
|
1781
|
-
|
1782
|
-
</li>
|
1783
|
-
|
1784
|
-
</ul>
|
1785
|
-
|
1786
|
-
</div><table class="source_code">
|
1787
|
-
<tr>
|
1788
|
-
<td>
|
1789
|
-
<pre class="lines">
|
1790
|
-
|
1791
|
-
|
1792
|
-
167
|
1793
|
-
168
|
1794
|
-
169</pre>
|
1795
|
-
</td>
|
1796
|
-
<td>
|
1797
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 167</span>
|
1798
|
-
|
1799
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_der'>to_der</span>
|
1800
|
-
<span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span>
|
1801
|
-
<span class='kw'>end</span></pre>
|
1802
|
-
</td>
|
1803
|
-
</tr>
|
1804
|
-
</table>
|
1805
|
-
</div>
|
1806
|
-
|
1807
|
-
<div class="method_details ">
|
1808
|
-
<h3 class="signature " id="to_pem-instance_method">
|
1809
|
-
|
1810
|
-
- (<tt>String</tt>) <strong>to_pem</strong>
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
<span class="aliases">Also known as:
|
1815
|
-
<span class="names"><span id='to_s-instance_method'>to_s</span></span>
|
1816
|
-
</span>
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
</h3><div class="docstring">
|
1821
|
-
<div class="discussion">
|
1822
|
-
|
1823
|
-
<p>Returns the CRL in PEM format</p>
|
1824
|
-
|
1825
|
-
|
1826
|
-
</div>
|
1827
|
-
</div>
|
1828
|
-
<div class="tags">
|
1829
|
-
|
1830
|
-
<p class="tag_title">Returns:</p>
|
1831
|
-
<ul class="return">
|
1832
|
-
|
1833
|
-
<li>
|
1834
|
-
|
1835
|
-
|
1836
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
—
|
1841
|
-
<div class='inline'>
|
1842
|
-
<p>the CRL in PEM format</p>
|
1843
|
-
</div>
|
1844
|
-
|
1845
|
-
</li>
|
1846
|
-
|
1847
|
-
</ul>
|
1848
|
-
|
1849
|
-
</div><table class="source_code">
|
1850
|
-
<tr>
|
1851
|
-
<td>
|
1852
|
-
<pre class="lines">
|
1853
|
-
|
1854
|
-
|
1855
|
-
158
|
1856
|
-
159
|
1857
|
-
160</pre>
|
1858
|
-
</td>
|
1859
|
-
<td>
|
1860
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 158</span>
|
1861
|
-
|
1862
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_pem'>to_pem</span>
|
1863
|
-
<span class='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span>
|
1864
|
-
<span class='kw'>end</span></pre>
|
1865
|
-
</td>
|
1866
|
-
</tr>
|
1867
|
-
</table>
|
1868
|
-
</div>
|
1869
|
-
|
1870
|
-
<div class="method_details ">
|
1871
|
-
<h3 class="signature " id="unrevoke_cert-instance_method">
|
1872
|
-
|
1873
|
-
- (<tt>Object</tt>) <strong>unrevoke_cert</strong>(serial)
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
</h3><div class="docstring">
|
1880
|
-
<div class="discussion">
|
1881
|
-
|
1882
|
-
<p>Remove serial from revocation list. After unrevoking you must call
|
1883
|
-
generate_crl to sign a new CRL</p>
|
1884
|
-
|
1885
|
-
|
1886
|
-
</div>
|
1887
|
-
</div>
|
1888
|
-
<div class="tags">
|
1889
|
-
<p class="tag_title">Parameters:</p>
|
1890
|
-
<ul class="param">
|
1891
|
-
|
1892
|
-
<li>
|
1893
|
-
|
1894
|
-
<span class='name'>serial</span>
|
1895
|
-
|
1896
|
-
|
1897
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
—
|
1902
|
-
<div class='inline'>
|
1903
|
-
<p>serial number of the certificate to remove from revocation</p>
|
1904
|
-
</div>
|
1905
|
-
|
1906
|
-
</li>
|
1907
|
-
|
1908
|
-
</ul>
|
1909
|
-
|
1910
|
-
|
1911
|
-
</div><table class="source_code">
|
1912
|
-
<tr>
|
1913
|
-
<td>
|
1914
|
-
<pre class="lines">
|
1915
|
-
|
1916
|
-
|
1917
|
-
248
|
1918
|
-
249
|
1919
|
-
250
|
1920
|
-
251
|
1921
|
-
252
|
1922
|
-
253</pre>
|
1923
|
-
</td>
|
1924
|
-
<td>
|
1925
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 248</span>
|
1926
|
-
|
1927
|
-
<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>
|
1928
|
-
<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>
|
1929
|
-
<span class='id identifier rubyid_generate_crl'>generate_crl</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1930
|
-
<span class='id identifier rubyid_save_crl_list'>save_crl_list</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1931
|
-
<span class='kw'>nil</span>
|
1932
|
-
<span class='kw'>end</span></pre>
|
1933
|
-
</td>
|
1934
|
-
</tr>
|
1935
|
-
</table>
|
1936
|
-
</div>
|
1937
|
-
|
1938
|
-
<div class="method_details ">
|
1939
|
-
<h3 class="signature " id="write_der-instance_method">
|
1940
|
-
|
1941
|
-
- (<tt>Object</tt>) <strong>write_der</strong>(filename_or_io)
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
</h3><div class="docstring">
|
1948
|
-
<div class="discussion">
|
1949
|
-
|
1950
|
-
<p>Writes the CRL into the PEM format</p>
|
1951
|
-
|
1952
|
-
|
1953
|
-
</div>
|
1954
|
-
</div>
|
1955
|
-
<div class="tags">
|
1956
|
-
<p class="tag_title">Parameters:</p>
|
1957
|
-
<ul class="param">
|
1958
|
-
|
1959
|
-
<li>
|
1960
|
-
|
1961
|
-
<span class='name'>filename_or_io</span>
|
1962
|
-
|
1963
|
-
|
1964
|
-
<span class='type'>(<tt>String</tt>, <tt>#write</tt>)</span>
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
—
|
1969
|
-
<div class='inline'>
|
1970
|
-
<p>Either a string of the path for the file that you'd like to write, or an
|
1971
|
-
IO-like object.</p>
|
1972
|
-
</div>
|
1973
|
-
|
1974
|
-
</li>
|
1975
|
-
|
1976
|
-
</ul>
|
1977
|
-
|
1978
|
-
|
1979
|
-
</div><table class="source_code">
|
1980
|
-
<tr>
|
1981
|
-
<td>
|
1982
|
-
<pre class="lines">
|
1983
|
-
|
1984
|
-
|
1985
|
-
189
|
1986
|
-
190
|
1987
|
-
191</pre>
|
1988
|
-
</td>
|
1989
|
-
<td>
|
1990
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 189</span>
|
1991
|
-
|
1992
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_write_der'>write_der</span><span class='lparen'>(</span><span class='id identifier rubyid_filename_or_io'>filename_or_io</span><span class='rparen'>)</span>
|
1993
|
-
<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='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span><span class='rparen'>)</span>
|
1994
|
-
<span class='kw'>end</span></pre>
|
1995
|
-
</td>
|
1996
|
-
</tr>
|
1997
|
-
</table>
|
1998
|
-
</div>
|
1999
|
-
|
2000
|
-
<div class="method_details ">
|
2001
|
-
<h3 class="signature " id="write_pem-instance_method">
|
2002
|
-
|
2003
|
-
- (<tt>Object</tt>) <strong>write_pem</strong>(filename_or_io)
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
</h3><div class="docstring">
|
2010
|
-
<div class="discussion">
|
2011
|
-
|
2012
|
-
<p>Writes the CRL into the PEM format</p>
|
2013
|
-
|
2014
|
-
|
2015
|
-
</div>
|
2016
|
-
</div>
|
2017
|
-
<div class="tags">
|
2018
|
-
<p class="tag_title">Parameters:</p>
|
2019
|
-
<ul class="param">
|
2020
|
-
|
2021
|
-
<li>
|
2022
|
-
|
2023
|
-
<span class='name'>filename_or_io</span>
|
2024
|
-
|
2025
|
-
|
2026
|
-
<span class='type'>(<tt>String</tt>, <tt>#write</tt>)</span>
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
—
|
2031
|
-
<div class='inline'>
|
2032
|
-
<p>Either a string of the path for the file that you'd like to write, or an
|
2033
|
-
IO-like object.</p>
|
2034
|
-
</div>
|
2035
|
-
|
2036
|
-
</li>
|
2037
|
-
|
2038
|
-
</ul>
|
2039
|
-
|
2040
|
-
|
2041
|
-
</div><table class="source_code">
|
2042
|
-
<tr>
|
2043
|
-
<td>
|
2044
|
-
<pre class="lines">
|
2045
|
-
|
2046
|
-
|
2047
|
-
181
|
2048
|
-
182
|
2049
|
-
183</pre>
|
2050
|
-
</td>
|
2051
|
-
<td>
|
2052
|
-
<pre class="code"><span class="info file"># File 'lib/r509/crl.rb', line 181</span>
|
2053
|
-
|
2054
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_write_pem'>write_pem</span><span class='lparen'>(</span><span class='id identifier rubyid_filename_or_io'>filename_or_io</span><span class='rparen'>)</span>
|
2055
|
-
<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='ivar'>@crl</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span><span class='rparen'>)</span>
|
2056
|
-
<span class='kw'>end</span></pre>
|
2057
|
-
</td>
|
2058
|
-
</tr>
|
2059
|
-
</table>
|
2060
|
-
</div>
|
2061
|
-
|
2062
|
-
</div>
|
2063
|
-
|
2064
|
-
</div>
|
2065
|
-
|
2066
|
-
<div id="footer">
|
2067
|
-
Generated on Thu Nov 8 14:19:25 2012 by
|
2068
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2069
|
-
0.8.2.1 (ruby-1.9.3).
|
2070
|
-
</div>
|
2071
|
-
|
2072
|
-
</body>
|
2073
|
-
</html>
|