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
data/doc/R509/Cert.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: R509::Cert
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -159,6 +159,35 @@
|
|
159
159
|
<p>Returns the value of attribute cert.</p>
|
160
160
|
</div></span>
|
161
161
|
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#issuer-instance_method" title="#issuer (instance method)">- (Object) <strong>issuer</strong> </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<span class="note title readonly">readonly</span>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<span class="summary_desc"><div class='inline'>
|
188
|
+
<p>Returns the value of attribute issuer.</p>
|
189
|
+
</div></span>
|
190
|
+
|
162
191
|
</li>
|
163
192
|
|
164
193
|
|
@@ -188,6 +217,35 @@
|
|
188
217
|
<p>Returns the value of attribute key.</p>
|
189
218
|
</div></span>
|
190
219
|
|
220
|
+
</li>
|
221
|
+
|
222
|
+
|
223
|
+
<li class="public ">
|
224
|
+
<span class="summary_signature">
|
225
|
+
|
226
|
+
<a href="#subject-instance_method" title="#subject (instance method)">- (Object) <strong>subject</strong> </a>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
</span>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<span class="note title readonly">readonly</span>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
<span class="summary_desc"><div class='inline'>
|
246
|
+
<p>Returns the value of attribute subject.</p>
|
247
|
+
</div></span>
|
248
|
+
|
191
249
|
</li>
|
192
250
|
|
193
251
|
|
@@ -240,10 +298,36 @@
|
|
240
298
|
<li class="public ">
|
241
299
|
<span class="summary_signature">
|
242
300
|
|
301
|
+
<a href="#all_names-instance_method" title="#all_names (instance method)">- (Array) <strong>all_names</strong> </a>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
</span>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<span class="summary_desc"><div class='inline'>
|
316
|
+
<p>Return the CN, as well as all the subject alternative names (SANs).</p>
|
317
|
+
</div></span>
|
318
|
+
|
319
|
+
</li>
|
320
|
+
|
321
|
+
|
322
|
+
<li class="public ">
|
323
|
+
<span class="summary_signature">
|
324
|
+
|
243
325
|
<a href="#authority_info_access-instance_method" title="#authority_info_access (instance method)">- (R509::Cert::Extensions::AuthorityInfoAccess) <strong>authority_info_access</strong> </a>
|
244
326
|
|
245
327
|
|
246
328
|
|
329
|
+
(also: #aia)
|
330
|
+
|
247
331
|
</span>
|
248
332
|
|
249
333
|
|
@@ -337,7 +421,7 @@ extension.</p>
|
|
337
421
|
<li class="public ">
|
338
422
|
<span class="summary_signature">
|
339
423
|
|
340
|
-
<a href="#
|
424
|
+
<a href="#certificate_policies-instance_method" title="#certificate_policies (instance method)">- (R509::Cert::Extensions::CertificatePolicies) <strong>certificate_policies</strong> </a>
|
341
425
|
|
342
426
|
|
343
427
|
|
@@ -352,7 +436,7 @@ extension.</p>
|
|
352
436
|
|
353
437
|
|
354
438
|
<span class="summary_desc"><div class='inline'>
|
355
|
-
<p>Returns this object's
|
439
|
+
<p>Returns this object's CertificatePolicies extension as an R509 extension.</p>
|
356
440
|
</div></span>
|
357
441
|
|
358
442
|
</li>
|
@@ -361,10 +445,12 @@ extension.</p>
|
|
361
445
|
<li class="public ">
|
362
446
|
<span class="summary_signature">
|
363
447
|
|
364
|
-
<a href="#
|
448
|
+
<a href="#crl_distribution_points-instance_method" title="#crl_distribution_points (instance method)">- (R509::Cert::Extensions::CRLDistributionPoints) <strong>crl_distribution_points</strong> </a>
|
365
449
|
|
366
450
|
|
367
451
|
|
452
|
+
(also: #cdp)
|
453
|
+
|
368
454
|
</span>
|
369
455
|
|
370
456
|
|
@@ -376,7 +462,7 @@ extension.</p>
|
|
376
462
|
|
377
463
|
|
378
464
|
<span class="summary_desc"><div class='inline'>
|
379
|
-
<p>Returns
|
465
|
+
<p>Returns this object's CRLDistributionPoints extension as an R509 extension.</p>
|
380
466
|
</div></span>
|
381
467
|
|
382
468
|
</li>
|
@@ -385,7 +471,7 @@ extension.</p>
|
|
385
471
|
<li class="public ">
|
386
472
|
<span class="summary_signature">
|
387
473
|
|
388
|
-
<a href="#
|
474
|
+
<a href="#curve_name-instance_method" title="#curve_name (instance method)">- (String) <strong>curve_name</strong> </a>
|
389
475
|
|
390
476
|
|
391
477
|
|
@@ -400,7 +486,8 @@ extension.</p>
|
|
400
486
|
|
401
487
|
|
402
488
|
<span class="summary_desc"><div class='inline'>
|
403
|
-
<p>Returns
|
489
|
+
<p>Returns the short name of the elliptic curve used to generate the public
|
490
|
+
key if the key is EC.</p>
|
404
491
|
</div></span>
|
405
492
|
|
406
493
|
</li>
|
@@ -409,7 +496,7 @@ extension.</p>
|
|
409
496
|
<li class="public ">
|
410
497
|
<span class="summary_signature">
|
411
498
|
|
412
|
-
<a href="#
|
499
|
+
<a href="#dsa%3F-instance_method" title="#dsa? (instance method)">- (Boolean) <strong>dsa?</strong> </a>
|
413
500
|
|
414
501
|
|
415
502
|
|
@@ -424,7 +511,7 @@ extension.</p>
|
|
424
511
|
|
425
512
|
|
426
513
|
<span class="summary_desc"><div class='inline'>
|
427
|
-
<p>
|
514
|
+
<p>Returns whether the public key is DSA.</p>
|
428
515
|
</div></span>
|
429
516
|
|
430
517
|
</li>
|
@@ -433,7 +520,7 @@ extension.</p>
|
|
433
520
|
<li class="public ">
|
434
521
|
<span class="summary_signature">
|
435
522
|
|
436
|
-
<a href="#
|
523
|
+
<a href="#ec%3F-instance_method" title="#ec? (instance method)">- (Boolean) <strong>ec?</strong> </a>
|
437
524
|
|
438
525
|
|
439
526
|
|
@@ -448,8 +535,7 @@ extension.</p>
|
|
448
535
|
|
449
536
|
|
450
537
|
<span class="summary_desc"><div class='inline'>
|
451
|
-
<p>Returns the
|
452
|
-
sha1).</p>
|
538
|
+
<p>Returns whether the public key is EC.</p>
|
453
539
|
</div></span>
|
454
540
|
|
455
541
|
</li>
|
@@ -458,10 +544,12 @@ sha1).</p>
|
|
458
544
|
<li class="public ">
|
459
545
|
<span class="summary_signature">
|
460
546
|
|
461
|
-
<a href="#
|
547
|
+
<a href="#extended_key_usage-instance_method" title="#extended_key_usage (instance method)">- (R509::Cert::Extensions::ExtendedKeyUsage) <strong>extended_key_usage</strong> </a>
|
462
548
|
|
463
549
|
|
464
550
|
|
551
|
+
(also: #eku)
|
552
|
+
|
465
553
|
</span>
|
466
554
|
|
467
555
|
|
@@ -473,7 +561,7 @@ sha1).</p>
|
|
473
561
|
|
474
562
|
|
475
563
|
<span class="summary_desc"><div class='inline'>
|
476
|
-
<p>
|
564
|
+
<p>Returns this object's ExtendedKeyUsage extension as an R509 extension.</p>
|
477
565
|
</div></span>
|
478
566
|
|
479
567
|
</li>
|
@@ -482,15 +570,13 @@ sha1).</p>
|
|
482
570
|
<li class="public ">
|
483
571
|
<span class="summary_signature">
|
484
572
|
|
485
|
-
<a href="#
|
573
|
+
<a href="#extensions-instance_method" title="#extensions (instance method)">- (Hash) <strong>extensions</strong> </a>
|
486
574
|
|
487
575
|
|
488
576
|
|
489
577
|
</span>
|
490
578
|
|
491
579
|
|
492
|
-
<span class="note title constructor">constructor</span>
|
493
|
-
|
494
580
|
|
495
581
|
|
496
582
|
|
@@ -499,7 +585,8 @@ sha1).</p>
|
|
499
585
|
|
500
586
|
|
501
587
|
<span class="summary_desc"><div class='inline'>
|
502
|
-
<p>
|
588
|
+
<p>Returns the certificate extensions as a hash of R509::Cert::Extensions
|
589
|
+
specific objects.</p>
|
503
590
|
</div></span>
|
504
591
|
|
505
592
|
</li>
|
@@ -508,7 +595,7 @@ sha1).</p>
|
|
508
595
|
<li class="public ">
|
509
596
|
<span class="summary_signature">
|
510
597
|
|
511
|
-
<a href="#
|
598
|
+
<a href="#fingerprint-instance_method" title="#fingerprint (instance method)">- (String) <strong>fingerprint</strong>(algorithm = 'sha1') </a>
|
512
599
|
|
513
600
|
|
514
601
|
|
@@ -523,7 +610,8 @@ sha1).</p>
|
|
523
610
|
|
524
611
|
|
525
612
|
<span class="summary_desc"><div class='inline'>
|
526
|
-
<p>
|
613
|
+
<p>Returns the certificate fingerprint with the specified algorithm (default
|
614
|
+
sha1).</p>
|
527
615
|
</div></span>
|
528
616
|
|
529
617
|
</li>
|
@@ -532,7 +620,7 @@ sha1).</p>
|
|
532
620
|
<li class="public ">
|
533
621
|
<span class="summary_signature">
|
534
622
|
|
535
|
-
<a href="#
|
623
|
+
<a href="#has_private_key%3F-instance_method" title="#has_private_key? (instance method)">- (Boolean) <strong>has_private_key?</strong> </a>
|
536
624
|
|
537
625
|
|
538
626
|
|
@@ -547,7 +635,7 @@ sha1).</p>
|
|
547
635
|
|
548
636
|
|
549
637
|
<span class="summary_desc"><div class='inline'>
|
550
|
-
<p>
|
638
|
+
<p>Boolean of whether the object contains a private key.</p>
|
551
639
|
</div></span>
|
552
640
|
|
553
641
|
</li>
|
@@ -556,7 +644,7 @@ sha1).</p>
|
|
556
644
|
<li class="public ">
|
557
645
|
<span class="summary_signature">
|
558
646
|
|
559
|
-
<a href="#
|
647
|
+
<a href="#hexserial-instance_method" title="#hexserial (instance method)">- (String) <strong>hexserial</strong> </a>
|
560
648
|
|
561
649
|
|
562
650
|
|
@@ -571,7 +659,7 @@ sha1).</p>
|
|
571
659
|
|
572
660
|
|
573
661
|
<span class="summary_desc"><div class='inline'>
|
574
|
-
<p>
|
662
|
+
<p>Returns the serial number of the certificate in hexadecimal form.</p>
|
575
663
|
</div></span>
|
576
664
|
|
577
665
|
</li>
|
@@ -580,7 +668,7 @@ sha1).</p>
|
|
580
668
|
<li class="public ">
|
581
669
|
<span class="summary_signature">
|
582
670
|
|
583
|
-
<a href="#
|
671
|
+
<a href="#inhibit_any_policy-instance_method" title="#inhibit_any_policy (instance method)">- (R509::Cert::Extensions::InhibitAnyPolicy) <strong>inhibit_any_policy</strong> </a>
|
584
672
|
|
585
673
|
|
586
674
|
|
@@ -595,7 +683,7 @@ sha1).</p>
|
|
595
683
|
|
596
684
|
|
597
685
|
<span class="summary_desc"><div class='inline'>
|
598
|
-
<p>Returns
|
686
|
+
<p>Returns this object's InhibitAnyPolicy extension as an R509 extension.</p>
|
599
687
|
</div></span>
|
600
688
|
|
601
689
|
</li>
|
@@ -604,13 +692,15 @@ sha1).</p>
|
|
604
692
|
<li class="public ">
|
605
693
|
<span class="summary_signature">
|
606
694
|
|
607
|
-
<a href="#
|
695
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Cert) <strong>initialize</strong>(opts = {}) </a>
|
608
696
|
|
609
697
|
|
610
698
|
|
611
699
|
</span>
|
612
700
|
|
613
701
|
|
702
|
+
<span class="note title constructor">constructor</span>
|
703
|
+
|
614
704
|
|
615
705
|
|
616
706
|
|
@@ -619,7 +709,7 @@ sha1).</p>
|
|
619
709
|
|
620
710
|
|
621
711
|
<span class="summary_desc"><div class='inline'>
|
622
|
-
<p>
|
712
|
+
<p>A new instance of Cert.</p>
|
623
713
|
</div></span>
|
624
714
|
|
625
715
|
</li>
|
@@ -628,7 +718,7 @@ sha1).</p>
|
|
628
718
|
<li class="public ">
|
629
719
|
<span class="summary_signature">
|
630
720
|
|
631
|
-
<a href="#
|
721
|
+
<a href="#is_revoked_by_crl%3F-instance_method" title="#is_revoked_by_crl? (instance method)">- (Boolean) <strong>is_revoked_by_crl?</strong>(r509_crl) </a>
|
632
722
|
|
633
723
|
|
634
724
|
|
@@ -643,7 +733,7 @@ sha1).</p>
|
|
643
733
|
|
644
734
|
|
645
735
|
<span class="summary_desc"><div class='inline'>
|
646
|
-
<p>
|
736
|
+
<p>Checks the given CRL for this certificate's serial number.</p>
|
647
737
|
</div></span>
|
648
738
|
|
649
739
|
</li>
|
@@ -652,7 +742,7 @@ sha1).</p>
|
|
652
742
|
<li class="public ">
|
653
743
|
<span class="summary_signature">
|
654
744
|
|
655
|
-
<a href="#
|
745
|
+
<a href="#key_algorithm-instance_method" title="#key_algorithm (instance method)">- (Symbol) <strong>key_algorithm</strong> </a>
|
656
746
|
|
657
747
|
|
658
748
|
|
@@ -667,7 +757,7 @@ sha1).</p>
|
|
667
757
|
|
668
758
|
|
669
759
|
<span class="summary_desc"><div class='inline'>
|
670
|
-
<p>Returns
|
760
|
+
<p>Returns key algorithm (RSA, DSA, EC).</p>
|
671
761
|
</div></span>
|
672
762
|
|
673
763
|
</li>
|
@@ -676,10 +766,12 @@ sha1).</p>
|
|
676
766
|
<li class="public ">
|
677
767
|
<span class="summary_signature">
|
678
768
|
|
679
|
-
<a href="#
|
769
|
+
<a href="#key_usage-instance_method" title="#key_usage (instance method)">- (R509::Cert::Extensions::KeyUsage) <strong>key_usage</strong> </a>
|
680
770
|
|
681
771
|
|
682
772
|
|
773
|
+
(also: #ku)
|
774
|
+
|
683
775
|
</span>
|
684
776
|
|
685
777
|
|
@@ -691,7 +783,7 @@ sha1).</p>
|
|
691
783
|
|
692
784
|
|
693
785
|
<span class="summary_desc"><div class='inline'>
|
694
|
-
<p>Returns
|
786
|
+
<p>Returns this object's KeyUsage extension as an R509 extension.</p>
|
695
787
|
</div></span>
|
696
788
|
|
697
789
|
</li>
|
@@ -700,7 +792,7 @@ sha1).</p>
|
|
700
792
|
<li class="public ">
|
701
793
|
<span class="summary_signature">
|
702
794
|
|
703
|
-
<a href="#
|
795
|
+
<a href="#name_constraints-instance_method" title="#name_constraints (instance method)">- (R509::Cert::Extensions::NameConstraints) <strong>name_constraints</strong> </a>
|
704
796
|
|
705
797
|
|
706
798
|
|
@@ -715,8 +807,7 @@ sha1).</p>
|
|
715
807
|
|
716
808
|
|
717
809
|
<span class="summary_desc"><div class='inline'>
|
718
|
-
<p>Returns
|
719
|
-
specific objects.</p>
|
810
|
+
<p>Returns this object's NameConstraints extension as an R509 extension.</p>
|
720
811
|
</div></span>
|
721
812
|
|
722
813
|
</li>
|
@@ -725,7 +816,7 @@ specific objects.</p>
|
|
725
816
|
<li class="public ">
|
726
817
|
<span class="summary_signature">
|
727
818
|
|
728
|
-
<a href="#
|
819
|
+
<a href="#not_after-instance_method" title="#not_after (instance method)">- (Time) <strong>not_after</strong> </a>
|
729
820
|
|
730
821
|
|
731
822
|
|
@@ -740,7 +831,7 @@ specific objects.</p>
|
|
740
831
|
|
741
832
|
|
742
833
|
<span class="summary_desc"><div class='inline'>
|
743
|
-
<p>Returns
|
834
|
+
<p>Returns ending (notAfter) of certificate validity period.</p>
|
744
835
|
</div></span>
|
745
836
|
|
746
837
|
</li>
|
@@ -749,7 +840,7 @@ specific objects.</p>
|
|
749
840
|
<li class="public ">
|
750
841
|
<span class="summary_signature">
|
751
842
|
|
752
|
-
<a href="#
|
843
|
+
<a href="#not_before-instance_method" title="#not_before (instance method)">- (Time) <strong>not_before</strong> </a>
|
753
844
|
|
754
845
|
|
755
846
|
|
@@ -764,7 +855,7 @@ specific objects.</p>
|
|
764
855
|
|
765
856
|
|
766
857
|
<span class="summary_desc"><div class='inline'>
|
767
|
-
<p>
|
858
|
+
<p>Returns beginning (notBefore) of certificate validity period.</p>
|
768
859
|
</div></span>
|
769
860
|
|
770
861
|
</li>
|
@@ -773,7 +864,7 @@ specific objects.</p>
|
|
773
864
|
<li class="public ">
|
774
865
|
<span class="summary_signature">
|
775
866
|
|
776
|
-
<a href="#
|
867
|
+
<a href="#ocsp_no_check%3F-instance_method" title="#ocsp_no_check? (instance method)">- (Boolean) <strong>ocsp_no_check?</strong> </a>
|
777
868
|
|
778
869
|
|
779
870
|
|
@@ -788,7 +879,8 @@ specific objects.</p>
|
|
788
879
|
|
789
880
|
|
790
881
|
<span class="summary_desc"><div class='inline'>
|
791
|
-
<p>Returns the
|
882
|
+
<p>Returns true if the OCSP No Check extension is present (value is irrelevant
|
883
|
+
to this extension).</p>
|
792
884
|
</div></span>
|
793
885
|
|
794
886
|
</li>
|
@@ -797,7 +889,7 @@ specific objects.</p>
|
|
797
889
|
<li class="public ">
|
798
890
|
<span class="summary_signature">
|
799
891
|
|
800
|
-
<a href="#
|
892
|
+
<a href="#policy_constraints-instance_method" title="#policy_constraints (instance method)">- (R509::Cert::Extensions::PolicyConstraints) <strong>policy_constraints</strong> </a>
|
801
893
|
|
802
894
|
|
803
895
|
|
@@ -812,7 +904,7 @@ specific objects.</p>
|
|
812
904
|
|
813
905
|
|
814
906
|
<span class="summary_desc"><div class='inline'>
|
815
|
-
<p>Returns
|
907
|
+
<p>Returns this object's PolicyConstraints extension as an R509 extension.</p>
|
816
908
|
</div></span>
|
817
909
|
|
818
910
|
</li>
|
@@ -821,7 +913,7 @@ specific objects.</p>
|
|
821
913
|
<li class="public ">
|
822
914
|
<span class="summary_signature">
|
823
915
|
|
824
|
-
<a href="#
|
916
|
+
<a href="#public_key-instance_method" title="#public_key (instance method)">- (OpenSSL::PKey::RSA) <strong>public_key</strong> </a>
|
825
917
|
|
826
918
|
|
827
919
|
|
@@ -836,7 +928,7 @@ specific objects.</p>
|
|
836
928
|
|
837
929
|
|
838
930
|
<span class="summary_desc"><div class='inline'>
|
839
|
-
<p>Returns the
|
931
|
+
<p>Returns the certificate public key.</p>
|
840
932
|
</div></span>
|
841
933
|
|
842
934
|
</li>
|
@@ -845,7 +937,7 @@ specific objects.</p>
|
|
845
937
|
<li class="public ">
|
846
938
|
<span class="summary_signature">
|
847
939
|
|
848
|
-
<a href="#
|
940
|
+
<a href="#rsa%3F-instance_method" title="#rsa? (instance method)">- (Boolean) <strong>rsa?</strong> </a>
|
849
941
|
|
850
942
|
|
851
943
|
|
@@ -860,8 +952,7 @@ specific objects.</p>
|
|
860
952
|
|
861
953
|
|
862
954
|
<span class="summary_desc"><div class='inline'>
|
863
|
-
<p>Returns
|
864
|
-
extension.</p>
|
955
|
+
<p>Returns whether the public key is RSA.</p>
|
865
956
|
</div></span>
|
866
957
|
|
867
958
|
</li>
|
@@ -870,7 +961,7 @@ extension.</p>
|
|
870
961
|
<li class="public ">
|
871
962
|
<span class="summary_signature">
|
872
963
|
|
873
|
-
<a href="#
|
964
|
+
<a href="#serial-instance_method" title="#serial (instance method)">- (Integer) <strong>serial</strong> </a>
|
874
965
|
|
875
966
|
|
876
967
|
|
@@ -885,7 +976,7 @@ extension.</p>
|
|
885
976
|
|
886
977
|
|
887
978
|
<span class="summary_desc"><div class='inline'>
|
888
|
-
<p>Returns the
|
979
|
+
<p>Returns the serial number of the certificate in decimal form.</p>
|
889
980
|
</div></span>
|
890
981
|
|
891
982
|
</li>
|
@@ -894,7 +985,7 @@ extension.</p>
|
|
894
985
|
<li class="public ">
|
895
986
|
<span class="summary_signature">
|
896
987
|
|
897
|
-
<a href="#
|
988
|
+
<a href="#signature_algorithm-instance_method" title="#signature_algorithm (instance method)">- (String) <strong>signature_algorithm</strong> </a>
|
898
989
|
|
899
990
|
|
900
991
|
|
@@ -909,7 +1000,7 @@ extension.</p>
|
|
909
1000
|
|
910
1001
|
|
911
1002
|
<span class="summary_desc"><div class='inline'>
|
912
|
-
<p>Returns
|
1003
|
+
<p>Returns signature algorithm.</p>
|
913
1004
|
</div></span>
|
914
1005
|
|
915
1006
|
</li>
|
@@ -918,10 +1009,12 @@ extension.</p>
|
|
918
1009
|
<li class="public ">
|
919
1010
|
<span class="summary_signature">
|
920
1011
|
|
921
|
-
<a href="#
|
1012
|
+
<a href="#subject_alternative_name-instance_method" title="#subject_alternative_name (instance method)">- (R509::Cert::Extensions::SubjectAlternativeName) <strong>subject_alternative_name</strong> </a>
|
922
1013
|
|
923
1014
|
|
924
1015
|
|
1016
|
+
(also: #san, #subject_alt_name)
|
1017
|
+
|
925
1018
|
</span>
|
926
1019
|
|
927
1020
|
|
@@ -933,7 +1026,8 @@ extension.</p>
|
|
933
1026
|
|
934
1027
|
|
935
1028
|
<span class="summary_desc"><div class='inline'>
|
936
|
-
<p>Returns this object's
|
1029
|
+
<p>Returns this object's SubjectAlternativeName extension as an R509
|
1030
|
+
extension.</p>
|
937
1031
|
</div></span>
|
938
1032
|
|
939
1033
|
</li>
|
@@ -942,7 +1036,7 @@ extension.</p>
|
|
942
1036
|
<li class="public ">
|
943
1037
|
<span class="summary_signature">
|
944
1038
|
|
945
|
-
<a href="#
|
1039
|
+
<a href="#subject_key_identifier-instance_method" title="#subject_key_identifier (instance method)">- (R509::Cert::Extensions::SubjectKeyIdentifier) <strong>subject_key_identifier</strong> </a>
|
946
1040
|
|
947
1041
|
|
948
1042
|
|
@@ -957,7 +1051,7 @@ extension.</p>
|
|
957
1051
|
|
958
1052
|
|
959
1053
|
<span class="summary_desc"><div class='inline'>
|
960
|
-
<p>
|
1054
|
+
<p>Returns this object's SubjectKeyIdentifier extension as an R509 extension.</p>
|
961
1055
|
</div></span>
|
962
1056
|
|
963
1057
|
</li>
|
@@ -1314,44 +1408,36 @@ support)</p>
|
|
1314
1408
|
39
|
1315
1409
|
40
|
1316
1410
|
41
|
1317
|
-
42
|
1318
|
-
43
|
1319
|
-
44
|
1320
|
-
45
|
1321
|
-
46</pre>
|
1411
|
+
42</pre>
|
1322
1412
|
</td>
|
1323
1413
|
<td>
|
1324
1414
|
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 17</span>
|
1325
1415
|
|
1326
1416
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1417
|
+
<span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
1418
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Must provide a hash of options</span><span class='tstring_end'>'</span></span>
|
1419
|
+
<span class='kw'>end</span>
|
1420
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:pkcs12</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='lparen'>(</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:key</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:cert</span><span class='rparen'>)</span> <span class='rparen'>)</span>
|
1421
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>When providing pkcs12, do not pass cert or key</span><span class='tstring_end'>"</span></span>
|
1422
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:pkcs12</span><span class='rparen'>)</span>
|
1423
|
+
<span class='id identifier rubyid_pkcs12'>pkcs12</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>PKCS12</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:pkcs12</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span> <span class='rparen'>)</span>
|
1424
|
+
<span class='id identifier rubyid_parse_certificate'>parse_certificate</span><span class='lparen'>(</span><span class='id identifier rubyid_pkcs12'>pkcs12</span><span class='period'>.</span><span class='id identifier rubyid_certificate'>certificate</span><span class='rparen'>)</span>
|
1425
|
+
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>PrivateKey</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='symbol'>:key</span> <span class='op'>=></span> <span class='id identifier rubyid_pkcs12'>pkcs12</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span> <span class='rparen'>)</span>
|
1426
|
+
<span class='kw'>elsif</span> <span class='kw'>not</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:cert</span><span class='rparen'>)</span>
|
1427
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Must provide :cert or :pkcs12</span><span class='tstring_end'>'</span></span>
|
1428
|
+
<span class='kw'>else</span>
|
1429
|
+
<span class='id identifier rubyid_csr_check'>csr_check</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cert</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1430
|
+
<span class='id identifier rubyid_parse_certificate'>parse_certificate</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cert</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1431
|
+
<span class='kw'>end</span>
|
1432
|
+
|
1433
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:key</span><span class='rparen'>)</span>
|
1434
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>PrivateKey</span><span class='rparen'>)</span>
|
1435
|
+
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span>
|
1338
1436
|
<span class='kw'>else</span>
|
1339
|
-
|
1340
|
-
<span class='id identifier rubyid_parse_certificate'>parse_certificate</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:cert</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1341
|
-
<span class='kw'>end</span>
|
1342
|
-
|
1343
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:key</span><span class='rparen'>)</span>
|
1344
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>PrivateKey</span><span class='rparen'>)</span>
|
1345
|
-
<span class='ivar'>@key</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span>
|
1346
|
-
<span class='kw'>else</span>
|
1347
|
-
<span class='ivar'>@key</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>PrivateKey</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='symbol'>:key</span> <span class='op'>=></span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:password</span> <span class='op'>=></span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span> <span class='rparen'>)</span>
|
1348
|
-
<span class='kw'>end</span>
|
1349
|
-
<span class='kw'>end</span>
|
1350
|
-
<span class='kw'>if</span> <span class='kw'>not</span> <span class='ivar'>@key</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1351
|
-
<span class='kw'>if</span> <span class='kw'>not</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>==</span> <span class='ivar'>@key</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>then</span>
|
1352
|
-
<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'>Key does not match cert.</span><span class='tstring_end'>'</span></span>
|
1353
|
-
<span class='kw'>end</span>
|
1437
|
+
<span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>PrivateKey</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='symbol'>:key</span> <span class='op'>=></span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:key</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:password</span> <span class='op'>=></span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span> <span class='rparen'>)</span>
|
1354
1438
|
<span class='kw'>end</span>
|
1439
|
+
<span class='kw'>end</span>
|
1440
|
+
<span class='id identifier rubyid_associate_private_key'>associate_private_key</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
1355
1441
|
<span class='kw'>end</span></pre>
|
1356
1442
|
</td>
|
1357
1443
|
</tr>
|
@@ -1407,6 +1493,49 @@ support)</p>
|
|
1407
1493
|
</div>
|
1408
1494
|
|
1409
1495
|
|
1496
|
+
<span id=""></span>
|
1497
|
+
<div class="method_details ">
|
1498
|
+
<h3 class="signature " id="issuer-instance_method">
|
1499
|
+
|
1500
|
+
- (<tt>Object</tt>) <strong>issuer</strong> <span class="extras">(readonly)</span>
|
1501
|
+
|
1502
|
+
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
</h3><div class="docstring">
|
1507
|
+
<div class="discussion">
|
1508
|
+
|
1509
|
+
<p>Returns the value of attribute issuer</p>
|
1510
|
+
|
1511
|
+
|
1512
|
+
</div>
|
1513
|
+
</div>
|
1514
|
+
<div class="tags">
|
1515
|
+
|
1516
|
+
|
1517
|
+
</div><table class="source_code">
|
1518
|
+
<tr>
|
1519
|
+
<td>
|
1520
|
+
<pre class="lines">
|
1521
|
+
|
1522
|
+
|
1523
|
+
11
|
1524
|
+
12
|
1525
|
+
13</pre>
|
1526
|
+
</td>
|
1527
|
+
<td>
|
1528
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 11</span>
|
1529
|
+
|
1530
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_issuer'>issuer</span>
|
1531
|
+
<span class='ivar'>@issuer</span>
|
1532
|
+
<span class='kw'>end</span></pre>
|
1533
|
+
</td>
|
1534
|
+
</tr>
|
1535
|
+
</table>
|
1536
|
+
</div>
|
1537
|
+
|
1538
|
+
|
1410
1539
|
<span id=""></span>
|
1411
1540
|
<div class="method_details ">
|
1412
1541
|
<h3 class="signature " id="key-instance_method">
|
@@ -1449,6 +1578,49 @@ support)</p>
|
|
1449
1578
|
</table>
|
1450
1579
|
</div>
|
1451
1580
|
|
1581
|
+
|
1582
|
+
<span id=""></span>
|
1583
|
+
<div class="method_details ">
|
1584
|
+
<h3 class="signature " id="subject-instance_method">
|
1585
|
+
|
1586
|
+
- (<tt>Object</tt>) <strong>subject</strong> <span class="extras">(readonly)</span>
|
1587
|
+
|
1588
|
+
|
1589
|
+
|
1590
|
+
|
1591
|
+
|
1592
|
+
</h3><div class="docstring">
|
1593
|
+
<div class="discussion">
|
1594
|
+
|
1595
|
+
<p>Returns the value of attribute subject</p>
|
1596
|
+
|
1597
|
+
|
1598
|
+
</div>
|
1599
|
+
</div>
|
1600
|
+
<div class="tags">
|
1601
|
+
|
1602
|
+
|
1603
|
+
</div><table class="source_code">
|
1604
|
+
<tr>
|
1605
|
+
<td>
|
1606
|
+
<pre class="lines">
|
1607
|
+
|
1608
|
+
|
1609
|
+
11
|
1610
|
+
12
|
1611
|
+
13</pre>
|
1612
|
+
</td>
|
1613
|
+
<td>
|
1614
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 11</span>
|
1615
|
+
|
1616
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_subject'>subject</span>
|
1617
|
+
<span class='ivar'>@subject</span>
|
1618
|
+
<span class='kw'>end</span></pre>
|
1619
|
+
</td>
|
1620
|
+
</tr>
|
1621
|
+
</table>
|
1622
|
+
</div>
|
1623
|
+
|
1452
1624
|
</div>
|
1453
1625
|
|
1454
1626
|
|
@@ -1520,15 +1692,15 @@ support)</p>
|
|
1520
1692
|
<pre class="lines">
|
1521
1693
|
|
1522
1694
|
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1695
|
+
48
|
1696
|
+
49
|
1697
|
+
50</pre>
|
1526
1698
|
</td>
|
1527
1699
|
<td>
|
1528
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1700
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 48</span>
|
1529
1701
|
|
1530
1702
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_from_file'>load_from_file</span><span class='lparen'>(</span> <span class='id identifier rubyid_filename'>filename</span> <span class='rparen'>)</span>
|
1531
|
-
|
1703
|
+
<span class='kw'>return</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:cert</span> <span class='op'>=></span> <span class='const'>IOHelpers</span><span class='period'>.</span><span class='id identifier rubyid_read_data'>read_data</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span> <span class='rparen'>)</span>
|
1532
1704
|
<span class='kw'>end</span></pre>
|
1533
1705
|
</td>
|
1534
1706
|
</tr>
|
@@ -1542,9 +1714,9 @@ support)</p>
|
|
1542
1714
|
|
1543
1715
|
|
1544
1716
|
<div class="method_details first">
|
1545
|
-
<h3 class="signature first" id="
|
1717
|
+
<h3 class="signature first" id="all_names-instance_method">
|
1546
1718
|
|
1547
|
-
- (<tt
|
1719
|
+
- (<tt>Array</tt>) <strong>all_names</strong>
|
1548
1720
|
|
1549
1721
|
|
1550
1722
|
|
@@ -1553,7 +1725,7 @@ support)</p>
|
|
1553
1725
|
</h3><div class="docstring">
|
1554
1726
|
<div class="discussion">
|
1555
1727
|
|
1556
|
-
<p>
|
1728
|
+
<p>Return the CN, as well as all the subject alternative names (SANs).</p>
|
1557
1729
|
|
1558
1730
|
|
1559
1731
|
</div>
|
@@ -1566,14 +1738,14 @@ support)</p>
|
|
1566
1738
|
<li>
|
1567
1739
|
|
1568
1740
|
|
1569
|
-
<span class='type'>(<tt
|
1741
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
1570
1742
|
|
1571
1743
|
|
1572
1744
|
|
1573
1745
|
—
|
1574
1746
|
<div class='inline'>
|
1575
|
-
<p>
|
1576
|
-
|
1747
|
+
<p>the array of names. Returns an empty array if there are no names, at all.
|
1748
|
+
Discards SAN types</p>
|
1577
1749
|
</div>
|
1578
1750
|
|
1579
1751
|
</li>
|
@@ -1586,15 +1758,23 @@ extension.</p>
|
|
1586
1758
|
<pre class="lines">
|
1587
1759
|
|
1588
1760
|
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1761
|
+
156
|
1762
|
+
157
|
1763
|
+
158
|
1764
|
+
159
|
1765
|
+
160
|
1766
|
+
161
|
1767
|
+
162</pre>
|
1592
1768
|
</td>
|
1593
1769
|
<td>
|
1594
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1770
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 156</span>
|
1595
1771
|
|
1596
|
-
<span class='kw'>def</span> <span class='id identifier
|
1597
|
-
|
1772
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_all_names'>all_names</span>
|
1773
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1774
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'><<</span> <span class='ivar'>@subject</span><span class='period'>.</span><span class='const'>CN</span> <span class='kw'>unless</span> <span class='ivar'>@subject</span><span class='period'>.</span><span class='const'>CN</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1775
|
+
<span class='id identifier rubyid_ret'>ret</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_san'>san</span><span class='period'>.</span><span class='id identifier rubyid_names'>names</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> <span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='rbrace'>}</span> <span class='rparen'>)</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_san'>san</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1776
|
+
|
1777
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_ret'>ret</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span>
|
1598
1778
|
<span class='kw'>end</span></pre>
|
1599
1779
|
</td>
|
1600
1780
|
</tr>
|
@@ -1602,18 +1782,24 @@ extension.</p>
|
|
1602
1782
|
</div>
|
1603
1783
|
|
1604
1784
|
<div class="method_details ">
|
1605
|
-
<h3 class="signature " id="
|
1785
|
+
<h3 class="signature " id="authority_info_access-instance_method">
|
1606
1786
|
|
1607
|
-
- (<tt><span class='object_link'><a href="Cert/Extensions/
|
1787
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/AuthorityInfoAccess.html" title="R509::Cert::Extensions::AuthorityInfoAccess (class)">R509::Cert::Extensions::AuthorityInfoAccess</a></span></tt>) <strong>authority_info_access</strong>
|
1608
1788
|
|
1609
1789
|
|
1610
1790
|
|
1791
|
+
<span class="aliases">Also known as:
|
1792
|
+
<span class="names"><span id='aia-instance_method'>aia</span></span>
|
1793
|
+
</span>
|
1794
|
+
|
1611
1795
|
|
1612
1796
|
|
1613
1797
|
</h3><div class="docstring">
|
1614
1798
|
<div class="discussion">
|
1615
1799
|
|
1616
|
-
<p>Returns this object's
|
1800
|
+
<p>Returns this object's AuthorityInfoAccess extension as an R509 extension</p>
|
1801
|
+
|
1802
|
+
<p>if this cert does not have a AuthorityInfoAccess extension.</p>
|
1617
1803
|
|
1618
1804
|
|
1619
1805
|
</div>
|
@@ -1626,14 +1812,13 @@ extension.</p>
|
|
1626
1812
|
<li>
|
1627
1813
|
|
1628
1814
|
|
1629
|
-
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/
|
1815
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/AuthorityInfoAccess.html" title="R509::Cert::Extensions::AuthorityInfoAccess (class)">R509::Cert::Extensions::AuthorityInfoAccess</a></span></tt>)</span>
|
1630
1816
|
|
1631
1817
|
|
1632
1818
|
|
1633
1819
|
—
|
1634
1820
|
<div class='inline'>
|
1635
|
-
<p>The object, or nil
|
1636
|
-
extension.</p>
|
1821
|
+
<p>The object, or nil</p>
|
1637
1822
|
</div>
|
1638
1823
|
|
1639
1824
|
</li>
|
@@ -1646,15 +1831,15 @@ extension.</p>
|
|
1646
1831
|
<pre class="lines">
|
1647
1832
|
|
1648
1833
|
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1834
|
+
349
|
1835
|
+
350
|
1836
|
+
351</pre>
|
1652
1837
|
</td>
|
1653
1838
|
<td>
|
1654
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1839
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 349</span>
|
1655
1840
|
|
1656
|
-
<span class='kw'>def</span> <span class='id identifier
|
1657
|
-
|
1841
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_authority_info_access'>authority_info_access</span>
|
1842
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>AuthorityInfoAccess</span><span class='rbracket'>]</span>
|
1658
1843
|
<span class='kw'>end</span></pre>
|
1659
1844
|
</td>
|
1660
1845
|
</tr>
|
@@ -1662,9 +1847,9 @@ extension.</p>
|
|
1662
1847
|
</div>
|
1663
1848
|
|
1664
1849
|
<div class="method_details ">
|
1665
|
-
<h3 class="signature " id="
|
1850
|
+
<h3 class="signature " id="authority_key_identifier-instance_method">
|
1666
1851
|
|
1667
|
-
- (<tt><span class='object_link'><a href="Cert/Extensions/
|
1852
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/AuthorityKeyIdentifier.html" title="R509::Cert::Extensions::AuthorityKeyIdentifier (class)">R509::Cert::Extensions::AuthorityKeyIdentifier</a></span></tt>) <strong>authority_key_identifier</strong>
|
1668
1853
|
|
1669
1854
|
|
1670
1855
|
|
@@ -1673,7 +1858,9 @@ extension.</p>
|
|
1673
1858
|
</h3><div class="docstring">
|
1674
1859
|
<div class="discussion">
|
1675
1860
|
|
1676
|
-
<p>Returns this object's
|
1861
|
+
<p>Returns this object's AuthorityKeyIdentifier extension as an R509 extension</p>
|
1862
|
+
|
1863
|
+
<p>if this cert does not have a AuthorityKeyIdentifier extension.</p>
|
1677
1864
|
|
1678
1865
|
|
1679
1866
|
</div>
|
@@ -1686,13 +1873,13 @@ extension.</p>
|
|
1686
1873
|
<li>
|
1687
1874
|
|
1688
1875
|
|
1689
|
-
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/
|
1876
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/AuthorityKeyIdentifier.html" title="R509::Cert::Extensions::AuthorityKeyIdentifier (class)">R509::Cert::Extensions::AuthorityKeyIdentifier</a></span></tt>)</span>
|
1690
1877
|
|
1691
1878
|
|
1692
1879
|
|
1693
1880
|
—
|
1694
1881
|
<div class='inline'>
|
1695
|
-
<p>The object, or nil
|
1882
|
+
<p>The object, or nil</p>
|
1696
1883
|
</div>
|
1697
1884
|
|
1698
1885
|
</li>
|
@@ -1705,15 +1892,15 @@ extension.</p>
|
|
1705
1892
|
<pre class="lines">
|
1706
1893
|
|
1707
1894
|
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1895
|
+
331
|
1896
|
+
332
|
1897
|
+
333</pre>
|
1711
1898
|
</td>
|
1712
1899
|
<td>
|
1713
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1900
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 331</span>
|
1714
1901
|
|
1715
|
-
<span class='kw'>def</span> <span class='id identifier
|
1716
|
-
|
1902
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_authority_key_identifier'>authority_key_identifier</span>
|
1903
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>AuthorityKeyIdentifier</span><span class='rbracket'>]</span>
|
1717
1904
|
<span class='kw'>end</span></pre>
|
1718
1905
|
</td>
|
1719
1906
|
</tr>
|
@@ -1721,9 +1908,9 @@ extension.</p>
|
|
1721
1908
|
</div>
|
1722
1909
|
|
1723
1910
|
<div class="method_details ">
|
1724
|
-
<h3 class="signature " id="
|
1911
|
+
<h3 class="signature " id="basic_constraints-instance_method">
|
1725
1912
|
|
1726
|
-
- (<tt>
|
1913
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/BasicConstraints.html" title="R509::Cert::Extensions::BasicConstraints (class)">R509::Cert::Extensions::BasicConstraints</a></span></tt>) <strong>basic_constraints</strong>
|
1727
1914
|
|
1728
1915
|
|
1729
1916
|
|
@@ -1732,7 +1919,9 @@ extension.</p>
|
|
1732
1919
|
</h3><div class="docstring">
|
1733
1920
|
<div class="discussion">
|
1734
1921
|
|
1735
|
-
<p>Returns
|
1922
|
+
<p>Returns this object's BasicConstraints extension as an R509 extension</p>
|
1923
|
+
|
1924
|
+
<p>if this cert does not have a BasicConstraints extension.</p>
|
1736
1925
|
|
1737
1926
|
|
1738
1927
|
</div>
|
@@ -1745,13 +1934,13 @@ extension.</p>
|
|
1745
1934
|
<li>
|
1746
1935
|
|
1747
1936
|
|
1748
|
-
<span class='type'>(<tt>
|
1937
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/BasicConstraints.html" title="R509::Cert::Extensions::BasicConstraints (class)">R509::Cert::Extensions::BasicConstraints</a></span></tt>)</span>
|
1749
1938
|
|
1750
1939
|
|
1751
1940
|
|
1752
1941
|
—
|
1753
1942
|
<div class='inline'>
|
1754
|
-
<p>
|
1943
|
+
<p>The object, or nil</p>
|
1755
1944
|
</div>
|
1756
1945
|
|
1757
1946
|
</li>
|
@@ -1764,23 +1953,15 @@ extension.</p>
|
|
1764
1953
|
<pre class="lines">
|
1765
1954
|
|
1766
1955
|
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
233
|
1771
|
-
234
|
1772
|
-
235
|
1773
|
-
236</pre>
|
1956
|
+
297
|
1957
|
+
298
|
1958
|
+
299</pre>
|
1774
1959
|
</td>
|
1775
1960
|
<td>
|
1776
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1961
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 297</span>
|
1777
1962
|
|
1778
|
-
<span class='kw'>def</span> <span class='id identifier
|
1779
|
-
|
1780
|
-
<span class='kw'>return</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_num_bits'>num_bits</span>
|
1781
|
-
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dsa?'>dsa?</span>
|
1782
|
-
<span class='kw'>return</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_num_bits'>num_bits</span>
|
1783
|
-
<span class='kw'>end</span>
|
1963
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_basic_constraints'>basic_constraints</span>
|
1964
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>BasicConstraints</span><span class='rbracket'>]</span>
|
1784
1965
|
<span class='kw'>end</span></pre>
|
1785
1966
|
</td>
|
1786
1967
|
</tr>
|
@@ -1788,9 +1969,9 @@ extension.</p>
|
|
1788
1969
|
</div>
|
1789
1970
|
|
1790
1971
|
<div class="method_details ">
|
1791
|
-
<h3 class="signature " id="
|
1972
|
+
<h3 class="signature " id="bit_strength-instance_method">
|
1792
1973
|
|
1793
|
-
- (<tt
|
1974
|
+
- (<tt>Integer</tt>) <strong>bit_strength</strong>
|
1794
1975
|
|
1795
1976
|
|
1796
1977
|
|
@@ -1799,7 +1980,7 @@ extension.</p>
|
|
1799
1980
|
</h3><div class="docstring">
|
1800
1981
|
<div class="discussion">
|
1801
1982
|
|
1802
|
-
<p>Returns
|
1983
|
+
<p>Returns the bit strength of the key used to create the certificate</p>
|
1803
1984
|
|
1804
1985
|
|
1805
1986
|
</div>
|
@@ -1812,14 +1993,13 @@ extension.</p>
|
|
1812
1993
|
<li>
|
1813
1994
|
|
1814
1995
|
|
1815
|
-
<span class='type'>(<tt
|
1996
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1816
1997
|
|
1817
1998
|
|
1818
1999
|
|
1819
2000
|
—
|
1820
2001
|
<div class='inline'>
|
1821
|
-
<p>
|
1822
|
-
extension.</p>
|
2002
|
+
<p>integer value of bit strength</p>
|
1823
2003
|
</div>
|
1824
2004
|
|
1825
2005
|
</li>
|
@@ -1832,15 +2012,27 @@ extension.</p>
|
|
1832
2012
|
<pre class="lines">
|
1833
2013
|
|
1834
2014
|
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
2015
|
+
188
|
2016
|
+
189
|
2017
|
+
190
|
2018
|
+
191
|
2019
|
+
192
|
2020
|
+
193
|
2021
|
+
194
|
2022
|
+
195
|
2023
|
+
196</pre>
|
1838
2024
|
</td>
|
1839
2025
|
<td>
|
1840
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2026
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 188</span>
|
1841
2027
|
|
1842
|
-
<span class='kw'>def</span> <span class='id identifier
|
1843
|
-
|
2028
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_bit_strength'>bit_strength</span>
|
2029
|
+
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rsa?'>rsa?</span>
|
2030
|
+
<span class='kw'>return</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_n'>n</span><span class='period'>.</span><span class='id identifier rubyid_num_bits'>num_bits</span>
|
2031
|
+
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dsa?'>dsa?</span>
|
2032
|
+
<span class='kw'>return</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_num_bits'>num_bits</span>
|
2033
|
+
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ec?'>ec?</span>
|
2034
|
+
<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'>Bit strength is not available for EC at this time.</span><span class='tstring_end'>'</span></span>
|
2035
|
+
<span class='kw'>end</span>
|
1844
2036
|
<span class='kw'>end</span></pre>
|
1845
2037
|
</td>
|
1846
2038
|
</tr>
|
@@ -1848,9 +2040,9 @@ extension.</p>
|
|
1848
2040
|
</div>
|
1849
2041
|
|
1850
2042
|
<div class="method_details ">
|
1851
|
-
<h3 class="signature " id="
|
2043
|
+
<h3 class="signature " id="certificate_policies-instance_method">
|
1852
2044
|
|
1853
|
-
- (<tt>
|
2045
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/CertificatePolicies.html" title="R509::Cert::Extensions::CertificatePolicies (class)">R509::Cert::Extensions::CertificatePolicies</a></span></tt>) <strong>certificate_policies</strong>
|
1854
2046
|
|
1855
2047
|
|
1856
2048
|
|
@@ -1859,7 +2051,9 @@ extension.</p>
|
|
1859
2051
|
</h3><div class="docstring">
|
1860
2052
|
<div class="discussion">
|
1861
2053
|
|
1862
|
-
<p>Returns
|
2054
|
+
<p>Returns this object's CertificatePolicies extension as an R509 extension</p>
|
2055
|
+
|
2056
|
+
<p>if this cert does not have a CertificatePolicies extension.</p>
|
1863
2057
|
|
1864
2058
|
|
1865
2059
|
</div>
|
@@ -1872,13 +2066,13 @@ extension.</p>
|
|
1872
2066
|
<li>
|
1873
2067
|
|
1874
2068
|
|
1875
|
-
<span class='type'>(<tt>
|
2069
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/CertificatePolicies.html" title="R509::Cert::Extensions::CertificatePolicies (class)">R509::Cert::Extensions::CertificatePolicies</a></span></tt>)</span>
|
1876
2070
|
|
1877
2071
|
|
1878
2072
|
|
1879
2073
|
—
|
1880
2074
|
<div class='inline'>
|
1881
|
-
<p>
|
2075
|
+
<p>The object, or nil</p>
|
1882
2076
|
</div>
|
1883
2077
|
|
1884
2078
|
</li>
|
@@ -1891,15 +2085,15 @@ extension.</p>
|
|
1891
2085
|
<pre class="lines">
|
1892
2086
|
|
1893
2087
|
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
2088
|
+
375
|
2089
|
+
376
|
2090
|
+
377</pre>
|
1897
2091
|
</td>
|
1898
2092
|
<td>
|
1899
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2093
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 375</span>
|
1900
2094
|
|
1901
|
-
<span class='kw'>def</span> <span class='id identifier
|
1902
|
-
|
2095
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_certificate_policies'>certificate_policies</span>
|
2096
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>CertificatePolicies</span><span class='rbracket'>]</span>
|
1903
2097
|
<span class='kw'>end</span></pre>
|
1904
2098
|
</td>
|
1905
2099
|
</tr>
|
@@ -1907,18 +2101,24 @@ extension.</p>
|
|
1907
2101
|
</div>
|
1908
2102
|
|
1909
2103
|
<div class="method_details ">
|
1910
|
-
<h3 class="signature " id="
|
2104
|
+
<h3 class="signature " id="crl_distribution_points-instance_method">
|
1911
2105
|
|
1912
|
-
- (<tt><span class='object_link'><a href="Cert/Extensions/
|
2106
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/CRLDistributionPoints.html" title="R509::Cert::Extensions::CRLDistributionPoints (class)">R509::Cert::Extensions::CRLDistributionPoints</a></span></tt>) <strong>crl_distribution_points</strong>
|
1913
2107
|
|
1914
2108
|
|
1915
2109
|
|
2110
|
+
<span class="aliases">Also known as:
|
2111
|
+
<span class="names"><span id='cdp-instance_method'>cdp</span></span>
|
2112
|
+
</span>
|
2113
|
+
|
1916
2114
|
|
1917
2115
|
|
1918
2116
|
</h3><div class="docstring">
|
1919
2117
|
<div class="discussion">
|
1920
2118
|
|
1921
|
-
<p>Returns this object's
|
2119
|
+
<p>Returns this object's CRLDistributionPoints extension as an R509 extension</p>
|
2120
|
+
|
2121
|
+
<p>if this cert does not have a CRLDistributionPoints extension.</p>
|
1922
2122
|
|
1923
2123
|
|
1924
2124
|
</div>
|
@@ -1931,13 +2131,13 @@ extension.</p>
|
|
1931
2131
|
<li>
|
1932
2132
|
|
1933
2133
|
|
1934
|
-
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/
|
2134
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/CRLDistributionPoints.html" title="R509::Cert::Extensions::CRLDistributionPoints (class)">R509::Cert::Extensions::CRLDistributionPoints</a></span></tt>)</span>
|
1935
2135
|
|
1936
2136
|
|
1937
2137
|
|
1938
2138
|
—
|
1939
2139
|
<div class='inline'>
|
1940
|
-
<p>The object, or nil
|
2140
|
+
<p>The object, or nil</p>
|
1941
2141
|
</div>
|
1942
2142
|
|
1943
2143
|
</li>
|
@@ -1950,15 +2150,15 @@ extension.</p>
|
|
1950
2150
|
<pre class="lines">
|
1951
2151
|
|
1952
2152
|
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
2153
|
+
358
|
2154
|
+
359
|
2155
|
+
360</pre>
|
1956
2156
|
</td>
|
1957
2157
|
<td>
|
1958
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2158
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 358</span>
|
1959
2159
|
|
1960
|
-
<span class='kw'>def</span> <span class='id identifier
|
1961
|
-
|
2160
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_crl_distribution_points'>crl_distribution_points</span>
|
2161
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>CRLDistributionPoints</span><span class='rbracket'>]</span>
|
1962
2162
|
<span class='kw'>end</span></pre>
|
1963
2163
|
</td>
|
1964
2164
|
</tr>
|
@@ -1966,9 +2166,9 @@ extension.</p>
|
|
1966
2166
|
</div>
|
1967
2167
|
|
1968
2168
|
<div class="method_details ">
|
1969
|
-
<h3 class="signature " id="
|
2169
|
+
<h3 class="signature " id="curve_name-instance_method">
|
1970
2170
|
|
1971
|
-
- (<tt>
|
2171
|
+
- (<tt>String</tt>) <strong>curve_name</strong>
|
1972
2172
|
|
1973
2173
|
|
1974
2174
|
|
@@ -1977,7 +2177,8 @@ extension.</p>
|
|
1977
2177
|
</h3><div class="docstring">
|
1978
2178
|
<div class="discussion">
|
1979
2179
|
|
1980
|
-
<p>
|
2180
|
+
<p>Returns the short name of the elliptic curve used to generate the public
|
2181
|
+
key if the key is EC. If not, raises an error.</p>
|
1981
2182
|
|
1982
2183
|
|
1983
2184
|
</div>
|
@@ -1990,13 +2191,13 @@ extension.</p>
|
|
1990
2191
|
<li>
|
1991
2192
|
|
1992
2193
|
|
1993
|
-
<span class='type'>(<tt>
|
2194
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1994
2195
|
|
1995
2196
|
|
1996
2197
|
|
1997
2198
|
—
|
1998
2199
|
<div class='inline'>
|
1999
|
-
<p>
|
2200
|
+
<p>elliptic curve name</p>
|
2000
2201
|
</div>
|
2001
2202
|
|
2002
2203
|
</li>
|
@@ -2009,29 +2210,23 @@ extension.</p>
|
|
2009
2210
|
<pre class="lines">
|
2010
2211
|
|
2011
2212
|
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
302
|
2020
|
-
303
|
2021
|
-
304</pre>
|
2213
|
+
202
|
2214
|
+
203
|
2215
|
+
204
|
2216
|
+
205
|
2217
|
+
206
|
2218
|
+
207
|
2219
|
+
208</pre>
|
2022
2220
|
</td>
|
2023
2221
|
<td>
|
2024
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2025
|
-
|
2026
|
-
<span class='kw'>def</span> <span class='id identifier
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
<span class='rbrace'>}</span>
|
2033
|
-
<span class='kw'>end</span>
|
2034
|
-
<span class='ivar'>@extensions</span>
|
2222
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 202</span>
|
2223
|
+
|
2224
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_curve_name'>curve_name</span>
|
2225
|
+
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ec?'>ec?</span>
|
2226
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span><span class='period'>.</span><span class='id identifier rubyid_group'>group</span><span class='period'>.</span><span class='id identifier rubyid_curve_name'>curve_name</span>
|
2227
|
+
<span class='kw'>else</span>
|
2228
|
+
<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'>Curve name is only available with EC certs</span><span class='tstring_end'>'</span></span>
|
2229
|
+
<span class='kw'>end</span>
|
2035
2230
|
<span class='kw'>end</span></pre>
|
2036
2231
|
</td>
|
2037
2232
|
</tr>
|
@@ -2039,9 +2234,9 @@ extension.</p>
|
|
2039
2234
|
</div>
|
2040
2235
|
|
2041
2236
|
<div class="method_details ">
|
2042
|
-
<h3 class="signature " id="
|
2237
|
+
<h3 class="signature " id="dsa?-instance_method">
|
2043
2238
|
|
2044
|
-
- (<tt>
|
2239
|
+
- (<tt>Boolean</tt>) <strong>dsa?</strong>
|
2045
2240
|
|
2046
2241
|
|
2047
2242
|
|
@@ -2050,50 +2245,26 @@ extension.</p>
|
|
2050
2245
|
</h3><div class="docstring">
|
2051
2246
|
<div class="discussion">
|
2052
2247
|
|
2053
|
-
<p>Returns the
|
2054
|
-
sha1)</p>
|
2248
|
+
<p>Returns whether the public key is DSA</p>
|
2055
2249
|
|
2056
2250
|
|
2057
2251
|
</div>
|
2058
2252
|
</div>
|
2059
2253
|
<div class="tags">
|
2060
|
-
<p class="tag_title">Parameters:</p>
|
2061
|
-
<ul class="param">
|
2062
2254
|
|
2063
|
-
<li>
|
2064
|
-
|
2065
|
-
<span class='name'>algorithm</span>
|
2066
|
-
|
2067
|
-
|
2068
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2069
|
-
|
2070
|
-
|
2071
|
-
<em class="default">(defaults to: <tt>'sha1'</tt>)</em>
|
2072
|
-
|
2073
|
-
|
2074
|
-
—
|
2075
|
-
<div class='inline'>
|
2076
|
-
<p>Which algorithm to use for the fingerprint. See R509::MessageDigest for
|
2077
|
-
supported algorithm names</p>
|
2078
|
-
</div>
|
2079
|
-
|
2080
|
-
</li>
|
2081
|
-
|
2082
|
-
</ul>
|
2083
|
-
|
2084
2255
|
<p class="tag_title">Returns:</p>
|
2085
2256
|
<ul class="return">
|
2086
2257
|
|
2087
2258
|
<li>
|
2088
2259
|
|
2089
2260
|
|
2090
|
-
<span class='type'>(<tt>
|
2261
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2091
2262
|
|
2092
2263
|
|
2093
2264
|
|
2094
2265
|
—
|
2095
2266
|
<div class='inline'>
|
2096
|
-
<p>
|
2267
|
+
<p>true if the public key is DSA, false otherwise</p>
|
2097
2268
|
</div>
|
2098
2269
|
|
2099
2270
|
</li>
|
@@ -2106,21 +2277,15 @@ supported algorithm names</p>
|
|
2106
2277
|
<pre class="lines">
|
2107
2278
|
|
2108
2279
|
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
132
|
2113
|
-
133
|
2114
|
-
134</pre>
|
2280
|
+
174
|
2281
|
+
175
|
2282
|
+
176</pre>
|
2115
2283
|
</td>
|
2116
2284
|
<td>
|
2117
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2285
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 174</span>
|
2118
2286
|
|
2119
|
-
<span class='kw'>def</span> <span class='id identifier
|
2120
|
-
|
2121
|
-
<span class='id identifier rubyid_md'>md</span> <span class='op'>=</span> <span class='id identifier rubyid_message_digest'>message_digest</span><span class='period'>.</span><span class='id identifier rubyid_digest'>digest</span>
|
2122
|
-
<span class='id identifier rubyid_md'>md</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span><span class='rparen'>)</span>
|
2123
|
-
<span class='id identifier rubyid_md'>md</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
2287
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dsa?'>dsa?</span>
|
2288
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</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'>PKey</span><span class='op'>::</span><span class='const'>DSA</span><span class='rparen'>)</span>
|
2124
2289
|
<span class='kw'>end</span></pre>
|
2125
2290
|
</td>
|
2126
2291
|
</tr>
|
@@ -2128,9 +2293,9 @@ supported algorithm names</p>
|
|
2128
2293
|
</div>
|
2129
2294
|
|
2130
2295
|
<div class="method_details ">
|
2131
|
-
<h3 class="signature " id="
|
2296
|
+
<h3 class="signature " id="ec?-instance_method">
|
2132
2297
|
|
2133
|
-
- (<tt>Boolean</tt>) <strong>
|
2298
|
+
- (<tt>Boolean</tt>) <strong>ec?</strong>
|
2134
2299
|
|
2135
2300
|
|
2136
2301
|
|
@@ -2139,7 +2304,7 @@ supported algorithm names</p>
|
|
2139
2304
|
</h3><div class="docstring">
|
2140
2305
|
<div class="discussion">
|
2141
2306
|
|
2142
|
-
<p>
|
2307
|
+
<p>Returns whether the public key is EC</p>
|
2143
2308
|
|
2144
2309
|
|
2145
2310
|
</div>
|
@@ -2158,7 +2323,7 @@ supported algorithm names</p>
|
|
2158
2323
|
|
2159
2324
|
—
|
2160
2325
|
<div class='inline'>
|
2161
|
-
<p>
|
2326
|
+
<p>true if the public key is EC, false otherwise</p>
|
2162
2327
|
</div>
|
2163
2328
|
|
2164
2329
|
</li>
|
@@ -2171,23 +2336,15 @@ supported algorithm names</p>
|
|
2171
2336
|
<pre class="lines">
|
2172
2337
|
|
2173
2338
|
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
171
|
2178
|
-
172
|
2179
|
-
173
|
2180
|
-
174</pre>
|
2339
|
+
181
|
2340
|
+
182
|
2341
|
+
183</pre>
|
2181
2342
|
</td>
|
2182
2343
|
<td>
|
2183
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2344
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 181</span>
|
2184
2345
|
|
2185
|
-
<span class='kw'>def</span> <span class='id identifier
|
2186
|
-
|
2187
|
-
<span class='kw'>true</span>
|
2188
|
-
<span class='kw'>else</span>
|
2189
|
-
<span class='kw'>false</span>
|
2190
|
-
<span class='kw'>end</span>
|
2346
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ec?'>ec?</span>
|
2347
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</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'>PKey</span><span class='op'>::</span><span class='const'>EC</span><span class='rparen'>)</span>
|
2191
2348
|
<span class='kw'>end</span></pre>
|
2192
2349
|
</td>
|
2193
2350
|
</tr>
|
@@ -2195,55 +2352,108 @@ supported algorithm names</p>
|
|
2195
2352
|
</div>
|
2196
2353
|
|
2197
2354
|
<div class="method_details ">
|
2198
|
-
<h3 class="signature " id="
|
2355
|
+
<h3 class="signature " id="extended_key_usage-instance_method">
|
2199
2356
|
|
2200
|
-
- (<tt>
|
2357
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/ExtendedKeyUsage.html" title="R509::Cert::Extensions::ExtendedKeyUsage (class)">R509::Cert::Extensions::ExtendedKeyUsage</a></span></tt>) <strong>extended_key_usage</strong>
|
2201
2358
|
|
2202
2359
|
|
2203
2360
|
|
2361
|
+
<span class="aliases">Also known as:
|
2362
|
+
<span class="names"><span id='eku-instance_method'>eku</span></span>
|
2363
|
+
</span>
|
2364
|
+
|
2204
2365
|
|
2205
2366
|
|
2206
2367
|
</h3><div class="docstring">
|
2207
2368
|
<div class="discussion">
|
2208
2369
|
|
2209
|
-
<p>
|
2210
|
-
|
2211
|
-
|
2370
|
+
<p>Returns this object's ExtendedKeyUsage extension as an R509 extension</p>
|
2371
|
+
|
2372
|
+
<p>if this cert does not have a ExtendedKeyUsage extension.</p>
|
2212
2373
|
|
2213
2374
|
|
2214
2375
|
</div>
|
2215
2376
|
</div>
|
2216
2377
|
<div class="tags">
|
2217
|
-
|
2218
|
-
<
|
2378
|
+
|
2379
|
+
<p class="tag_title">Returns:</p>
|
2380
|
+
<ul class="return">
|
2219
2381
|
|
2220
2382
|
<li>
|
2221
2383
|
|
2222
|
-
<span class='name'>r509_crl</span>
|
2223
|
-
|
2224
2384
|
|
2225
|
-
<span class='type'>(<tt><span class='object_link'><a href="
|
2385
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/ExtendedKeyUsage.html" title="R509::Cert::Extensions::ExtendedKeyUsage (class)">R509::Cert::Extensions::ExtendedKeyUsage</a></span></tt>)</span>
|
2226
2386
|
|
2227
2387
|
|
2228
2388
|
|
2229
2389
|
—
|
2230
2390
|
<div class='inline'>
|
2231
|
-
<p>
|
2391
|
+
<p>The object, or nil</p>
|
2232
2392
|
</div>
|
2233
2393
|
|
2234
2394
|
</li>
|
2235
2395
|
|
2236
2396
|
</ul>
|
2237
2397
|
|
2398
|
+
</div><table class="source_code">
|
2399
|
+
<tr>
|
2400
|
+
<td>
|
2401
|
+
<pre class="lines">
|
2402
|
+
|
2403
|
+
|
2404
|
+
314
|
2405
|
+
315
|
2406
|
+
316</pre>
|
2407
|
+
</td>
|
2408
|
+
<td>
|
2409
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 314</span>
|
2410
|
+
|
2411
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extended_key_usage'>extended_key_usage</span>
|
2412
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>ExtendedKeyUsage</span><span class='rbracket'>]</span>
|
2413
|
+
<span class='kw'>end</span></pre>
|
2414
|
+
</td>
|
2415
|
+
</tr>
|
2416
|
+
</table>
|
2417
|
+
</div>
|
2418
|
+
|
2419
|
+
<div class="method_details ">
|
2420
|
+
<h3 class="signature " id="extensions-instance_method">
|
2421
|
+
|
2422
|
+
- (<tt>Hash</tt>) <strong>extensions</strong>
|
2423
|
+
|
2424
|
+
|
2425
|
+
|
2426
|
+
|
2427
|
+
|
2428
|
+
</h3><div class="docstring">
|
2429
|
+
<div class="discussion">
|
2430
|
+
|
2431
|
+
<p>Returns the certificate extensions as a hash of R509::Cert::Extensions
|
2432
|
+
specific objects.</p>
|
2433
|
+
|
2434
|
+
<p>R509::Cert::Extensions module, each specific to the extension. The hash is
|
2435
|
+
keyed with the R509 extension class. Extensions without an R509
|
2436
|
+
implementation are ignored (see #get_unknown_extensions).</p>
|
2437
|
+
|
2438
|
+
|
2439
|
+
</div>
|
2440
|
+
</div>
|
2441
|
+
<div class="tags">
|
2442
|
+
|
2238
2443
|
<p class="tag_title">Returns:</p>
|
2239
2444
|
<ul class="return">
|
2240
2445
|
|
2241
2446
|
<li>
|
2242
2447
|
|
2243
2448
|
|
2244
|
-
<span class='type'>(<tt>
|
2449
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2450
|
+
|
2245
2451
|
|
2246
2452
|
|
2453
|
+
—
|
2454
|
+
<div class='inline'>
|
2455
|
+
<p>A hash, in which the values are classes from the</p>
|
2456
|
+
</div>
|
2247
2457
|
|
2248
2458
|
</li>
|
2249
2459
|
|
@@ -2255,15 +2465,23 @@ CA as the cert so do that check yourself</p>
|
|
2255
2465
|
<pre class="lines">
|
2256
2466
|
|
2257
2467
|
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2468
|
+
273
|
2469
|
+
274
|
2470
|
+
275
|
2471
|
+
276
|
2472
|
+
277
|
2473
|
+
278
|
2474
|
+
279</pre>
|
2261
2475
|
</td>
|
2262
2476
|
<td>
|
2263
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2477
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 273</span>
|
2264
2478
|
|
2265
|
-
<span class='kw'>def</span> <span class='id identifier
|
2266
|
-
|
2479
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extensions'>extensions</span>
|
2480
|
+
<span class='kw'>if</span> <span class='ivar'>@r509_extensions</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2481
|
+
<span class='ivar'>@r509_extensions</span> <span class='op'>=</span> <span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_wrap_openssl_extensions'>wrap_openssl_extensions</span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_extensions'>extensions</span> <span class='rparen'>)</span>
|
2482
|
+
<span class='kw'>end</span>
|
2483
|
+
|
2484
|
+
<span class='kw'>return</span> <span class='ivar'>@r509_extensions</span>
|
2267
2485
|
<span class='kw'>end</span></pre>
|
2268
2486
|
</td>
|
2269
2487
|
</tr>
|
@@ -2271,9 +2489,9 @@ CA as the cert so do that check yourself</p>
|
|
2271
2489
|
</div>
|
2272
2490
|
|
2273
2491
|
<div class="method_details ">
|
2274
|
-
<h3 class="signature " id="
|
2492
|
+
<h3 class="signature " id="fingerprint-instance_method">
|
2275
2493
|
|
2276
|
-
- (<tt>
|
2494
|
+
- (<tt>String</tt>) <strong>fingerprint</strong>(algorithm = 'sha1')
|
2277
2495
|
|
2278
2496
|
|
2279
2497
|
|
@@ -2282,26 +2500,50 @@ CA as the cert so do that check yourself</p>
|
|
2282
2500
|
</h3><div class="docstring">
|
2283
2501
|
<div class="discussion">
|
2284
2502
|
|
2285
|
-
<p>Returns the
|
2503
|
+
<p>Returns the certificate fingerprint with the specified algorithm (default
|
2504
|
+
sha1)</p>
|
2286
2505
|
|
2287
2506
|
|
2288
2507
|
</div>
|
2289
2508
|
</div>
|
2290
2509
|
<div class="tags">
|
2510
|
+
<p class="tag_title">Parameters:</p>
|
2511
|
+
<ul class="param">
|
2291
2512
|
|
2513
|
+
<li>
|
2514
|
+
|
2515
|
+
<span class='name'>algorithm</span>
|
2516
|
+
|
2517
|
+
|
2518
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2519
|
+
|
2520
|
+
|
2521
|
+
<em class="default">(defaults to: <tt>'sha1'</tt>)</em>
|
2522
|
+
|
2523
|
+
|
2524
|
+
—
|
2525
|
+
<div class='inline'>
|
2526
|
+
<p>Which algorithm to use for the fingerprint. See R509::MessageDigest for
|
2527
|
+
supported algorithm names</p>
|
2528
|
+
</div>
|
2529
|
+
|
2530
|
+
</li>
|
2531
|
+
|
2532
|
+
</ul>
|
2533
|
+
|
2292
2534
|
<p class="tag_title">Returns:</p>
|
2293
2535
|
<ul class="return">
|
2294
2536
|
|
2295
2537
|
<li>
|
2296
2538
|
|
2297
2539
|
|
2298
|
-
<span class='type'>(<tt>
|
2540
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2299
2541
|
|
2300
2542
|
|
2301
2543
|
|
2302
2544
|
—
|
2303
2545
|
<div class='inline'>
|
2304
|
-
<p>
|
2546
|
+
<p>hex digest of the certificate</p>
|
2305
2547
|
</div>
|
2306
2548
|
|
2307
2549
|
</li>
|
@@ -2314,15 +2556,21 @@ CA as the cert so do that check yourself</p>
|
|
2314
2556
|
<pre class="lines">
|
2315
2557
|
|
2316
2558
|
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2559
|
+
112
|
2560
|
+
113
|
2561
|
+
114
|
2562
|
+
115
|
2563
|
+
116
|
2564
|
+
117</pre>
|
2320
2565
|
</td>
|
2321
2566
|
<td>
|
2322
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2567
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 112</span>
|
2323
2568
|
|
2324
|
-
<span class='kw'>def</span> <span class='id identifier
|
2325
|
-
|
2569
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fingerprint'>fingerprint</span><span class='lparen'>(</span><span class='id identifier rubyid_algorithm'>algorithm</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sha1</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
2570
|
+
<span class='id identifier rubyid_message_digest'>message_digest</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>MessageDigest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_algorithm'>algorithm</span><span class='rparen'>)</span>
|
2571
|
+
<span class='id identifier rubyid_md'>md</span> <span class='op'>=</span> <span class='id identifier rubyid_message_digest'>message_digest</span><span class='period'>.</span><span class='id identifier rubyid_digest'>digest</span>
|
2572
|
+
<span class='id identifier rubyid_md'>md</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span><span class='rparen'>)</span>
|
2573
|
+
<span class='id identifier rubyid_md'>md</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
2326
2574
|
<span class='kw'>end</span></pre>
|
2327
2575
|
</td>
|
2328
2576
|
</tr>
|
@@ -2330,9 +2578,9 @@ CA as the cert so do that check yourself</p>
|
|
2330
2578
|
</div>
|
2331
2579
|
|
2332
2580
|
<div class="method_details ">
|
2333
|
-
<h3 class="signature " id="
|
2581
|
+
<h3 class="signature " id="has_private_key?-instance_method">
|
2334
2582
|
|
2335
|
-
- (<tt>
|
2583
|
+
- (<tt>Boolean</tt>) <strong>has_private_key?</strong>
|
2336
2584
|
|
2337
2585
|
|
2338
2586
|
|
@@ -2341,7 +2589,7 @@ CA as the cert so do that check yourself</p>
|
|
2341
2589
|
</h3><div class="docstring">
|
2342
2590
|
<div class="discussion">
|
2343
2591
|
|
2344
|
-
<p>
|
2592
|
+
<p>Boolean of whether the object contains a private key</p>
|
2345
2593
|
|
2346
2594
|
|
2347
2595
|
</div>
|
@@ -2354,13 +2602,13 @@ CA as the cert so do that check yourself</p>
|
|
2354
2602
|
<li>
|
2355
2603
|
|
2356
2604
|
|
2357
|
-
<span class='type'>(<tt>
|
2605
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2358
2606
|
|
2359
2607
|
|
2360
2608
|
|
2361
2609
|
—
|
2362
2610
|
<div class='inline'>
|
2363
|
-
<p>
|
2611
|
+
<p>Boolean of whether the object contains a private key</p>
|
2364
2612
|
</div>
|
2365
2613
|
|
2366
2614
|
</li>
|
@@ -2373,29 +2621,23 @@ CA as the cert so do that check yourself</p>
|
|
2373
2621
|
<pre class="lines">
|
2374
2622
|
|
2375
2623
|
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
121
|
2384
|
-
122
|
2385
|
-
123</pre>
|
2624
|
+
144
|
2625
|
+
145
|
2626
|
+
146
|
2627
|
+
147
|
2628
|
+
148
|
2629
|
+
149
|
2630
|
+
150</pre>
|
2386
2631
|
</td>
|
2387
2632
|
<td>
|
2388
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2389
|
-
|
2390
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_issuer_cn'>issuer_cn</span>
|
2391
|
-
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2392
|
-
|
2393
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</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_part'>part</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_length'>length</span><span class='op'>|</span>
|
2394
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>if</span> <span class='id identifier rubyid_part'>part</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CN</span><span class='tstring_end'>'</span></span>
|
2395
|
-
<span class='kw'>end</span>
|
2633
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 144</span>
|
2396
2634
|
|
2397
|
-
|
2398
|
-
</span>
|
2635
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_private_key?'>has_private_key?</span>
|
2636
|
+
<span class='kw'>if</span> <span class='kw'>not</span> <span class='ivar'>@key</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2637
|
+
<span class='kw'>true</span>
|
2638
|
+
<span class='kw'>else</span>
|
2639
|
+
<span class='kw'>false</span>
|
2640
|
+
<span class='kw'>end</span>
|
2399
2641
|
<span class='kw'>end</span></pre>
|
2400
2642
|
</td>
|
2401
2643
|
</tr>
|
@@ -2403,9 +2645,9 @@ CA as the cert so do that check yourself</p>
|
|
2403
2645
|
</div>
|
2404
2646
|
|
2405
2647
|
<div class="method_details ">
|
2406
|
-
<h3 class="signature " id="
|
2648
|
+
<h3 class="signature " id="hexserial-instance_method">
|
2407
2649
|
|
2408
|
-
- (<tt>String</tt>) <strong>
|
2650
|
+
- (<tt>String</tt>) <strong>hexserial</strong>
|
2409
2651
|
|
2410
2652
|
|
2411
2653
|
|
@@ -2414,7 +2656,7 @@ CA as the cert so do that check yourself</p>
|
|
2414
2656
|
</h3><div class="docstring">
|
2415
2657
|
<div class="discussion">
|
2416
2658
|
|
2417
|
-
<p>Returns
|
2659
|
+
<p>Returns the serial number of the certificate in hexadecimal form</p>
|
2418
2660
|
|
2419
2661
|
|
2420
2662
|
</div>
|
@@ -2431,11 +2673,6 @@ CA as the cert so do that check yourself</p>
|
|
2431
2673
|
|
2432
2674
|
|
2433
2675
|
|
2434
|
-
—
|
2435
|
-
<div class='inline'>
|
2436
|
-
<p>value of the key algorithm. RSA or DSA</p>
|
2437
|
-
</div>
|
2438
|
-
|
2439
2676
|
</li>
|
2440
2677
|
|
2441
2678
|
</ul>
|
@@ -2446,23 +2683,15 @@ CA as the cert so do that check yourself</p>
|
|
2446
2683
|
<pre class="lines">
|
2447
2684
|
|
2448
2685
|
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
251
|
2453
|
-
252
|
2454
|
-
253
|
2455
|
-
254</pre>
|
2686
|
+
90
|
2687
|
+
91
|
2688
|
+
92</pre>
|
2456
2689
|
</td>
|
2457
2690
|
<td>
|
2458
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2691
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 90</span>
|
2459
2692
|
|
2460
|
-
<span class='kw'>def</span> <span class='id identifier
|
2461
|
-
|
2462
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>RSA</span><span class='tstring_end'>"</span></span>
|
2463
|
-
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dsa?'>dsa?</span>
|
2464
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DSA</span><span class='tstring_end'>"</span></span>
|
2465
|
-
<span class='kw'>end</span>
|
2693
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hexserial'>hexserial</span>
|
2694
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span>
|
2466
2695
|
<span class='kw'>end</span></pre>
|
2467
2696
|
</td>
|
2468
2697
|
</tr>
|
@@ -2470,9 +2699,9 @@ CA as the cert so do that check yourself</p>
|
|
2470
2699
|
</div>
|
2471
2700
|
|
2472
2701
|
<div class="method_details ">
|
2473
|
-
<h3 class="signature " id="
|
2702
|
+
<h3 class="signature " id="inhibit_any_policy-instance_method">
|
2474
2703
|
|
2475
|
-
- (<tt><span class='object_link'><a href="Cert/Extensions/
|
2704
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/InhibitAnyPolicy.html" title="R509::Cert::Extensions::InhibitAnyPolicy (class)">R509::Cert::Extensions::InhibitAnyPolicy</a></span></tt>) <strong>inhibit_any_policy</strong>
|
2476
2705
|
|
2477
2706
|
|
2478
2707
|
|
@@ -2481,7 +2710,9 @@ CA as the cert so do that check yourself</p>
|
|
2481
2710
|
</h3><div class="docstring">
|
2482
2711
|
<div class="discussion">
|
2483
2712
|
|
2484
|
-
<p>Returns this object's
|
2713
|
+
<p>Returns this object's InhibitAnyPolicy extension as an R509 extension</p>
|
2714
|
+
|
2715
|
+
<p>if this cert does not have a InhibitAnyPolicy extension.</p>
|
2485
2716
|
|
2486
2717
|
|
2487
2718
|
</div>
|
@@ -2494,13 +2725,13 @@ CA as the cert so do that check yourself</p>
|
|
2494
2725
|
<li>
|
2495
2726
|
|
2496
2727
|
|
2497
|
-
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/
|
2728
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/InhibitAnyPolicy.html" title="R509::Cert::Extensions::InhibitAnyPolicy (class)">R509::Cert::Extensions::InhibitAnyPolicy</a></span></tt>)</span>
|
2498
2729
|
|
2499
2730
|
|
2500
2731
|
|
2501
2732
|
—
|
2502
2733
|
<div class='inline'>
|
2503
|
-
<p>The object, or nil
|
2734
|
+
<p>The object, or nil</p>
|
2504
2735
|
</div>
|
2505
2736
|
|
2506
2737
|
</li>
|
@@ -2513,15 +2744,15 @@ CA as the cert so do that check yourself</p>
|
|
2513
2744
|
<pre class="lines">
|
2514
2745
|
|
2515
2746
|
|
2516
|
-
|
2517
|
-
|
2518
|
-
|
2747
|
+
383
|
2748
|
+
384
|
2749
|
+
385</pre>
|
2519
2750
|
</td>
|
2520
2751
|
<td>
|
2521
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2752
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 383</span>
|
2522
2753
|
|
2523
|
-
<span class='kw'>def</span> <span class='id identifier
|
2524
|
-
|
2754
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_inhibit_any_policy'>inhibit_any_policy</span>
|
2755
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>InhibitAnyPolicy</span><span class='rbracket'>]</span>
|
2525
2756
|
<span class='kw'>end</span></pre>
|
2526
2757
|
</td>
|
2527
2758
|
</tr>
|
@@ -2529,9 +2760,9 @@ CA as the cert so do that check yourself</p>
|
|
2529
2760
|
</div>
|
2530
2761
|
|
2531
2762
|
<div class="method_details ">
|
2532
|
-
<h3 class="signature " id="
|
2763
|
+
<h3 class="signature " id="is_revoked_by_crl?-instance_method">
|
2533
2764
|
|
2534
|
-
- (<tt>
|
2765
|
+
- (<tt>Boolean</tt>) <strong>is_revoked_by_crl?</strong>(r509_crl)
|
2535
2766
|
|
2536
2767
|
|
2537
2768
|
|
@@ -2540,47 +2771,64 @@ CA as the cert so do that check yourself</p>
|
|
2540
2771
|
</h3><div class="docstring">
|
2541
2772
|
<div class="discussion">
|
2542
2773
|
|
2543
|
-
<p>
|
2774
|
+
<p>Checks the given CRL for this certificate's serial number. Note that this
|
2775
|
+
does NOT check to verify that the CRL you're checking is signed by the same
|
2776
|
+
CA as the cert so do that check yourself</p>
|
2544
2777
|
|
2545
2778
|
|
2546
2779
|
</div>
|
2547
2780
|
</div>
|
2548
2781
|
<div class="tags">
|
2549
|
-
|
2550
|
-
<
|
2551
|
-
<ul class="return">
|
2782
|
+
<p class="tag_title">Parameters:</p>
|
2783
|
+
<ul class="param">
|
2552
2784
|
|
2553
2785
|
<li>
|
2554
2786
|
|
2787
|
+
<span class='name'>r509_crl</span>
|
2788
|
+
|
2555
2789
|
|
2556
|
-
<span class='type'>(<tt>
|
2790
|
+
<span class='type'>(<tt><span class='object_link'><a href="CRL/SignedList.html" title="R509::CRL::SignedList (class)">R509::CRL::SignedList</a></span></tt>)</span>
|
2557
2791
|
|
2558
2792
|
|
2559
2793
|
|
2560
2794
|
—
|
2561
2795
|
<div class='inline'>
|
2562
|
-
<p>
|
2796
|
+
<p>A CRL from the CA that issued this certificate.</p>
|
2563
2797
|
</div>
|
2564
2798
|
|
2565
2799
|
</li>
|
2566
2800
|
|
2567
2801
|
</ul>
|
2568
2802
|
|
2803
|
+
<p class="tag_title">Returns:</p>
|
2804
|
+
<ul class="return">
|
2805
|
+
|
2806
|
+
<li>
|
2807
|
+
|
2808
|
+
|
2809
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2810
|
+
|
2811
|
+
|
2812
|
+
|
2813
|
+
</li>
|
2814
|
+
|
2815
|
+
</ul>
|
2816
|
+
|
2569
2817
|
</div><table class="source_code">
|
2570
2818
|
<tr>
|
2571
2819
|
<td>
|
2572
2820
|
<pre class="lines">
|
2573
2821
|
|
2574
2822
|
|
2575
|
-
|
2576
|
-
|
2577
|
-
|
2823
|
+
262
|
2824
|
+
263
|
2825
|
+
264</pre>
|
2578
2826
|
</td>
|
2579
2827
|
<td>
|
2580
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2828
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 262</span>
|
2581
2829
|
|
2582
|
-
<span class='kw'>def</span> <span class='id identifier
|
2583
|
-
|
2830
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_is_revoked_by_crl?'>is_revoked_by_crl?</span><span class='lparen'>(</span> <span class='id identifier rubyid_r509_crl'>r509_crl</span> <span class='rparen'>)</span>
|
2831
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_r509_crl'>r509_crl</span><span class='period'>.</span><span class='id identifier rubyid_revoked?'>revoked?</span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_serial'>serial</span> <span class='rparen'>)</span>
|
2584
2832
|
<span class='kw'>end</span></pre>
|
2585
2833
|
</td>
|
2586
2834
|
</tr>
|
@@ -2588,9 +2836,9 @@ CA as the cert so do that check yourself</p>
|
|
2588
2836
|
</div>
|
2589
2837
|
|
2590
2838
|
<div class="method_details ">
|
2591
|
-
<h3 class="signature " id="
|
2839
|
+
<h3 class="signature " id="key_algorithm-instance_method">
|
2592
2840
|
|
2593
|
-
- (<tt>
|
2841
|
+
- (<tt>Symbol</tt>) <strong>key_algorithm</strong>
|
2594
2842
|
|
2595
2843
|
|
2596
2844
|
|
@@ -2599,7 +2847,7 @@ CA as the cert so do that check yourself</p>
|
|
2599
2847
|
</h3><div class="docstring">
|
2600
2848
|
<div class="discussion">
|
2601
2849
|
|
2602
|
-
<p>Returns
|
2850
|
+
<p>Returns key algorithm (RSA, DSA, EC)</p>
|
2603
2851
|
|
2604
2852
|
|
2605
2853
|
</div>
|
@@ -2612,13 +2860,13 @@ CA as the cert so do that check yourself</p>
|
|
2612
2860
|
<li>
|
2613
2861
|
|
2614
2862
|
|
2615
|
-
<span class='type'>(<tt>
|
2863
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
2616
2864
|
|
2617
2865
|
|
2618
2866
|
|
2619
2867
|
—
|
2620
2868
|
<div class='inline'>
|
2621
|
-
<p>
|
2869
|
+
<p>value of the key algorithm. :rsa, :dsa, :ec</p>
|
2622
2870
|
</div>
|
2623
2871
|
|
2624
2872
|
</li>
|
@@ -2631,15 +2879,27 @@ CA as the cert so do that check yourself</p>
|
|
2631
2879
|
<pre class="lines">
|
2632
2880
|
|
2633
2881
|
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2882
|
+
220
|
2883
|
+
221
|
2884
|
+
222
|
2885
|
+
223
|
2886
|
+
224
|
2887
|
+
225
|
2888
|
+
226
|
2889
|
+
227
|
2890
|
+
228</pre>
|
2637
2891
|
</td>
|
2638
2892
|
<td>
|
2639
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2893
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 220</span>
|
2640
2894
|
|
2641
|
-
<span class='kw'>def</span> <span class='id identifier
|
2642
|
-
|
2895
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_key_algorithm'>key_algorithm</span>
|
2896
|
+
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rsa?'>rsa?</span>
|
2897
|
+
<span class='symbol'>:rsa</span>
|
2898
|
+
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dsa?'>dsa?</span>
|
2899
|
+
<span class='symbol'>:dsa</span>
|
2900
|
+
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ec?'>ec?</span>
|
2901
|
+
<span class='symbol'>:ec</span>
|
2902
|
+
<span class='kw'>end</span>
|
2643
2903
|
<span class='kw'>end</span></pre>
|
2644
2904
|
</td>
|
2645
2905
|
</tr>
|
@@ -2647,18 +2907,24 @@ CA as the cert so do that check yourself</p>
|
|
2647
2907
|
</div>
|
2648
2908
|
|
2649
2909
|
<div class="method_details ">
|
2650
|
-
<h3 class="signature " id="
|
2910
|
+
<h3 class="signature " id="key_usage-instance_method">
|
2651
2911
|
|
2652
|
-
- (<tt>
|
2912
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/KeyUsage.html" title="R509::Cert::Extensions::KeyUsage (class)">R509::Cert::Extensions::KeyUsage</a></span></tt>) <strong>key_usage</strong>
|
2653
2913
|
|
2654
2914
|
|
2655
2915
|
|
2916
|
+
<span class="aliases">Also known as:
|
2917
|
+
<span class="names"><span id='ku-instance_method'>ku</span></span>
|
2918
|
+
</span>
|
2919
|
+
|
2656
2920
|
|
2657
2921
|
|
2658
2922
|
</h3><div class="docstring">
|
2659
2923
|
<div class="discussion">
|
2660
2924
|
|
2661
|
-
<p>Returns
|
2925
|
+
<p>Returns this object's KeyUsage extension as an R509 extension</p>
|
2926
|
+
|
2927
|
+
<p>if this cert does not have a KeyUsage extension.</p>
|
2662
2928
|
|
2663
2929
|
|
2664
2930
|
</div>
|
@@ -2671,13 +2937,13 @@ CA as the cert so do that check yourself</p>
|
|
2671
2937
|
<li>
|
2672
2938
|
|
2673
2939
|
|
2674
|
-
<span class='type'>(<tt>
|
2940
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/KeyUsage.html" title="R509::Cert::Extensions::KeyUsage (class)">R509::Cert::Extensions::KeyUsage</a></span></tt>)</span>
|
2675
2941
|
|
2676
2942
|
|
2677
2943
|
|
2678
2944
|
—
|
2679
2945
|
<div class='inline'>
|
2680
|
-
<p>
|
2946
|
+
<p>The object, or nil</p>
|
2681
2947
|
</div>
|
2682
2948
|
|
2683
2949
|
</li>
|
@@ -2690,15 +2956,15 @@ CA as the cert so do that check yourself</p>
|
|
2690
2956
|
<pre class="lines">
|
2691
2957
|
|
2692
2958
|
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2959
|
+
305
|
2960
|
+
306
|
2961
|
+
307</pre>
|
2696
2962
|
</td>
|
2697
2963
|
<td>
|
2698
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2964
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 305</span>
|
2699
2965
|
|
2700
|
-
<span class='kw'>def</span> <span class='id identifier
|
2701
|
-
|
2966
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_key_usage'>key_usage</span>
|
2967
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>KeyUsage</span><span class='rbracket'>]</span>
|
2702
2968
|
<span class='kw'>end</span></pre>
|
2703
2969
|
</td>
|
2704
2970
|
</tr>
|
@@ -2706,9 +2972,9 @@ CA as the cert so do that check yourself</p>
|
|
2706
2972
|
</div>
|
2707
2973
|
|
2708
2974
|
<div class="method_details ">
|
2709
|
-
<h3 class="signature " id="
|
2975
|
+
<h3 class="signature " id="name_constraints-instance_method">
|
2710
2976
|
|
2711
|
-
- (<tt>
|
2977
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/NameConstraints.html" title="R509::Cert::Extensions::NameConstraints (class)">R509::Cert::Extensions::NameConstraints</a></span></tt>) <strong>name_constraints</strong>
|
2712
2978
|
|
2713
2979
|
|
2714
2980
|
|
@@ -2717,12 +2983,9 @@ CA as the cert so do that check yourself</p>
|
|
2717
2983
|
</h3><div class="docstring">
|
2718
2984
|
<div class="discussion">
|
2719
2985
|
|
2720
|
-
<p>Returns
|
2721
|
-
specific objects.</p>
|
2986
|
+
<p>Returns this object's NameConstraints extension as an R509 extension</p>
|
2722
2987
|
|
2723
|
-
<p>
|
2724
|
-
keyed with the R509 extension class. Extensions without an R509
|
2725
|
-
implementation are ignored (see #get_unknown_extensions).</p>
|
2988
|
+
<p>if this cert does not have a NameConstraints extension.</p>
|
2726
2989
|
|
2727
2990
|
|
2728
2991
|
</div>
|
@@ -2735,13 +2998,13 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2735
2998
|
<li>
|
2736
2999
|
|
2737
3000
|
|
2738
|
-
<span class='type'>(<tt>
|
3001
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/NameConstraints.html" title="R509::Cert::Extensions::NameConstraints (class)">R509::Cert::Extensions::NameConstraints</a></span></tt>)</span>
|
2739
3002
|
|
2740
3003
|
|
2741
3004
|
|
2742
3005
|
—
|
2743
3006
|
<div class='inline'>
|
2744
|
-
<p>
|
3007
|
+
<p>The object, or nil</p>
|
2745
3008
|
</div>
|
2746
3009
|
|
2747
3010
|
</li>
|
@@ -2754,23 +3017,15 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2754
3017
|
<pre class="lines">
|
2755
3018
|
|
2756
3019
|
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2760
|
-
316
|
2761
|
-
317
|
2762
|
-
318
|
2763
|
-
319</pre>
|
3020
|
+
399
|
3021
|
+
400
|
3022
|
+
401</pre>
|
2764
3023
|
</td>
|
2765
3024
|
<td>
|
2766
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2767
|
-
|
2768
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_r509_extensions'>r509_extensions</span>
|
2769
|
-
<span class='kw'>if</span> <span class='ivar'>@r509_extensions</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2770
|
-
<span class='ivar'>@r509_extensions</span> <span class='op'>=</span> <span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_wrap_openssl_extensions'>wrap_openssl_extensions</span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_extensions'>extensions</span> <span class='rparen'>)</span>
|
2771
|
-
<span class='kw'>end</span>
|
3025
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 399</span>
|
2772
3026
|
|
2773
|
-
|
3027
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name_constraints'>name_constraints</span>
|
3028
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>NameConstraints</span><span class='rbracket'>]</span>
|
2774
3029
|
<span class='kw'>end</span></pre>
|
2775
3030
|
</td>
|
2776
3031
|
</tr>
|
@@ -2778,9 +3033,9 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2778
3033
|
</div>
|
2779
3034
|
|
2780
3035
|
<div class="method_details ">
|
2781
|
-
<h3 class="signature " id="
|
3036
|
+
<h3 class="signature " id="not_after-instance_method">
|
2782
3037
|
|
2783
|
-
- (<tt>
|
3038
|
+
- (<tt>Time</tt>) <strong>not_after</strong>
|
2784
3039
|
|
2785
3040
|
|
2786
3041
|
|
@@ -2789,7 +3044,7 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2789
3044
|
</h3><div class="docstring">
|
2790
3045
|
<div class="discussion">
|
2791
3046
|
|
2792
|
-
<p>Returns
|
3047
|
+
<p>Returns ending (notAfter) of certificate validity period</p>
|
2793
3048
|
|
2794
3049
|
|
2795
3050
|
</div>
|
@@ -2802,13 +3057,13 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2802
3057
|
<li>
|
2803
3058
|
|
2804
3059
|
|
2805
|
-
<span class='type'>(<tt>
|
3060
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
2806
3061
|
|
2807
3062
|
|
2808
3063
|
|
2809
3064
|
—
|
2810
3065
|
<div class='inline'>
|
2811
|
-
<p>
|
3066
|
+
<p>time object</p>
|
2812
3067
|
</div>
|
2813
3068
|
|
2814
3069
|
</li>
|
@@ -2821,15 +3076,15 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2821
3076
|
<pre class="lines">
|
2822
3077
|
|
2823
3078
|
|
2824
|
-
|
2825
|
-
|
2826
|
-
|
3079
|
+
97
|
3080
|
+
98
|
3081
|
+
99</pre>
|
2827
3082
|
</td>
|
2828
3083
|
<td>
|
2829
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3084
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 97</span>
|
2830
3085
|
|
2831
|
-
<span class='kw'>def</span> <span class='id identifier
|
2832
|
-
|
3086
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_not_after'>not_after</span>
|
3087
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_not_after'>not_after</span>
|
2833
3088
|
<span class='kw'>end</span></pre>
|
2834
3089
|
</td>
|
2835
3090
|
</tr>
|
@@ -2837,9 +3092,9 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2837
3092
|
</div>
|
2838
3093
|
|
2839
3094
|
<div class="method_details ">
|
2840
|
-
<h3 class="signature " id="
|
3095
|
+
<h3 class="signature " id="not_before-instance_method">
|
2841
3096
|
|
2842
|
-
- (<tt>
|
3097
|
+
- (<tt>Time</tt>) <strong>not_before</strong>
|
2843
3098
|
|
2844
3099
|
|
2845
3100
|
|
@@ -2848,7 +3103,7 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2848
3103
|
</h3><div class="docstring">
|
2849
3104
|
<div class="discussion">
|
2850
3105
|
|
2851
|
-
<p>
|
3106
|
+
<p>Returns beginning (notBefore) of certificate validity period</p>
|
2852
3107
|
|
2853
3108
|
|
2854
3109
|
</div>
|
@@ -2861,13 +3116,13 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2861
3116
|
<li>
|
2862
3117
|
|
2863
3118
|
|
2864
|
-
<span class='type'>(<tt>
|
3119
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
2865
3120
|
|
2866
3121
|
|
2867
3122
|
|
2868
3123
|
—
|
2869
3124
|
<div class='inline'>
|
2870
|
-
<p>
|
3125
|
+
<p>time object</p>
|
2871
3126
|
</div>
|
2872
3127
|
|
2873
3128
|
</li>
|
@@ -2880,23 +3135,15 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2880
3135
|
<pre class="lines">
|
2881
3136
|
|
2882
3137
|
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2886
|
-
180
|
2887
|
-
181
|
2888
|
-
182
|
2889
|
-
183</pre>
|
3138
|
+
76
|
3139
|
+
77
|
3140
|
+
78</pre>
|
2890
3141
|
</td>
|
2891
3142
|
<td>
|
2892
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3143
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 76</span>
|
2893
3144
|
|
2894
|
-
<span class='kw'>def</span> <span class='id identifier
|
2895
|
-
|
2896
|
-
<span class='kw'>return</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
2897
|
-
<span class='kw'>else</span>
|
2898
|
-
<span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_subject_alternative_name'>subject_alternative_name</span><span class='period'>.</span><span class='id identifier rubyid_dns_names'>dns_names</span>
|
2899
|
-
<span class='kw'>end</span>
|
3145
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_not_before'>not_before</span>
|
3146
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_not_before'>not_before</span>
|
2900
3147
|
<span class='kw'>end</span></pre>
|
2901
3148
|
</td>
|
2902
3149
|
</tr>
|
@@ -2904,9 +3151,9 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2904
3151
|
</div>
|
2905
3152
|
|
2906
3153
|
<div class="method_details ">
|
2907
|
-
<h3 class="signature " id="
|
3154
|
+
<h3 class="signature " id="ocsp_no_check?-instance_method">
|
2908
3155
|
|
2909
|
-
- (<tt>
|
3156
|
+
- (<tt>Boolean</tt>) <strong>ocsp_no_check?</strong>
|
2910
3157
|
|
2911
3158
|
|
2912
3159
|
|
@@ -2915,7 +3162,8 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2915
3162
|
</h3><div class="docstring">
|
2916
3163
|
<div class="discussion">
|
2917
3164
|
|
2918
|
-
<p>Returns the
|
3165
|
+
<p>Returns true if the OCSP No Check extension is present (value is irrelevant
|
3166
|
+
to this extension)</p>
|
2919
3167
|
|
2920
3168
|
|
2921
3169
|
</div>
|
@@ -2928,10 +3176,15 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2928
3176
|
<li>
|
2929
3177
|
|
2930
3178
|
|
2931
|
-
<span class='type'>(<tt>
|
3179
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2932
3180
|
|
2933
3181
|
|
2934
3182
|
|
3183
|
+
—
|
3184
|
+
<div class='inline'>
|
3185
|
+
<p>presence/absence of the nocheck extension</p>
|
3186
|
+
</div>
|
3187
|
+
|
2935
3188
|
</li>
|
2936
3189
|
|
2937
3190
|
</ul>
|
@@ -2942,15 +3195,15 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2942
3195
|
<pre class="lines">
|
2943
3196
|
|
2944
3197
|
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
3198
|
+
367
|
3199
|
+
368
|
3200
|
+
369</pre>
|
2948
3201
|
</td>
|
2949
3202
|
<td>
|
2950
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3203
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 367</span>
|
2951
3204
|
|
2952
|
-
<span class='kw'>def</span> <span class='id identifier
|
2953
|
-
|
3205
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ocsp_no_check?'>ocsp_no_check?</span>
|
3206
|
+
<span class='kw'>return</span> <span class='lparen'>(</span><span class='id identifier rubyid_extensions'>extensions</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>OCSPNoCheck</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
2954
3207
|
<span class='kw'>end</span></pre>
|
2955
3208
|
</td>
|
2956
3209
|
</tr>
|
@@ -2958,9 +3211,9 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2958
3211
|
</div>
|
2959
3212
|
|
2960
3213
|
<div class="method_details ">
|
2961
|
-
<h3 class="signature " id="
|
3214
|
+
<h3 class="signature " id="policy_constraints-instance_method">
|
2962
3215
|
|
2963
|
-
- (<tt>
|
3216
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/PolicyConstraints.html" title="R509::Cert::Extensions::PolicyConstraints (class)">R509::Cert::Extensions::PolicyConstraints</a></span></tt>) <strong>policy_constraints</strong>
|
2964
3217
|
|
2965
3218
|
|
2966
3219
|
|
@@ -2969,7 +3222,9 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2969
3222
|
</h3><div class="docstring">
|
2970
3223
|
<div class="discussion">
|
2971
3224
|
|
2972
|
-
<p>Returns
|
3225
|
+
<p>Returns this object's PolicyConstraints extension as an R509 extension</p>
|
3226
|
+
|
3227
|
+
<p>if this cert does not have a PolicyConstraints extension.</p>
|
2973
3228
|
|
2974
3229
|
|
2975
3230
|
</div>
|
@@ -2982,14 +3237,13 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2982
3237
|
<li>
|
2983
3238
|
|
2984
3239
|
|
2985
|
-
<span class='type'>(<tt>
|
3240
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/PolicyConstraints.html" title="R509::Cert::Extensions::PolicyConstraints (class)">R509::Cert::Extensions::PolicyConstraints</a></span></tt>)</span>
|
2986
3241
|
|
2987
3242
|
|
2988
3243
|
|
2989
3244
|
—
|
2990
3245
|
<div class='inline'>
|
2991
|
-
<p>
|
2992
|
-
sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
3246
|
+
<p>The object, or nil</p>
|
2993
3247
|
</div>
|
2994
3248
|
|
2995
3249
|
</li>
|
@@ -3002,15 +3256,15 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3002
3256
|
<pre class="lines">
|
3003
3257
|
|
3004
3258
|
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3259
|
+
391
|
3260
|
+
392
|
3261
|
+
393</pre>
|
3008
3262
|
</td>
|
3009
3263
|
<td>
|
3010
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3264
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 391</span>
|
3011
3265
|
|
3012
|
-
<span class='kw'>def</span> <span class='id identifier
|
3013
|
-
|
3266
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_policy_constraints'>policy_constraints</span>
|
3267
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>PolicyConstraints</span><span class='rbracket'>]</span>
|
3014
3268
|
<span class='kw'>end</span></pre>
|
3015
3269
|
</td>
|
3016
3270
|
</tr>
|
@@ -3018,9 +3272,9 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3018
3272
|
</div>
|
3019
3273
|
|
3020
3274
|
<div class="method_details ">
|
3021
|
-
<h3 class="signature " id="
|
3275
|
+
<h3 class="signature " id="public_key-instance_method">
|
3022
3276
|
|
3023
|
-
- (<tt>OpenSSL::
|
3277
|
+
- (<tt>OpenSSL::PKey::RSA</tt>) <strong>public_key</strong>
|
3024
3278
|
|
3025
3279
|
|
3026
3280
|
|
@@ -3029,7 +3283,7 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3029
3283
|
</h3><div class="docstring">
|
3030
3284
|
<div class="discussion">
|
3031
3285
|
|
3032
|
-
<p>Returns the
|
3286
|
+
<p>Returns the certificate public key</p>
|
3033
3287
|
|
3034
3288
|
|
3035
3289
|
</div>
|
@@ -3042,13 +3296,13 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3042
3296
|
<li>
|
3043
3297
|
|
3044
3298
|
|
3045
|
-
<span class='type'>(<tt>OpenSSL::
|
3299
|
+
<span class='type'>(<tt>OpenSSL::PKey::RSA</tt>)</span>
|
3046
3300
|
|
3047
3301
|
|
3048
3302
|
|
3049
3303
|
—
|
3050
3304
|
<div class='inline'>
|
3051
|
-
<p>
|
3305
|
+
<p>public key object</p>
|
3052
3306
|
</div>
|
3053
3307
|
|
3054
3308
|
</li>
|
@@ -3061,15 +3315,15 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3061
3315
|
<pre class="lines">
|
3062
3316
|
|
3063
3317
|
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3318
|
+
104
|
3319
|
+
105
|
3320
|
+
106</pre>
|
3067
3321
|
</td>
|
3068
3322
|
<td>
|
3069
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3323
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 104</span>
|
3070
3324
|
|
3071
|
-
<span class='kw'>def</span> <span class='id identifier
|
3072
|
-
|
3325
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_public_key'>public_key</span>
|
3326
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span>
|
3073
3327
|
<span class='kw'>end</span></pre>
|
3074
3328
|
</td>
|
3075
3329
|
</tr>
|
@@ -3077,9 +3331,9 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3077
3331
|
</div>
|
3078
3332
|
|
3079
3333
|
<div class="method_details ">
|
3080
|
-
<h3 class="signature " id="
|
3334
|
+
<h3 class="signature " id="rsa?-instance_method">
|
3081
3335
|
|
3082
|
-
- (<tt
|
3336
|
+
- (<tt>Boolean</tt>) <strong>rsa?</strong>
|
3083
3337
|
|
3084
3338
|
|
3085
3339
|
|
@@ -3088,7 +3342,7 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3088
3342
|
</h3><div class="docstring">
|
3089
3343
|
<div class="discussion">
|
3090
3344
|
|
3091
|
-
<p>Returns
|
3345
|
+
<p>Returns whether the public key is RSA</p>
|
3092
3346
|
|
3093
3347
|
|
3094
3348
|
</div>
|
@@ -3101,14 +3355,13 @@ sha256WithRSAEncryption, md5WithRSAEncryption</p>
|
|
3101
3355
|
<li>
|
3102
3356
|
|
3103
3357
|
|
3104
|
-
<span class='type'>(<tt
|
3358
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
3105
3359
|
|
3106
3360
|
|
3107
3361
|
|
3108
3362
|
—
|
3109
3363
|
<div class='inline'>
|
3110
|
-
<p>
|
3111
|
-
extension.</p>
|
3364
|
+
<p>true if the public key is RSA, false otherwise</p>
|
3112
3365
|
</div>
|
3113
3366
|
|
3114
3367
|
</li>
|
@@ -3121,15 +3374,15 @@ extension.</p>
|
|
3121
3374
|
<pre class="lines">
|
3122
3375
|
|
3123
3376
|
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3377
|
+
167
|
3378
|
+
168
|
3379
|
+
169</pre>
|
3127
3380
|
</td>
|
3128
3381
|
<td>
|
3129
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3382
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 167</span>
|
3130
3383
|
|
3131
|
-
<span class='kw'>def</span> <span class='id identifier
|
3132
|
-
|
3384
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rsa?'>rsa?</span>
|
3385
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</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'>PKey</span><span class='op'>::</span><span class='const'>RSA</span><span class='rparen'>)</span>
|
3133
3386
|
<span class='kw'>end</span></pre>
|
3134
3387
|
</td>
|
3135
3388
|
</tr>
|
@@ -3137,9 +3390,9 @@ extension.</p>
|
|
3137
3390
|
</div>
|
3138
3391
|
|
3139
3392
|
<div class="method_details ">
|
3140
|
-
<h3 class="signature " id="
|
3393
|
+
<h3 class="signature " id="serial-instance_method">
|
3141
3394
|
|
3142
|
-
- (<tt>
|
3395
|
+
- (<tt>Integer</tt>) <strong>serial</strong>
|
3143
3396
|
|
3144
3397
|
|
3145
3398
|
|
@@ -3148,7 +3401,7 @@ extension.</p>
|
|
3148
3401
|
</h3><div class="docstring">
|
3149
3402
|
<div class="discussion">
|
3150
3403
|
|
3151
|
-
<p>Returns the
|
3404
|
+
<p>Returns the serial number of the certificate in decimal form</p>
|
3152
3405
|
|
3153
3406
|
|
3154
3407
|
</div>
|
@@ -3161,7 +3414,7 @@ extension.</p>
|
|
3161
3414
|
<li>
|
3162
3415
|
|
3163
3416
|
|
3164
|
-
<span class='type'>(<tt>
|
3417
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
3165
3418
|
|
3166
3419
|
|
3167
3420
|
|
@@ -3175,15 +3428,15 @@ extension.</p>
|
|
3175
3428
|
<pre class="lines">
|
3176
3429
|
|
3177
3430
|
|
3178
|
-
|
3179
|
-
|
3180
|
-
|
3431
|
+
83
|
3432
|
+
84
|
3433
|
+
85</pre>
|
3181
3434
|
</td>
|
3182
3435
|
<td>
|
3183
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3436
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 83</span>
|
3184
3437
|
|
3185
|
-
<span class='kw'>def</span> <span class='id identifier
|
3186
|
-
|
3438
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_serial'>serial</span>
|
3439
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
3187
3440
|
<span class='kw'>end</span></pre>
|
3188
3441
|
</td>
|
3189
3442
|
</tr>
|
@@ -3191,9 +3444,9 @@ extension.</p>
|
|
3191
3444
|
</div>
|
3192
3445
|
|
3193
3446
|
<div class="method_details ">
|
3194
|
-
<h3 class="signature " id="
|
3447
|
+
<h3 class="signature " id="signature_algorithm-instance_method">
|
3195
3448
|
|
3196
|
-
- (<tt>String</tt>) <strong>
|
3449
|
+
- (<tt>String</tt>) <strong>signature_algorithm</strong>
|
3197
3450
|
|
3198
3451
|
|
3199
3452
|
|
@@ -3202,7 +3455,7 @@ extension.</p>
|
|
3202
3455
|
</h3><div class="docstring">
|
3203
3456
|
<div class="discussion">
|
3204
3457
|
|
3205
|
-
<p>Returns
|
3458
|
+
<p>Returns signature algorithm</p>
|
3206
3459
|
|
3207
3460
|
|
3208
3461
|
</div>
|
@@ -3221,7 +3474,8 @@ extension.</p>
|
|
3221
3474
|
|
3222
3475
|
—
|
3223
3476
|
<div class='inline'>
|
3224
|
-
<p>value of the
|
3477
|
+
<p>value of the signature algorithm. E.g. sha1WithRSAEncryption,
|
3478
|
+
sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
3225
3479
|
</div>
|
3226
3480
|
|
3227
3481
|
</li>
|
@@ -3234,19 +3488,15 @@ extension.</p>
|
|
3234
3488
|
<pre class="lines">
|
3235
3489
|
|
3236
3490
|
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
198
|
3241
|
-
199</pre>
|
3491
|
+
213
|
3492
|
+
214
|
3493
|
+
215</pre>
|
3242
3494
|
</td>
|
3243
3495
|
<td>
|
3244
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3496
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 213</span>
|
3245
3497
|
|
3246
|
-
<span class='kw'>def</span> <span class='id identifier
|
3247
|
-
|
3248
|
-
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
3249
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
3498
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_signature_algorithm'>signature_algorithm</span>
|
3499
|
+
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_signature_algorithm'>signature_algorithm</span>
|
3250
3500
|
<span class='kw'>end</span></pre>
|
3251
3501
|
</td>
|
3252
3502
|
</tr>
|
@@ -3254,18 +3504,24 @@ extension.</p>
|
|
3254
3504
|
</div>
|
3255
3505
|
|
3256
3506
|
<div class="method_details ">
|
3257
|
-
<h3 class="signature " id="
|
3507
|
+
<h3 class="signature " id="subject_alternative_name-instance_method">
|
3258
3508
|
|
3259
|
-
- (<tt><span class='object_link'><a href="Cert/Extensions/
|
3509
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/SubjectAlternativeName.html" title="R509::Cert::Extensions::SubjectAlternativeName (class)">R509::Cert::Extensions::SubjectAlternativeName</a></span></tt>) <strong>subject_alternative_name</strong>
|
3260
3510
|
|
3261
3511
|
|
3262
3512
|
|
3513
|
+
<span class="aliases">Also known as:
|
3514
|
+
<span class="names"><span id='san-instance_method'>san</span>, <span id='subject_alt_name-instance_method'>subject_alt_name</span></span>
|
3515
|
+
</span>
|
3516
|
+
|
3263
3517
|
|
3264
3518
|
|
3265
3519
|
</h3><div class="docstring">
|
3266
3520
|
<div class="discussion">
|
3267
3521
|
|
3268
|
-
<p>Returns this object's
|
3522
|
+
<p>Returns this object's SubjectAlternativeName extension as an R509 extension</p>
|
3523
|
+
|
3524
|
+
<p>if this cert does not have a SubjectAlternativeName extension.</p>
|
3269
3525
|
|
3270
3526
|
|
3271
3527
|
</div>
|
@@ -3278,14 +3534,13 @@ extension.</p>
|
|
3278
3534
|
<li>
|
3279
3535
|
|
3280
3536
|
|
3281
|
-
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/
|
3537
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/SubjectAlternativeName.html" title="R509::Cert::Extensions::SubjectAlternativeName (class)">R509::Cert::Extensions::SubjectAlternativeName</a></span></tt>)</span>
|
3282
3538
|
|
3283
3539
|
|
3284
3540
|
|
3285
3541
|
—
|
3286
3542
|
<div class='inline'>
|
3287
|
-
<p>The object, or nil
|
3288
|
-
extension.</p>
|
3543
|
+
<p>The object, or nil</p>
|
3289
3544
|
</div>
|
3290
3545
|
|
3291
3546
|
</li>
|
@@ -3298,15 +3553,15 @@ extension.</p>
|
|
3298
3553
|
<pre class="lines">
|
3299
3554
|
|
3300
3555
|
|
3301
|
-
|
3302
|
-
|
3303
|
-
|
3556
|
+
339
|
3557
|
+
340
|
3558
|
+
341</pre>
|
3304
3559
|
</td>
|
3305
3560
|
<td>
|
3306
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3561
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 339</span>
|
3307
3562
|
|
3308
|
-
<span class='kw'>def</span> <span class='id identifier
|
3309
|
-
|
3563
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_subject_alternative_name'>subject_alternative_name</span>
|
3564
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>SubjectAlternativeName</span><span class='rbracket'>]</span>
|
3310
3565
|
<span class='kw'>end</span></pre>
|
3311
3566
|
</td>
|
3312
3567
|
</tr>
|
@@ -3314,9 +3569,9 @@ extension.</p>
|
|
3314
3569
|
</div>
|
3315
3570
|
|
3316
3571
|
<div class="method_details ">
|
3317
|
-
<h3 class="signature " id="
|
3572
|
+
<h3 class="signature " id="subject_key_identifier-instance_method">
|
3318
3573
|
|
3319
|
-
- (<tt>
|
3574
|
+
- (<tt><span class='object_link'><a href="Cert/Extensions/SubjectKeyIdentifier.html" title="R509::Cert::Extensions::SubjectKeyIdentifier (class)">R509::Cert::Extensions::SubjectKeyIdentifier</a></span></tt>) <strong>subject_key_identifier</strong>
|
3320
3575
|
|
3321
3576
|
|
3322
3577
|
|
@@ -3325,7 +3580,9 @@ extension.</p>
|
|
3325
3580
|
</h3><div class="docstring">
|
3326
3581
|
<div class="discussion">
|
3327
3582
|
|
3328
|
-
<p>
|
3583
|
+
<p>Returns this object's SubjectKeyIdentifier extension as an R509 extension</p>
|
3584
|
+
|
3585
|
+
<p>if this cert does not have a SubjectKeyIdentifier extension.</p>
|
3329
3586
|
|
3330
3587
|
|
3331
3588
|
</div>
|
@@ -3338,13 +3595,13 @@ extension.</p>
|
|
3338
3595
|
<li>
|
3339
3596
|
|
3340
3597
|
|
3341
|
-
<span class='type'>(<tt>
|
3598
|
+
<span class='type'>(<tt><span class='object_link'><a href="Cert/Extensions/SubjectKeyIdentifier.html" title="R509::Cert::Extensions::SubjectKeyIdentifier (class)">R509::Cert::Extensions::SubjectKeyIdentifier</a></span></tt>)</span>
|
3342
3599
|
|
3343
3600
|
|
3344
3601
|
|
3345
3602
|
—
|
3346
3603
|
<div class='inline'>
|
3347
|
-
<p>
|
3604
|
+
<p>The object, or nil</p>
|
3348
3605
|
</div>
|
3349
3606
|
|
3350
3607
|
</li>
|
@@ -3357,23 +3614,15 @@ extension.</p>
|
|
3357
3614
|
<pre class="lines">
|
3358
3615
|
|
3359
3616
|
|
3360
|
-
|
3361
|
-
|
3362
|
-
|
3363
|
-
208
|
3364
|
-
209
|
3365
|
-
210
|
3366
|
-
211</pre>
|
3617
|
+
323
|
3618
|
+
324
|
3619
|
+
325</pre>
|
3367
3620
|
</td>
|
3368
3621
|
<td>
|
3369
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3370
|
-
|
3371
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_subject_names'>subject_names</span>
|
3372
|
-
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
3373
|
-
<span class='id identifier rubyid_ret'>ret</span> <span class='op'><<</span> <span class='id identifier rubyid_subject_cn'>subject_cn</span> <span class='kw'>unless</span> <span class='id identifier rubyid_subject_cn'>subject_cn</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
3374
|
-
<span class='id identifier rubyid_ret'>ret</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_san_names'>san_names</span> <span class='rparen'>)</span>
|
3622
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 323</span>
|
3375
3623
|
|
3376
|
-
|
3624
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_subject_key_identifier'>subject_key_identifier</span>
|
3625
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_extensions'>extensions</span><span class='lbracket'>[</span><span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>SubjectKeyIdentifier</span><span class='rbracket'>]</span>
|
3377
3626
|
<span class='kw'>end</span></pre>
|
3378
3627
|
</td>
|
3379
3628
|
</tr>
|
@@ -3424,19 +3673,19 @@ extension.</p>
|
|
3424
3673
|
<pre class="lines">
|
3425
3674
|
|
3426
3675
|
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
3431
|
-
|
3676
|
+
67
|
3677
|
+
68
|
3678
|
+
69
|
3679
|
+
70
|
3680
|
+
71</pre>
|
3432
3681
|
</td>
|
3433
3682
|
<td>
|
3434
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3683
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 67</span>
|
3435
3684
|
|
3436
3685
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_der'>to_der</span>
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3686
|
+
<span class='kw'>if</span> <span class='ivar'>@cert</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'>X509</span><span class='op'>::</span><span class='const'>Certificate</span><span class='rparen'>)</span>
|
3687
|
+
<span class='kw'>return</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span>
|
3688
|
+
<span class='kw'>end</span>
|
3440
3689
|
<span class='kw'>end</span></pre>
|
3441
3690
|
</td>
|
3442
3691
|
</tr>
|
@@ -3491,19 +3740,19 @@ extension.</p>
|
|
3491
3740
|
<pre class="lines">
|
3492
3741
|
|
3493
3742
|
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3498
|
-
|
3743
|
+
56
|
3744
|
+
57
|
3745
|
+
58
|
3746
|
+
59
|
3747
|
+
60</pre>
|
3499
3748
|
</td>
|
3500
3749
|
<td>
|
3501
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3750
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 56</span>
|
3502
3751
|
|
3503
3752
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_pem'>to_pem</span>
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
3753
|
+
<span class='kw'>if</span> <span class='ivar'>@cert</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'>X509</span><span class='op'>::</span><span class='const'>Certificate</span><span class='rparen'>)</span>
|
3754
|
+
<span class='kw'>return</span> <span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span>
|
3755
|
+
<span class='kw'>end</span>
|
3507
3756
|
<span class='kw'>end</span></pre>
|
3508
3757
|
</td>
|
3509
3758
|
</tr>
|
@@ -3555,15 +3804,15 @@ extensions that do not have R509 implementations.</p>
|
|
3555
3804
|
<pre class="lines">
|
3556
3805
|
|
3557
3806
|
|
3558
|
-
|
3559
|
-
|
3560
|
-
|
3807
|
+
285
|
3808
|
+
286
|
3809
|
+
287</pre>
|
3561
3810
|
</td>
|
3562
3811
|
<td>
|
3563
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3812
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 285</span>
|
3564
3813
|
|
3565
3814
|
<span class='kw'>def</span> <span class='id identifier rubyid_unknown_extensions'>unknown_extensions</span>
|
3566
|
-
|
3815
|
+
<span class='kw'>return</span> <span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_get_unknown_extensions'>get_unknown_extensions</span><span class='lparen'>(</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_extensions'>extensions</span> <span class='rparen'>)</span>
|
3567
3816
|
<span class='kw'>end</span></pre>
|
3568
3817
|
</td>
|
3569
3818
|
</tr>
|
@@ -3610,15 +3859,15 @@ times in the certificate.</p>
|
|
3610
3859
|
<pre class="lines">
|
3611
3860
|
|
3612
3861
|
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3862
|
+
123
|
3863
|
+
124
|
3864
|
+
125</pre>
|
3616
3865
|
</td>
|
3617
3866
|
<td>
|
3618
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3867
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 123</span>
|
3619
3868
|
|
3620
3869
|
<span class='kw'>def</span> <span class='id identifier rubyid_valid?'>valid?</span>
|
3621
|
-
|
3870
|
+
<span class='id identifier rubyid_valid_at?'>valid_at?</span><span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span>
|
3622
3871
|
<span class='kw'>end</span></pre>
|
3623
3872
|
</td>
|
3624
3873
|
</tr>
|
@@ -3685,31 +3934,31 @@ the time provided</p>
|
|
3685
3934
|
<pre class="lines">
|
3686
3935
|
|
3687
3936
|
|
3688
|
-
|
3689
|
-
|
3690
|
-
|
3691
|
-
|
3692
|
-
|
3693
|
-
|
3694
|
-
|
3695
|
-
|
3696
|
-
|
3697
|
-
|
3698
|
-
|
3937
|
+
131
|
3938
|
+
132
|
3939
|
+
133
|
3940
|
+
134
|
3941
|
+
135
|
3942
|
+
136
|
3943
|
+
137
|
3944
|
+
138
|
3945
|
+
139
|
3946
|
+
140
|
3947
|
+
141</pre>
|
3699
3948
|
</td>
|
3700
3949
|
<td>
|
3701
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3950
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 131</span>
|
3702
3951
|
|
3703
3952
|
<span class='kw'>def</span> <span class='id identifier rubyid_valid_at?'>valid_at?</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span>
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3707
|
-
|
3708
|
-
|
3709
|
-
|
3710
|
-
|
3711
|
-
|
3712
|
-
|
3953
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
|
3954
|
+
<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_time'>time</span><span class='rparen'>)</span>
|
3955
|
+
<span class='kw'>end</span>
|
3956
|
+
|
3957
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_not_after'>not_after</span> <span class='op'><</span> <span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_not_before'>not_before</span> <span class='op'>></span> <span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span>
|
3958
|
+
<span class='kw'>false</span>
|
3959
|
+
<span class='kw'>else</span>
|
3960
|
+
<span class='kw'>true</span>
|
3961
|
+
<span class='kw'>end</span>
|
3713
3962
|
<span class='kw'>end</span></pre>
|
3714
3963
|
</td>
|
3715
3964
|
</tr>
|
@@ -3763,15 +4012,15 @@ IO-like object.</p>
|
|
3763
4012
|
<pre class="lines">
|
3764
4013
|
|
3765
4014
|
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
4015
|
+
240
|
4016
|
+
241
|
4017
|
+
242</pre>
|
3769
4018
|
</td>
|
3770
4019
|
<td>
|
3771
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
4020
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 240</span>
|
3772
4021
|
|
3773
4022
|
<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>
|
3774
|
-
|
4023
|
+
<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'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span><span class='rparen'>)</span>
|
3775
4024
|
<span class='kw'>end</span></pre>
|
3776
4025
|
</td>
|
3777
4026
|
</tr>
|
@@ -3825,15 +4074,15 @@ IO-like object.</p>
|
|
3825
4074
|
<pre class="lines">
|
3826
4075
|
|
3827
4076
|
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
4077
|
+
233
|
4078
|
+
234
|
4079
|
+
235</pre>
|
3831
4080
|
</td>
|
3832
4081
|
<td>
|
3833
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
4082
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 233</span>
|
3834
4083
|
|
3835
4084
|
<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>
|
3836
|
-
|
4085
|
+
<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'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span><span class='rparen'>)</span>
|
3837
4086
|
<span class='kw'>end</span></pre>
|
3838
4087
|
</td>
|
3839
4088
|
</tr>
|
@@ -3923,23 +4172,23 @@ IO-like object.</p>
|
|
3923
4172
|
<pre class="lines">
|
3924
4173
|
|
3925
4174
|
|
3926
|
-
|
3927
|
-
|
3928
|
-
|
3929
|
-
|
3930
|
-
|
3931
|
-
|
3932
|
-
|
4175
|
+
249
|
4176
|
+
250
|
4177
|
+
251
|
4178
|
+
252
|
4179
|
+
253
|
4180
|
+
254
|
4181
|
+
255</pre>
|
3933
4182
|
</td>
|
3934
4183
|
<td>
|
3935
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
4184
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 249</span>
|
3936
4185
|
|
3937
4186
|
<span class='kw'>def</span> <span class='id identifier rubyid_write_pkcs12'>write_pkcs12</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_password'>password</span><span class='comma'>,</span><span class='id identifier rubyid_friendly_name'>friendly_name</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r509 pkcs12</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
3938
|
-
|
3939
|
-
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
4187
|
+
<span class='kw'>if</span> <span class='ivar'>@key</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
4188
|
+
<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'>Writing a PKCS12 requires both key and cert</span><span class='tstring_end'>"</span></span>
|
4189
|
+
<span class='kw'>end</span>
|
4190
|
+
<span class='id identifier rubyid_pkcs12'>pkcs12</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>PKCS12</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_password'>password</span><span class='comma'>,</span><span class='id identifier rubyid_friendly_name'>friendly_name</span><span class='comma'>,</span><span class='ivar'>@key</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span><span class='ivar'>@cert</span><span class='rparen'>)</span>
|
4191
|
+
<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_pkcs12'>pkcs12</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span><span class='rparen'>)</span>
|
3943
4192
|
<span class='kw'>end</span></pre>
|
3944
4193
|
</td>
|
3945
4194
|
</tr>
|
@@ -3951,9 +4200,9 @@ IO-like object.</p>
|
|
3951
4200
|
</div>
|
3952
4201
|
|
3953
4202
|
<div id="footer">
|
3954
|
-
Generated on
|
4203
|
+
Generated on Tue Apr 16 10:49:56 2013 by
|
3955
4204
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
3956
|
-
0.8.
|
4205
|
+
0.8.5 (ruby-1.9.3).
|
3957
4206
|
</div>
|
3958
4207
|
|
3959
4208
|
</body>
|