r509 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -0
- data/CONTRIBUTING.mdown +21 -0
- data/LICENSE +13 -0
- data/README.mdown +548 -0
- data/Rakefile +5 -0
- data/bin/r509 +16 -17
- data/doc/R509.html +42 -26
- data/doc/R509/ASN1.html +22 -16
- data/doc/R509/ASN1/GeneralName.html +180 -173
- data/doc/R509/ASN1/GeneralNames.html +390 -62
- data/doc/R509/CRL.html +9 -7
- data/doc/R509/CRL/Administrator.html +208 -623
- data/doc/R509/CRL/FileReaderWriter.html +856 -0
- data/doc/R509/CRL/ReaderWriter.html +524 -0
- data/doc/R509/CRL/SignedList.html +29 -42
- data/doc/R509/CSR.html +248 -333
- data/doc/R509/Cert.html +364 -491
- data/doc/R509/Cert/Extensions.html +134 -43
- data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +335 -65
- data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +201 -102
- data/doc/R509/Cert/Extensions/BasicConstraints.html +297 -68
- data/doc/R509/Cert/Extensions/CRLDistributionPoints.html +690 -77
- data/doc/R509/Cert/Extensions/CertificatePolicies.html +293 -43
- data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +321 -173
- data/doc/R509/Cert/Extensions/GeneralNamesMixin.html +656 -0
- data/doc/R509/Cert/Extensions/InhibitAnyPolicy.html +270 -42
- data/doc/R509/Cert/Extensions/KeyUsage.html +334 -184
- data/doc/R509/Cert/Extensions/NameConstraints.html +363 -93
- data/doc/R509/{ASN1 → Cert/Extensions}/NoticeReference.html +209 -48
- data/doc/R509/Cert/Extensions/OCSPNoCheck.html +244 -17
- data/doc/R509/Cert/Extensions/PolicyConstraints.html +322 -71
- data/doc/R509/{ASN1 → Cert/Extensions}/PolicyInformation.html +204 -43
- data/doc/R509/{ASN1 → Cert/Extensions}/PolicyQualifiers.html +205 -48
- data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +348 -143
- data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +165 -13
- data/doc/R509/{ASN1 → Cert/Extensions}/UserNotice.html +204 -43
- data/doc/R509/Cert/Extensions/ValidationMixin.html +120 -0
- data/doc/R509/CertificateAuthority.html +9 -7
- data/doc/R509/CertificateAuthority/OptionsBuilder.html +475 -0
- data/doc/R509/CertificateAuthority/Signer.html +149 -198
- data/doc/R509/Config.html +10 -8
- data/doc/R509/Config/CAConfig.html +708 -625
- data/doc/R509/Config/CAConfigPool.html +179 -31
- data/doc/R509/Config/CertProfile.html +1544 -0
- data/doc/R509/Config/SubjectItemPolicy.html +437 -99
- data/doc/R509/Engine.html +14 -28
- data/doc/R509/Helpers.html +1014 -0
- data/doc/R509/MessageDigest.html +73 -25
- data/doc/R509/NameSanitizer.html +39 -39
- data/doc/R509/OCSP.html +5 -5
- data/doc/R509/OCSP/Request.html +5 -5
- data/doc/R509/OCSP/Request/Nonce.html +5 -5
- data/doc/R509/OCSP/Response.html +7 -7
- data/doc/R509/OIDMapper.html +121 -6
- data/doc/R509/PrivateKey.html +226 -227
- data/doc/R509/R509Error.html +5 -5
- data/doc/R509/SPKI.html +244 -342
- data/doc/R509/Subject.html +241 -70
- data/doc/R509/Validity.html +5 -5
- data/doc/R509/Validity/Checker.html +5 -5
- data/doc/R509/Validity/DefaultChecker.html +5 -9
- data/doc/R509/Validity/DefaultWriter.html +5 -9
- data/doc/R509/Validity/Status.html +5 -5
- data/doc/R509/Validity/Writer.html +5 -5
- data/doc/_index.html +92 -30
- data/doc/class_list.html +2 -2
- data/doc/file.CONTRIBUTING.html +96 -0
- data/doc/file.LICENSE.html +87 -0
- data/doc/file.README.html +279 -389
- data/doc/file.YAML.html +243 -0
- data/doc/file.r509.html +298 -105
- data/doc/file_list.html +11 -2
- data/doc/frames.html +1 -1
- data/doc/index.html +279 -389
- data/doc/js/full_list.js +6 -1
- data/doc/method_list.html +869 -1139
- data/doc/top-level-namespace.html +103 -5
- data/lib/r509.rb +7 -2
- data/lib/r509/asn1.rb +97 -135
- data/lib/r509/cert.rb +17 -106
- data/lib/r509/cert/extensions.rb +13 -676
- data/lib/r509/cert/extensions/authority_info_access.rb +128 -0
- data/lib/r509/cert/extensions/authority_key_identifier.rb +100 -0
- data/lib/r509/cert/extensions/base.rb +142 -0
- data/lib/r509/cert/extensions/basic_constraints.rb +119 -0
- data/lib/r509/cert/extensions/certificate_policies.rb +262 -0
- data/lib/r509/cert/extensions/crl_distribution_points.rb +98 -0
- data/lib/r509/cert/extensions/extended_key_usage.rb +189 -0
- data/lib/r509/cert/extensions/inhibit_any_policy.rb +70 -0
- data/lib/r509/cert/extensions/key_usage.rb +209 -0
- data/lib/r509/cert/extensions/name_constraints.rb +179 -0
- data/lib/r509/cert/extensions/ocsp_no_check.rb +56 -0
- data/lib/r509/cert/extensions/policy_constraints.rb +122 -0
- data/lib/r509/cert/extensions/subject_alternative_name.rb +88 -0
- data/lib/r509/cert/extensions/subject_key_identifier.rb +56 -0
- data/lib/r509/cert/extensions/validation_mixin.rb +42 -0
- data/lib/r509/certificate_authority/options_builder.rb +142 -0
- data/lib/r509/certificate_authority/signer.rb +189 -0
- data/lib/r509/config.rb +3 -600
- data/lib/r509/config/ca_config.rb +414 -0
- data/lib/r509/config/cert_profile.rb +110 -0
- data/lib/r509/config/subject_item_policy.rb +118 -0
- data/lib/r509/crl/administrator.rb +169 -0
- data/lib/r509/crl/reader_writer.rb +109 -0
- data/lib/r509/crl/signed_list.rb +135 -0
- data/lib/r509/csr.rb +35 -116
- data/lib/r509/engine.rb +21 -11
- data/lib/r509/helpers.rb +110 -0
- data/lib/r509/io_helpers.rb +18 -13
- data/lib/r509/message_digest.rb +13 -3
- data/lib/r509/oid_mapper.rb +14 -0
- data/lib/r509/private_key.rb +74 -50
- data/lib/r509/spki.rb +50 -113
- data/lib/r509/subject.rb +24 -2
- data/lib/r509/trollop.rb +788 -0
- data/lib/r509/version.rb +1 -1
- data/r509.yaml +289 -96
- data/spec/asn1_spec.rb +171 -98
- data/spec/cert/extensions/authority_info_access_spec.rb +247 -0
- data/spec/cert/extensions/authority_key_identifier_spec.rb +85 -0
- data/spec/cert/extensions/base_spec.rb +172 -0
- data/spec/cert/extensions/basic_constraints_spec.rb +185 -0
- data/spec/cert/extensions/certificate_policies_spec.rb +288 -0
- data/spec/cert/extensions/crl_distribution_points_spec.rb +149 -0
- data/spec/cert/extensions/extended_key_usage_spec.rb +174 -0
- data/spec/cert/extensions/inhibit_any_policy_spec.rb +92 -0
- data/spec/cert/extensions/key_usage_spec.rb +172 -0
- data/spec/cert/extensions/name_constraints_spec.rb +335 -0
- data/spec/cert/extensions/ocsp_no_check_spec.rb +76 -0
- data/spec/cert/extensions/policy_constraints_spec.rb +155 -0
- data/spec/cert/extensions/subject_alternative_name_spec.rb +354 -0
- data/spec/cert/extensions/subject_key_identifier_spec.rb +64 -0
- data/spec/cert_spec.rb +11 -9
- data/spec/certificate_authority/options_builder_spec.rb +307 -0
- data/spec/certificate_authority/signer_spec.rb +278 -0
- data/spec/config/ca_config_spec.rb +405 -0
- data/spec/config/cert_profile_spec.rb +88 -0
- data/spec/config/subject_item_policy_spec.rb +81 -0
- data/spec/crl/administrator_spec.rb +199 -0
- data/spec/crl/reader_writer_spec.rb +97 -0
- data/spec/crl/signed_list_spec.rb +84 -0
- data/spec/csr_spec.rb +43 -36
- data/spec/engine_spec.rb +51 -0
- data/spec/fixtures.rb +40 -40
- data/spec/fixtures/cert1.pem +1 -1
- data/spec/fixtures/config_pool_test_minimal.yaml +11 -15
- data/spec/fixtures/config_test.yaml +96 -59
- data/spec/fixtures/config_test_dsa.yaml +29 -35
- data/spec/fixtures/config_test_ec.yaml +29 -35
- data/spec/fixtures/config_test_engine_key.yaml +7 -7
- data/spec/fixtures/config_test_engine_no_key_name.yaml +6 -6
- data/spec/fixtures/config_test_minimal.yaml +3 -5
- data/spec/fixtures/config_test_password.yaml +4 -6
- data/spec/fixtures/config_test_various.yaml +147 -137
- data/spec/fixtures/crl_list_file.txt +1 -1
- data/spec/fixtures/test_ca_crl.cer +20 -0
- data/spec/fixtures/test_ca_crl.key +28 -0
- data/spec/fixtures/test_ca_crl.p12 +0 -0
- data/spec/message_digest_spec.rb +6 -0
- data/spec/oid_mapper_spec.rb +11 -0
- data/spec/private_key_spec.rb +19 -18
- data/spec/spec_helper.rb +10 -6
- data/spec/spki_spec.rb +38 -19
- data/spec/subject_spec.rb +16 -0
- metadata +108 -59
- metadata.gz.sig +0 -0
- data/README.md +0 -638
- data/doc/R509/Config/CAProfile.html +0 -1015
- data/doc/R509/IOHelpers.html +0 -564
- data/lib/r509/certificate_authority.rb +0 -407
- data/lib/r509/crl.rb +0 -351
- data/spec/cert/extensions_spec.rb +0 -1095
- data/spec/certificate_authority_spec.rb +0 -681
- data/spec/config_spec.rb +0 -562
- data/spec/crl_spec.rb +0 -226
data/doc/R509/Cert.html
CHANGED
@@ -6,13 +6,13 @@
|
|
6
6
|
<title>
|
7
7
|
Class: R509::Cert
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.6.1
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
@@ -91,7 +91,7 @@
|
|
91
91
|
|
92
92
|
|
93
93
|
<dt class="r2">Includes:</dt>
|
94
|
-
<dd class="r2"><span class='object_link'><a href="
|
94
|
+
<dd class="r2"><span class='object_link'><a href="Helpers.html" title="R509::Helpers (module)">Helpers</a></span></dd>
|
95
95
|
|
96
96
|
|
97
97
|
|
@@ -99,7 +99,7 @@
|
|
99
99
|
|
100
100
|
<dt class="r1 last">Defined in:</dt>
|
101
101
|
<dd class="r1 last">lib/r509/cert.rb<span class="defines">,<br />
|
102
|
-
lib/r509/cert/extensions.rb</span>
|
102
|
+
lib/r509/cert/extensions/base.rb,<br /> lib/r509/cert/extensions/key_usage.rb,<br /> lib/r509/cert/extensions/ocsp_no_check.rb,<br /> lib/r509/cert/extensions/name_constraints.rb,<br /> lib/r509/cert/extensions/validation_mixin.rb,<br /> lib/r509/cert/extensions/basic_constraints.rb,<br /> lib/r509/cert/extensions/extended_key_usage.rb,<br /> lib/r509/cert/extensions/policy_constraints.rb,<br /> lib/r509/cert/extensions/inhibit_any_policy.rb,<br /> lib/r509/cert/extensions/certificate_policies.rb,<br /> lib/r509/cert/extensions/authority_info_access.rb,<br /> lib/r509/cert/extensions/subject_key_identifier.rb,<br /> lib/r509/cert/extensions/crl_distribution_points.rb,<br /> lib/r509/cert/extensions/subject_alternative_name.rb,<br /> lib/r509/cert/extensions/authority_key_identifier.rb</span>
|
103
103
|
</dd>
|
104
104
|
|
105
105
|
</dl>
|
@@ -339,7 +339,8 @@
|
|
339
339
|
|
340
340
|
|
341
341
|
<span class="summary_desc"><div class='inline'>
|
342
|
-
<p>Returns this object
|
342
|
+
<p>Returns this object's AuthorityInfoAccess extension as an R509
|
343
|
+
extension.</p>
|
343
344
|
</div></span>
|
344
345
|
|
345
346
|
</li>
|
@@ -363,7 +364,7 @@
|
|
363
364
|
|
364
365
|
|
365
366
|
<span class="summary_desc"><div class='inline'>
|
366
|
-
<p>Returns this object
|
367
|
+
<p>Returns this object's AuthorityKeyIdentifier extension as an R509
|
367
368
|
extension.</p>
|
368
369
|
</div></span>
|
369
370
|
|
@@ -388,7 +389,7 @@ extension.</p>
|
|
388
389
|
|
389
390
|
|
390
391
|
<span class="summary_desc"><div class='inline'>
|
391
|
-
<p>Returns this object
|
392
|
+
<p>Returns this object's BasicConstraints extension as an R509 extension.</p>
|
392
393
|
</div></span>
|
393
394
|
|
394
395
|
</li>
|
@@ -397,12 +398,19 @@ extension.</p>
|
|
397
398
|
<li class="public ">
|
398
399
|
<span class="summary_signature">
|
399
400
|
|
400
|
-
<a href="#
|
401
|
+
<a href="#bit_length-instance_method" title="#bit_length (instance method)">- (Integer) <strong>bit_length</strong> </a>
|
401
402
|
|
402
403
|
|
403
404
|
|
405
|
+
(also: #bit_strength)
|
406
|
+
|
404
407
|
</span>
|
405
408
|
|
409
|
+
<span class="note title not_defined_here">
|
410
|
+
included
|
411
|
+
from <span class='object_link'><a href="Helpers.html#bit_length-instance_method" title="R509::Helpers#bit_length (method)">Helpers</a></span>
|
412
|
+
</span>
|
413
|
+
|
406
414
|
|
407
415
|
|
408
416
|
|
@@ -412,7 +420,7 @@ extension.</p>
|
|
412
420
|
|
413
421
|
|
414
422
|
<span class="summary_desc"><div class='inline'>
|
415
|
-
<p>Returns the bit
|
423
|
+
<p>Returns the bit length of the key.</p>
|
416
424
|
</div></span>
|
417
425
|
|
418
426
|
</li>
|
@@ -436,7 +444,8 @@ extension.</p>
|
|
436
444
|
|
437
445
|
|
438
446
|
<span class="summary_desc"><div class='inline'>
|
439
|
-
<p>Returns this object
|
447
|
+
<p>Returns this object's CertificatePolicies extension as an R509
|
448
|
+
extension.</p>
|
440
449
|
</div></span>
|
441
450
|
|
442
451
|
</li>
|
@@ -462,7 +471,8 @@ extension.</p>
|
|
462
471
|
|
463
472
|
|
464
473
|
<span class="summary_desc"><div class='inline'>
|
465
|
-
<p>Returns this object
|
474
|
+
<p>Returns this object's CRLDistributionPoints extension as an R509
|
475
|
+
extension.</p>
|
466
476
|
</div></span>
|
467
477
|
|
468
478
|
</li>
|
@@ -477,6 +487,11 @@ extension.</p>
|
|
477
487
|
|
478
488
|
</span>
|
479
489
|
|
490
|
+
<span class="note title not_defined_here">
|
491
|
+
included
|
492
|
+
from <span class='object_link'><a href="Helpers.html#curve_name-instance_method" title="R509::Helpers#curve_name (method)">Helpers</a></span>
|
493
|
+
</span>
|
494
|
+
|
480
495
|
|
481
496
|
|
482
497
|
|
@@ -502,6 +517,11 @@ key if the key is EC.</p>
|
|
502
517
|
|
503
518
|
</span>
|
504
519
|
|
520
|
+
<span class="note title not_defined_here">
|
521
|
+
included
|
522
|
+
from <span class='object_link'><a href="Helpers.html#dsa%3F-instance_method" title="R509::Helpers#dsa? (method)">Helpers</a></span>
|
523
|
+
</span>
|
524
|
+
|
505
525
|
|
506
526
|
|
507
527
|
|
@@ -526,6 +546,11 @@ key if the key is EC.</p>
|
|
526
546
|
|
527
547
|
</span>
|
528
548
|
|
549
|
+
<span class="note title not_defined_here">
|
550
|
+
included
|
551
|
+
from <span class='object_link'><a href="Helpers.html#ec%3F-instance_method" title="R509::Helpers#ec? (method)">Helpers</a></span>
|
552
|
+
</span>
|
553
|
+
|
529
554
|
|
530
555
|
|
531
556
|
|
@@ -561,7 +586,7 @@ key if the key is EC.</p>
|
|
561
586
|
|
562
587
|
|
563
588
|
<span class="summary_desc"><div class='inline'>
|
564
|
-
<p>Returns this object
|
589
|
+
<p>Returns this object's ExtendedKeyUsage extension as an R509 extension.</p>
|
565
590
|
</div></span>
|
566
591
|
|
567
592
|
</li>
|
@@ -595,7 +620,7 @@ specific objects.</p>
|
|
595
620
|
<li class="public ">
|
596
621
|
<span class="summary_signature">
|
597
622
|
|
598
|
-
<a href="#fingerprint-instance_method" title="#fingerprint (instance method)">- (String) <strong>fingerprint</strong>(algorithm =
|
623
|
+
<a href="#fingerprint-instance_method" title="#fingerprint (instance method)">- (String) <strong>fingerprint</strong>(algorithm = 'sha1') </a>
|
599
624
|
|
600
625
|
|
601
626
|
|
@@ -683,7 +708,7 @@ sha1).</p>
|
|
683
708
|
|
684
709
|
|
685
710
|
<span class="summary_desc"><div class='inline'>
|
686
|
-
<p>Returns this object
|
711
|
+
<p>Returns this object's InhibitAnyPolicy extension as an R509 extension.</p>
|
687
712
|
</div></span>
|
688
713
|
|
689
714
|
</li>
|
@@ -733,7 +758,7 @@ sha1).</p>
|
|
733
758
|
|
734
759
|
|
735
760
|
<span class="summary_desc"><div class='inline'>
|
736
|
-
<p>Checks the given CRL for this certificate
|
761
|
+
<p>Checks the given CRL for this certificate's serial number.</p>
|
737
762
|
</div></span>
|
738
763
|
|
739
764
|
</li>
|
@@ -742,12 +767,17 @@ sha1).</p>
|
|
742
767
|
<li class="public ">
|
743
768
|
<span class="summary_signature">
|
744
769
|
|
745
|
-
<a href="#key_algorithm-instance_method" title="#key_algorithm (instance method)">- (
|
770
|
+
<a href="#key_algorithm-instance_method" title="#key_algorithm (instance method)">- (String) <strong>key_algorithm</strong> </a>
|
746
771
|
|
747
772
|
|
748
773
|
|
749
774
|
</span>
|
750
775
|
|
776
|
+
<span class="note title not_defined_here">
|
777
|
+
included
|
778
|
+
from <span class='object_link'><a href="Helpers.html#key_algorithm-instance_method" title="R509::Helpers#key_algorithm (method)">Helpers</a></span>
|
779
|
+
</span>
|
780
|
+
|
751
781
|
|
752
782
|
|
753
783
|
|
@@ -757,7 +787,7 @@ sha1).</p>
|
|
757
787
|
|
758
788
|
|
759
789
|
<span class="summary_desc"><div class='inline'>
|
760
|
-
<p>Returns key algorithm (RSA
|
790
|
+
<p>Returns key algorithm (RSA/DSA/EC).</p>
|
761
791
|
</div></span>
|
762
792
|
|
763
793
|
</li>
|
@@ -783,7 +813,7 @@ sha1).</p>
|
|
783
813
|
|
784
814
|
|
785
815
|
<span class="summary_desc"><div class='inline'>
|
786
|
-
<p>Returns this object
|
816
|
+
<p>Returns this object's KeyUsage extension as an R509 extension.</p>
|
787
817
|
</div></span>
|
788
818
|
|
789
819
|
</li>
|
@@ -807,7 +837,7 @@ sha1).</p>
|
|
807
837
|
|
808
838
|
|
809
839
|
<span class="summary_desc"><div class='inline'>
|
810
|
-
<p>Returns this object
|
840
|
+
<p>Returns this object's NameConstraints extension as an R509 extension.</p>
|
811
841
|
</div></span>
|
812
842
|
|
813
843
|
</li>
|
@@ -904,7 +934,7 @@ to this extension).</p>
|
|
904
934
|
|
905
935
|
|
906
936
|
<span class="summary_desc"><div class='inline'>
|
907
|
-
<p>Returns this object
|
937
|
+
<p>Returns this object's PolicyConstraints extension as an R509 extension.</p>
|
908
938
|
</div></span>
|
909
939
|
|
910
940
|
</li>
|
@@ -943,6 +973,11 @@ to this extension).</p>
|
|
943
973
|
|
944
974
|
</span>
|
945
975
|
|
976
|
+
<span class="note title not_defined_here">
|
977
|
+
included
|
978
|
+
from <span class='object_link'><a href="Helpers.html#rsa%3F-instance_method" title="R509::Helpers#rsa? (method)">Helpers</a></span>
|
979
|
+
</span>
|
980
|
+
|
946
981
|
|
947
982
|
|
948
983
|
|
@@ -1026,7 +1061,7 @@ to this extension).</p>
|
|
1026
1061
|
|
1027
1062
|
|
1028
1063
|
<span class="summary_desc"><div class='inline'>
|
1029
|
-
<p>Returns this object
|
1064
|
+
<p>Returns this object's SubjectAlternativeName extension as an R509
|
1030
1065
|
extension.</p>
|
1031
1066
|
</div></span>
|
1032
1067
|
|
@@ -1051,7 +1086,8 @@ extension.</p>
|
|
1051
1086
|
|
1052
1087
|
|
1053
1088
|
<span class="summary_desc"><div class='inline'>
|
1054
|
-
<p>Returns this object
|
1089
|
+
<p>Returns this object's SubjectKeyIdentifier extension as an R509
|
1090
|
+
extension.</p>
|
1055
1091
|
</div></span>
|
1056
1092
|
|
1057
1093
|
</li>
|
@@ -1066,6 +1102,11 @@ extension.</p>
|
|
1066
1102
|
|
1067
1103
|
</span>
|
1068
1104
|
|
1105
|
+
<span class="note title not_defined_here">
|
1106
|
+
included
|
1107
|
+
from <span class='object_link'><a href="Helpers.html#to_der-instance_method" title="R509::Helpers#to_der (method)">Helpers</a></span>
|
1108
|
+
</span>
|
1109
|
+
|
1069
1110
|
|
1070
1111
|
|
1071
1112
|
|
@@ -1075,7 +1116,7 @@ extension.</p>
|
|
1075
1116
|
|
1076
1117
|
|
1077
1118
|
<span class="summary_desc"><div class='inline'>
|
1078
|
-
<p>Converts the
|
1119
|
+
<p>Converts the object into DER format.</p>
|
1079
1120
|
</div></span>
|
1080
1121
|
|
1081
1122
|
</li>
|
@@ -1088,10 +1129,13 @@ extension.</p>
|
|
1088
1129
|
|
1089
1130
|
|
1090
1131
|
|
1091
|
-
(also: #to_s)
|
1092
|
-
|
1093
1132
|
</span>
|
1094
1133
|
|
1134
|
+
<span class="note title not_defined_here">
|
1135
|
+
included
|
1136
|
+
from <span class='object_link'><a href="Helpers.html#to_pem-instance_method" title="R509::Helpers#to_pem (method)">Helpers</a></span>
|
1137
|
+
</span>
|
1138
|
+
|
1095
1139
|
|
1096
1140
|
|
1097
1141
|
|
@@ -1101,7 +1145,7 @@ extension.</p>
|
|
1101
1145
|
|
1102
1146
|
|
1103
1147
|
<span class="summary_desc"><div class='inline'>
|
1104
|
-
<p>Converts the
|
1148
|
+
<p>Converts the object into PEM format.</p>
|
1105
1149
|
</div></span>
|
1106
1150
|
|
1107
1151
|
</li>
|
@@ -1191,6 +1235,11 @@ the time provided.</p>
|
|
1191
1235
|
|
1192
1236
|
</span>
|
1193
1237
|
|
1238
|
+
<span class="note title not_defined_here">
|
1239
|
+
included
|
1240
|
+
from <span class='object_link'><a href="Helpers.html#write_der-instance_method" title="R509::Helpers#write_der (method)">Helpers</a></span>
|
1241
|
+
</span>
|
1242
|
+
|
1194
1243
|
|
1195
1244
|
|
1196
1245
|
|
@@ -1200,7 +1249,7 @@ the time provided.</p>
|
|
1200
1249
|
|
1201
1250
|
|
1202
1251
|
<span class="summary_desc"><div class='inline'>
|
1203
|
-
<p>Writes the
|
1252
|
+
<p>Writes the object into DER format.</p>
|
1204
1253
|
</div></span>
|
1205
1254
|
|
1206
1255
|
</li>
|
@@ -1215,6 +1264,11 @@ the time provided.</p>
|
|
1215
1264
|
|
1216
1265
|
</span>
|
1217
1266
|
|
1267
|
+
<span class="note title not_defined_here">
|
1268
|
+
included
|
1269
|
+
from <span class='object_link'><a href="Helpers.html#write_pem-instance_method" title="R509::Helpers#write_pem (method)">Helpers</a></span>
|
1270
|
+
</span>
|
1271
|
+
|
1218
1272
|
|
1219
1273
|
|
1220
1274
|
|
@@ -1224,7 +1278,7 @@ the time provided.</p>
|
|
1224
1278
|
|
1225
1279
|
|
1226
1280
|
<span class="summary_desc"><div class='inline'>
|
1227
|
-
<p>Writes the
|
1281
|
+
<p>Writes the object into PEM format.</p>
|
1228
1282
|
</div></span>
|
1229
1283
|
|
1230
1284
|
</li>
|
@@ -1233,7 +1287,7 @@ the time provided.</p>
|
|
1233
1287
|
<li class="public ">
|
1234
1288
|
<span class="summary_signature">
|
1235
1289
|
|
1236
|
-
<a href="#write_pkcs12-instance_method" title="#write_pkcs12 (instance method)">- (Object) <strong>write_pkcs12</strong>(filename_or_io, password, friendly_name =
|
1290
|
+
<a href="#write_pkcs12-instance_method" title="#write_pkcs12 (instance method)">- (Object) <strong>write_pkcs12</strong>(filename_or_io, password, friendly_name = 'r509 pkcs12') </a>
|
1237
1291
|
|
1238
1292
|
|
1239
1293
|
|
@@ -1262,14 +1316,7 @@ encryption (des3).</p>
|
|
1262
1316
|
|
1263
1317
|
|
1264
1318
|
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="IOHelpers.html" title="R509::IOHelpers (module)">IOHelpers</a></span></h3>
|
1271
|
-
<p class="inherited"><span class='object_link'><a href="IOHelpers.html#read_data-instance_method" title="R509::IOHelpers#read_data (method)">#read_data</a></span>, <span class='object_link'><a href="IOHelpers.html#read_data-class_method" title="R509::IOHelpers.read_data (method)">read_data</a></span>, <span class='object_link'><a href="IOHelpers.html#write_data-instance_method" title="R509::IOHelpers#write_data (method)">#write_data</a></span>, <span class='object_link'><a href="IOHelpers.html#write_data-class_method" title="R509::IOHelpers.write_data (method)">write_data</a></span></p>
|
1272
|
-
<div id="constructor_details" class="method_details_list">
|
1319
|
+
<div id="constructor_details" class="method_details_list">
|
1273
1320
|
<h2>Constructor Details</h2>
|
1274
1321
|
|
1275
1322
|
<div class="method_details first">
|
@@ -1383,8 +1430,6 @@ support)</p>
|
|
1383
1430
|
<pre class="lines">
|
1384
1431
|
|
1385
1432
|
|
1386
|
-
17
|
1387
|
-
18
|
1388
1433
|
19
|
1389
1434
|
20
|
1390
1435
|
21
|
@@ -1405,39 +1450,31 @@ support)</p>
|
|
1405
1450
|
36
|
1406
1451
|
37
|
1407
1452
|
38
|
1408
|
-
39
|
1409
|
-
40
|
1410
|
-
41
|
1411
|
-
42</pre>
|
1453
|
+
39</pre>
|
1412
1454
|
</td>
|
1413
1455
|
<td>
|
1414
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1456
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 19</span>
|
1415
1457
|
|
1416
1458
|
<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>
|
1417
1459
|
<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'
|
1460
|
+
<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
1461
|
<span class='kw'>end</span>
|
1420
1462
|
<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
1463
|
<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
1464
|
<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
1465
|
<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
1466
|
<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
|
1467
|
+
<span class='id identifier rubyid_parse_private_key'>parse_private_key</span><span class='lparen'>(</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
1468
|
<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'
|
1469
|
+
<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
1470
|
<span class='kw'>else</span>
|
1429
1471
|
<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
1472
|
<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
1473
|
<span class='kw'>end</span>
|
1432
1474
|
|
1433
1475
|
<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='
|
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>
|
1436
|
-
<span class='kw'>else</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>
|
1438
|
-
<span class='kw'>end</span>
|
1476
|
+
<span class='id identifier rubyid_parse_private_key'>parse_private_key</span><span class='lparen'>(</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='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:password</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1439
1477
|
<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>
|
1441
1478
|
<span class='kw'>end</span></pre>
|
1442
1479
|
</td>
|
1443
1480
|
</tr>
|
@@ -1477,12 +1514,12 @@ support)</p>
|
|
1477
1514
|
<pre class="lines">
|
1478
1515
|
|
1479
1516
|
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1517
|
+
13
|
1518
|
+
14
|
1519
|
+
15</pre>
|
1483
1520
|
</td>
|
1484
1521
|
<td>
|
1485
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1522
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 13</span>
|
1486
1523
|
|
1487
1524
|
<span class='kw'>def</span> <span class='id identifier rubyid_cert'>cert</span>
|
1488
1525
|
<span class='ivar'>@cert</span>
|
@@ -1520,12 +1557,12 @@ support)</p>
|
|
1520
1557
|
<pre class="lines">
|
1521
1558
|
|
1522
1559
|
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1560
|
+
13
|
1561
|
+
14
|
1562
|
+
15</pre>
|
1526
1563
|
</td>
|
1527
1564
|
<td>
|
1528
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1565
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 13</span>
|
1529
1566
|
|
1530
1567
|
<span class='kw'>def</span> <span class='id identifier rubyid_issuer'>issuer</span>
|
1531
1568
|
<span class='ivar'>@issuer</span>
|
@@ -1563,12 +1600,12 @@ support)</p>
|
|
1563
1600
|
<pre class="lines">
|
1564
1601
|
|
1565
1602
|
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1603
|
+
13
|
1604
|
+
14
|
1605
|
+
15</pre>
|
1569
1606
|
</td>
|
1570
1607
|
<td>
|
1571
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1608
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 13</span>
|
1572
1609
|
|
1573
1610
|
<span class='kw'>def</span> <span class='id identifier rubyid_key'>key</span>
|
1574
1611
|
<span class='ivar'>@key</span>
|
@@ -1606,12 +1643,12 @@ support)</p>
|
|
1606
1643
|
<pre class="lines">
|
1607
1644
|
|
1608
1645
|
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1646
|
+
13
|
1647
|
+
14
|
1648
|
+
15</pre>
|
1612
1649
|
</td>
|
1613
1650
|
<td>
|
1614
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1651
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 13</span>
|
1615
1652
|
|
1616
1653
|
<span class='kw'>def</span> <span class='id identifier rubyid_subject'>subject</span>
|
1617
1654
|
<span class='ivar'>@subject</span>
|
@@ -1692,12 +1729,12 @@ support)</p>
|
|
1692
1729
|
<pre class="lines">
|
1693
1730
|
|
1694
1731
|
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1732
|
+
45
|
1733
|
+
46
|
1734
|
+
47</pre>
|
1698
1735
|
</td>
|
1699
1736
|
<td>
|
1700
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1737
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 45</span>
|
1701
1738
|
|
1702
1739
|
<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>
|
1703
1740
|
<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>
|
@@ -1758,16 +1795,16 @@ Discards SAN types</p>
|
|
1758
1795
|
<pre class="lines">
|
1759
1796
|
|
1760
1797
|
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1798
|
+
134
|
1799
|
+
135
|
1800
|
+
136
|
1801
|
+
137
|
1802
|
+
138
|
1803
|
+
139
|
1804
|
+
140</pre>
|
1768
1805
|
</td>
|
1769
1806
|
<td>
|
1770
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1807
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 134</span>
|
1771
1808
|
|
1772
1809
|
<span class='kw'>def</span> <span class='id identifier rubyid_all_names'>all_names</span>
|
1773
1810
|
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -1797,7 +1834,8 @@ Discards SAN types</p>
|
|
1797
1834
|
</h3><div class="docstring">
|
1798
1835
|
<div class="discussion">
|
1799
1836
|
|
1800
|
-
<p>Returns this object
|
1837
|
+
<p>Returns this object's AuthorityInfoAccess extension as an R509
|
1838
|
+
extension</p>
|
1801
1839
|
|
1802
1840
|
<p>if this cert does not have a AuthorityInfoAccess extension.</p>
|
1803
1841
|
|
@@ -1831,12 +1869,12 @@ Discards SAN types</p>
|
|
1831
1869
|
<pre class="lines">
|
1832
1870
|
|
1833
1871
|
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1872
|
+
254
|
1873
|
+
255
|
1874
|
+
256</pre>
|
1837
1875
|
</td>
|
1838
1876
|
<td>
|
1839
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1877
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 254</span>
|
1840
1878
|
|
1841
1879
|
<span class='kw'>def</span> <span class='id identifier rubyid_authority_info_access'>authority_info_access</span>
|
1842
1880
|
<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>
|
@@ -1858,7 +1896,8 @@ Discards SAN types</p>
|
|
1858
1896
|
</h3><div class="docstring">
|
1859
1897
|
<div class="discussion">
|
1860
1898
|
|
1861
|
-
<p>Returns this object
|
1899
|
+
<p>Returns this object's AuthorityKeyIdentifier extension as an R509
|
1900
|
+
extension</p>
|
1862
1901
|
|
1863
1902
|
<p>if this cert does not have a AuthorityKeyIdentifier extension.</p>
|
1864
1903
|
|
@@ -1892,12 +1931,12 @@ Discards SAN types</p>
|
|
1892
1931
|
<pre class="lines">
|
1893
1932
|
|
1894
1933
|
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1934
|
+
236
|
1935
|
+
237
|
1936
|
+
238</pre>
|
1898
1937
|
</td>
|
1899
1938
|
<td>
|
1900
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
1939
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 236</span>
|
1901
1940
|
|
1902
1941
|
<span class='kw'>def</span> <span class='id identifier rubyid_authority_key_identifier'>authority_key_identifier</span>
|
1903
1942
|
<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>
|
@@ -1919,7 +1958,7 @@ Discards SAN types</p>
|
|
1919
1958
|
</h3><div class="docstring">
|
1920
1959
|
<div class="discussion">
|
1921
1960
|
|
1922
|
-
<p>Returns this object
|
1961
|
+
<p>Returns this object's BasicConstraints extension as an R509 extension</p>
|
1923
1962
|
|
1924
1963
|
<p>if this cert does not have a BasicConstraints extension.</p>
|
1925
1964
|
|
@@ -1953,12 +1992,12 @@ Discards SAN types</p>
|
|
1953
1992
|
<pre class="lines">
|
1954
1993
|
|
1955
1994
|
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1995
|
+
202
|
1996
|
+
203
|
1997
|
+
204</pre>
|
1959
1998
|
</td>
|
1960
1999
|
<td>
|
1961
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2000
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 202</span>
|
1962
2001
|
|
1963
2002
|
<span class='kw'>def</span> <span class='id identifier rubyid_basic_constraints'>basic_constraints</span>
|
1964
2003
|
<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>
|
@@ -1969,18 +2008,27 @@ Discards SAN types</p>
|
|
1969
2008
|
</div>
|
1970
2009
|
|
1971
2010
|
<div class="method_details ">
|
1972
|
-
<h3 class="signature " id="
|
2011
|
+
<h3 class="signature " id="bit_length-instance_method">
|
1973
2012
|
|
1974
|
-
- (<tt>Integer</tt>) <strong>
|
2013
|
+
- (<tt>Integer</tt>) <strong>bit_length</strong>
|
1975
2014
|
|
1976
2015
|
|
1977
2016
|
|
2017
|
+
<span class="aliases">Also known as:
|
2018
|
+
<span class="names"><span id='bit_strength-instance_method'>bit_strength</span></span>
|
2019
|
+
</span>
|
2020
|
+
|
1978
2021
|
|
1979
2022
|
|
2023
|
+
<span class="not_defined_here">
|
2024
|
+
Originally defined in module
|
2025
|
+
<span class='object_link'><a href="Helpers.html#bit_length-instance_method" title="R509::Helpers#bit_length (method)">Helpers</a></span>
|
2026
|
+
</span>
|
2027
|
+
|
1980
2028
|
</h3><div class="docstring">
|
1981
2029
|
<div class="discussion">
|
1982
2030
|
|
1983
|
-
<p>Returns the bit
|
2031
|
+
<p>Returns the bit length of the key</p>
|
1984
2032
|
|
1985
2033
|
|
1986
2034
|
</div>
|
@@ -1999,44 +2047,14 @@ Discards SAN types</p>
|
|
1999
2047
|
|
2000
2048
|
—
|
2001
2049
|
<div class='inline'>
|
2002
|
-
<p>integer
|
2050
|
+
<p>the integer bit length.</p>
|
2003
2051
|
</div>
|
2004
2052
|
|
2005
2053
|
</li>
|
2006
2054
|
|
2007
2055
|
</ul>
|
2008
2056
|
|
2009
|
-
</div
|
2010
|
-
<tr>
|
2011
|
-
<td>
|
2012
|
-
<pre class="lines">
|
2013
|
-
|
2014
|
-
|
2015
|
-
188
|
2016
|
-
189
|
2017
|
-
190
|
2018
|
-
191
|
2019
|
-
192
|
2020
|
-
193
|
2021
|
-
194
|
2022
|
-
195
|
2023
|
-
196</pre>
|
2024
|
-
</td>
|
2025
|
-
<td>
|
2026
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 188</span>
|
2027
|
-
|
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>
|
2036
|
-
<span class='kw'>end</span></pre>
|
2037
|
-
</td>
|
2038
|
-
</tr>
|
2039
|
-
</table>
|
2057
|
+
</div>
|
2040
2058
|
</div>
|
2041
2059
|
|
2042
2060
|
<div class="method_details ">
|
@@ -2051,7 +2069,8 @@ Discards SAN types</p>
|
|
2051
2069
|
</h3><div class="docstring">
|
2052
2070
|
<div class="discussion">
|
2053
2071
|
|
2054
|
-
<p>Returns this object
|
2072
|
+
<p>Returns this object's CertificatePolicies extension as an R509
|
2073
|
+
extension</p>
|
2055
2074
|
|
2056
2075
|
<p>if this cert does not have a CertificatePolicies extension.</p>
|
2057
2076
|
|
@@ -2085,12 +2104,12 @@ Discards SAN types</p>
|
|
2085
2104
|
<pre class="lines">
|
2086
2105
|
|
2087
2106
|
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2107
|
+
280
|
2108
|
+
281
|
2109
|
+
282</pre>
|
2091
2110
|
</td>
|
2092
2111
|
<td>
|
2093
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2112
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 280</span>
|
2094
2113
|
|
2095
2114
|
<span class='kw'>def</span> <span class='id identifier rubyid_certificate_policies'>certificate_policies</span>
|
2096
2115
|
<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>
|
@@ -2116,7 +2135,8 @@ Discards SAN types</p>
|
|
2116
2135
|
</h3><div class="docstring">
|
2117
2136
|
<div class="discussion">
|
2118
2137
|
|
2119
|
-
<p>Returns this object
|
2138
|
+
<p>Returns this object's CRLDistributionPoints extension as an R509
|
2139
|
+
extension</p>
|
2120
2140
|
|
2121
2141
|
<p>if this cert does not have a CRLDistributionPoints extension.</p>
|
2122
2142
|
|
@@ -2150,12 +2170,12 @@ Discards SAN types</p>
|
|
2150
2170
|
<pre class="lines">
|
2151
2171
|
|
2152
2172
|
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2173
|
+
263
|
2174
|
+
264
|
2175
|
+
265</pre>
|
2156
2176
|
</td>
|
2157
2177
|
<td>
|
2158
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2178
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 263</span>
|
2159
2179
|
|
2160
2180
|
<span class='kw'>def</span> <span class='id identifier rubyid_crl_distribution_points'>crl_distribution_points</span>
|
2161
2181
|
<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>
|
@@ -2174,6 +2194,11 @@ Discards SAN types</p>
|
|
2174
2194
|
|
2175
2195
|
|
2176
2196
|
|
2197
|
+
<span class="not_defined_here">
|
2198
|
+
Originally defined in module
|
2199
|
+
<span class='object_link'><a href="Helpers.html#curve_name-instance_method" title="R509::Helpers#curve_name (method)">Helpers</a></span>
|
2200
|
+
</span>
|
2201
|
+
|
2177
2202
|
</h3><div class="docstring">
|
2178
2203
|
<div class="discussion">
|
2179
2204
|
|
@@ -2204,33 +2229,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
2204
2229
|
|
2205
2230
|
</ul>
|
2206
2231
|
|
2207
|
-
</div
|
2208
|
-
<tr>
|
2209
|
-
<td>
|
2210
|
-
<pre class="lines">
|
2211
|
-
|
2212
|
-
|
2213
|
-
202
|
2214
|
-
203
|
2215
|
-
204
|
2216
|
-
205
|
2217
|
-
206
|
2218
|
-
207
|
2219
|
-
208</pre>
|
2220
|
-
</td>
|
2221
|
-
<td>
|
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>
|
2230
|
-
<span class='kw'>end</span></pre>
|
2231
|
-
</td>
|
2232
|
-
</tr>
|
2233
|
-
</table>
|
2232
|
+
</div>
|
2234
2233
|
</div>
|
2235
2234
|
|
2236
2235
|
<div class="method_details ">
|
@@ -2242,6 +2241,11 @@ key if the key is EC. If not, raises an error.</p>
|
|
2242
2241
|
|
2243
2242
|
|
2244
2243
|
|
2244
|
+
<span class="not_defined_here">
|
2245
|
+
Originally defined in module
|
2246
|
+
<span class='object_link'><a href="Helpers.html#dsa%3F-instance_method" title="R509::Helpers#dsa? (method)">Helpers</a></span>
|
2247
|
+
</span>
|
2248
|
+
|
2245
2249
|
</h3><div class="docstring">
|
2246
2250
|
<div class="discussion">
|
2247
2251
|
|
@@ -2271,25 +2275,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
2271
2275
|
|
2272
2276
|
</ul>
|
2273
2277
|
|
2274
|
-
</div
|
2275
|
-
<tr>
|
2276
|
-
<td>
|
2277
|
-
<pre class="lines">
|
2278
|
-
|
2279
|
-
|
2280
|
-
174
|
2281
|
-
175
|
2282
|
-
176</pre>
|
2283
|
-
</td>
|
2284
|
-
<td>
|
2285
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 174</span>
|
2286
|
-
|
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>
|
2289
|
-
<span class='kw'>end</span></pre>
|
2290
|
-
</td>
|
2291
|
-
</tr>
|
2292
|
-
</table>
|
2278
|
+
</div>
|
2293
2279
|
</div>
|
2294
2280
|
|
2295
2281
|
<div class="method_details ">
|
@@ -2301,6 +2287,11 @@ key if the key is EC. If not, raises an error.</p>
|
|
2301
2287
|
|
2302
2288
|
|
2303
2289
|
|
2290
|
+
<span class="not_defined_here">
|
2291
|
+
Originally defined in module
|
2292
|
+
<span class='object_link'><a href="Helpers.html#ec%3F-instance_method" title="R509::Helpers#ec? (method)">Helpers</a></span>
|
2293
|
+
</span>
|
2294
|
+
|
2304
2295
|
</h3><div class="docstring">
|
2305
2296
|
<div class="discussion">
|
2306
2297
|
|
@@ -2330,25 +2321,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
2330
2321
|
|
2331
2322
|
</ul>
|
2332
2323
|
|
2333
|
-
</div
|
2334
|
-
<tr>
|
2335
|
-
<td>
|
2336
|
-
<pre class="lines">
|
2337
|
-
|
2338
|
-
|
2339
|
-
181
|
2340
|
-
182
|
2341
|
-
183</pre>
|
2342
|
-
</td>
|
2343
|
-
<td>
|
2344
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 181</span>
|
2345
|
-
|
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>
|
2348
|
-
<span class='kw'>end</span></pre>
|
2349
|
-
</td>
|
2350
|
-
</tr>
|
2351
|
-
</table>
|
2324
|
+
</div>
|
2352
2325
|
</div>
|
2353
2326
|
|
2354
2327
|
<div class="method_details ">
|
@@ -2367,7 +2340,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
2367
2340
|
</h3><div class="docstring">
|
2368
2341
|
<div class="discussion">
|
2369
2342
|
|
2370
|
-
<p>Returns this object
|
2343
|
+
<p>Returns this object's ExtendedKeyUsage extension as an R509 extension</p>
|
2371
2344
|
|
2372
2345
|
<p>if this cert does not have a ExtendedKeyUsage extension.</p>
|
2373
2346
|
|
@@ -2401,12 +2374,12 @@ key if the key is EC. If not, raises an error.</p>
|
|
2401
2374
|
<pre class="lines">
|
2402
2375
|
|
2403
2376
|
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2377
|
+
219
|
2378
|
+
220
|
2379
|
+
221</pre>
|
2407
2380
|
</td>
|
2408
2381
|
<td>
|
2409
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2382
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 219</span>
|
2410
2383
|
|
2411
2384
|
<span class='kw'>def</span> <span class='id identifier rubyid_extended_key_usage'>extended_key_usage</span>
|
2412
2385
|
<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>
|
@@ -2465,16 +2438,16 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2465
2438
|
<pre class="lines">
|
2466
2439
|
|
2467
2440
|
|
2468
|
-
|
2469
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
|
2474
|
-
|
2441
|
+
178
|
2442
|
+
179
|
2443
|
+
180
|
2444
|
+
181
|
2445
|
+
182
|
2446
|
+
183
|
2447
|
+
184</pre>
|
2475
2448
|
</td>
|
2476
2449
|
<td>
|
2477
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2450
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 178</span>
|
2478
2451
|
|
2479
2452
|
<span class='kw'>def</span> <span class='id identifier rubyid_extensions'>extensions</span>
|
2480
2453
|
<span class='kw'>if</span> <span class='ivar'>@r509_extensions</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
@@ -2491,7 +2464,7 @@ implementation are ignored (see #get_unknown_extensions).</p>
|
|
2491
2464
|
<div class="method_details ">
|
2492
2465
|
<h3 class="signature " id="fingerprint-instance_method">
|
2493
2466
|
|
2494
|
-
- (<tt>String</tt>) <strong>fingerprint</strong>(algorithm =
|
2467
|
+
- (<tt>String</tt>) <strong>fingerprint</strong>(algorithm = 'sha1')
|
2495
2468
|
|
2496
2469
|
|
2497
2470
|
|
@@ -2518,7 +2491,7 @@ sha1)</p>
|
|
2518
2491
|
<span class='type'>(<tt>String</tt>)</span>
|
2519
2492
|
|
2520
2493
|
|
2521
|
-
<em class="default">(defaults to: <tt
|
2494
|
+
<em class="default">(defaults to: <tt>'sha1'</tt>)</em>
|
2522
2495
|
|
2523
2496
|
|
2524
2497
|
—
|
@@ -2556,17 +2529,17 @@ supported algorithm names</p>
|
|
2556
2529
|
<pre class="lines">
|
2557
2530
|
|
2558
2531
|
|
2559
|
-
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2532
|
+
90
|
2533
|
+
91
|
2534
|
+
92
|
2535
|
+
93
|
2536
|
+
94
|
2537
|
+
95</pre>
|
2565
2538
|
</td>
|
2566
2539
|
<td>
|
2567
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2540
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 90</span>
|
2568
2541
|
|
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'
|
2542
|
+
<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
2543
|
<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
2544
|
<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
2545
|
<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>
|
@@ -2621,16 +2594,16 @@ supported algorithm names</p>
|
|
2621
2594
|
<pre class="lines">
|
2622
2595
|
|
2623
2596
|
|
2624
|
-
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2628
|
-
|
2629
|
-
|
2630
|
-
|
2597
|
+
122
|
2598
|
+
123
|
2599
|
+
124
|
2600
|
+
125
|
2601
|
+
126
|
2602
|
+
127
|
2603
|
+
128</pre>
|
2631
2604
|
</td>
|
2632
2605
|
<td>
|
2633
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2606
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 122</span>
|
2634
2607
|
|
2635
2608
|
<span class='kw'>def</span> <span class='id identifier rubyid_has_private_key?'>has_private_key?</span>
|
2636
2609
|
<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>
|
@@ -2683,12 +2656,12 @@ supported algorithm names</p>
|
|
2683
2656
|
<pre class="lines">
|
2684
2657
|
|
2685
2658
|
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2659
|
+
68
|
2660
|
+
69
|
2661
|
+
70</pre>
|
2689
2662
|
</td>
|
2690
2663
|
<td>
|
2691
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2664
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 68</span>
|
2692
2665
|
|
2693
2666
|
<span class='kw'>def</span> <span class='id identifier rubyid_hexserial'>hexserial</span>
|
2694
2667
|
<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>
|
@@ -2710,7 +2683,7 @@ supported algorithm names</p>
|
|
2710
2683
|
</h3><div class="docstring">
|
2711
2684
|
<div class="discussion">
|
2712
2685
|
|
2713
|
-
<p>Returns this object
|
2686
|
+
<p>Returns this object's InhibitAnyPolicy extension as an R509 extension</p>
|
2714
2687
|
|
2715
2688
|
<p>if this cert does not have a InhibitAnyPolicy extension.</p>
|
2716
2689
|
|
@@ -2744,12 +2717,12 @@ supported algorithm names</p>
|
|
2744
2717
|
<pre class="lines">
|
2745
2718
|
|
2746
2719
|
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2720
|
+
288
|
2721
|
+
289
|
2722
|
+
290</pre>
|
2750
2723
|
</td>
|
2751
2724
|
<td>
|
2752
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2725
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 288</span>
|
2753
2726
|
|
2754
2727
|
<span class='kw'>def</span> <span class='id identifier rubyid_inhibit_any_policy'>inhibit_any_policy</span>
|
2755
2728
|
<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>
|
@@ -2771,9 +2744,9 @@ supported algorithm names</p>
|
|
2771
2744
|
</h3><div class="docstring">
|
2772
2745
|
<div class="discussion">
|
2773
2746
|
|
2774
|
-
<p>Checks the given CRL for this certificate
|
2775
|
-
does NOT check to verify that the CRL you
|
2776
|
-
CA as the cert so do that check yourself</p>
|
2747
|
+
<p>Checks the given CRL for this certificate's serial number. Note that
|
2748
|
+
this does NOT check to verify that the CRL you're checking is signed by
|
2749
|
+
the same CA as the cert so do that check yourself</p>
|
2777
2750
|
|
2778
2751
|
|
2779
2752
|
</div>
|
@@ -2820,12 +2793,12 @@ CA as the cert so do that check yourself</p>
|
|
2820
2793
|
<pre class="lines">
|
2821
2794
|
|
2822
2795
|
|
2823
|
-
|
2824
|
-
|
2825
|
-
|
2796
|
+
167
|
2797
|
+
168
|
2798
|
+
169</pre>
|
2826
2799
|
</td>
|
2827
2800
|
<td>
|
2828
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2801
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 167</span>
|
2829
2802
|
|
2830
2803
|
<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
2804
|
<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>
|
@@ -2838,16 +2811,21 @@ CA as the cert so do that check yourself</p>
|
|
2838
2811
|
<div class="method_details ">
|
2839
2812
|
<h3 class="signature " id="key_algorithm-instance_method">
|
2840
2813
|
|
2841
|
-
- (<tt>
|
2814
|
+
- (<tt>String</tt>) <strong>key_algorithm</strong>
|
2842
2815
|
|
2843
2816
|
|
2844
2817
|
|
2845
2818
|
|
2846
2819
|
|
2820
|
+
<span class="not_defined_here">
|
2821
|
+
Originally defined in module
|
2822
|
+
<span class='object_link'><a href="Helpers.html#key_algorithm-instance_method" title="R509::Helpers#key_algorithm (method)">Helpers</a></span>
|
2823
|
+
</span>
|
2824
|
+
|
2847
2825
|
</h3><div class="docstring">
|
2848
2826
|
<div class="discussion">
|
2849
2827
|
|
2850
|
-
<p>Returns key algorithm (RSA
|
2828
|
+
<p>Returns key algorithm (RSA/DSA/EC)</p>
|
2851
2829
|
|
2852
2830
|
|
2853
2831
|
</div>
|
@@ -2860,50 +2838,20 @@ CA as the cert so do that check yourself</p>
|
|
2860
2838
|
<li>
|
2861
2839
|
|
2862
2840
|
|
2863
|
-
<span class='type'>(<tt>
|
2841
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2864
2842
|
|
2865
2843
|
|
2866
2844
|
|
2867
2845
|
—
|
2868
2846
|
<div class='inline'>
|
2869
|
-
<p>value of the key algorithm
|
2847
|
+
<p>value of the key algorithm.</p>
|
2870
2848
|
</div>
|
2871
2849
|
|
2872
2850
|
</li>
|
2873
2851
|
|
2874
2852
|
</ul>
|
2875
2853
|
|
2876
|
-
</div
|
2877
|
-
<tr>
|
2878
|
-
<td>
|
2879
|
-
<pre class="lines">
|
2880
|
-
|
2881
|
-
|
2882
|
-
220
|
2883
|
-
221
|
2884
|
-
222
|
2885
|
-
223
|
2886
|
-
224
|
2887
|
-
225
|
2888
|
-
226
|
2889
|
-
227
|
2890
|
-
228</pre>
|
2891
|
-
</td>
|
2892
|
-
<td>
|
2893
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 220</span>
|
2894
|
-
|
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>
|
2903
|
-
<span class='kw'>end</span></pre>
|
2904
|
-
</td>
|
2905
|
-
</tr>
|
2906
|
-
</table>
|
2854
|
+
</div>
|
2907
2855
|
</div>
|
2908
2856
|
|
2909
2857
|
<div class="method_details ">
|
@@ -2922,7 +2870,7 @@ CA as the cert so do that check yourself</p>
|
|
2922
2870
|
</h3><div class="docstring">
|
2923
2871
|
<div class="discussion">
|
2924
2872
|
|
2925
|
-
<p>Returns this object
|
2873
|
+
<p>Returns this object's KeyUsage extension as an R509 extension</p>
|
2926
2874
|
|
2927
2875
|
<p>if this cert does not have a KeyUsage extension.</p>
|
2928
2876
|
|
@@ -2956,12 +2904,12 @@ CA as the cert so do that check yourself</p>
|
|
2956
2904
|
<pre class="lines">
|
2957
2905
|
|
2958
2906
|
|
2959
|
-
|
2960
|
-
|
2961
|
-
|
2907
|
+
210
|
2908
|
+
211
|
2909
|
+
212</pre>
|
2962
2910
|
</td>
|
2963
2911
|
<td>
|
2964
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2912
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 210</span>
|
2965
2913
|
|
2966
2914
|
<span class='kw'>def</span> <span class='id identifier rubyid_key_usage'>key_usage</span>
|
2967
2915
|
<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>
|
@@ -2983,7 +2931,7 @@ CA as the cert so do that check yourself</p>
|
|
2983
2931
|
</h3><div class="docstring">
|
2984
2932
|
<div class="discussion">
|
2985
2933
|
|
2986
|
-
<p>Returns this object
|
2934
|
+
<p>Returns this object's NameConstraints extension as an R509 extension</p>
|
2987
2935
|
|
2988
2936
|
<p>if this cert does not have a NameConstraints extension.</p>
|
2989
2937
|
|
@@ -3017,12 +2965,12 @@ CA as the cert so do that check yourself</p>
|
|
3017
2965
|
<pre class="lines">
|
3018
2966
|
|
3019
2967
|
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
2968
|
+
304
|
2969
|
+
305
|
2970
|
+
306</pre>
|
3023
2971
|
</td>
|
3024
2972
|
<td>
|
3025
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
2973
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 304</span>
|
3026
2974
|
|
3027
2975
|
<span class='kw'>def</span> <span class='id identifier rubyid_name_constraints'>name_constraints</span>
|
3028
2976
|
<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>
|
@@ -3076,12 +3024,12 @@ CA as the cert so do that check yourself</p>
|
|
3076
3024
|
<pre class="lines">
|
3077
3025
|
|
3078
3026
|
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3027
|
+
75
|
3028
|
+
76
|
3029
|
+
77</pre>
|
3082
3030
|
</td>
|
3083
3031
|
<td>
|
3084
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3032
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 75</span>
|
3085
3033
|
|
3086
3034
|
<span class='kw'>def</span> <span class='id identifier rubyid_not_after'>not_after</span>
|
3087
3035
|
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_not_after'>not_after</span>
|
@@ -3135,12 +3083,12 @@ CA as the cert so do that check yourself</p>
|
|
3135
3083
|
<pre class="lines">
|
3136
3084
|
|
3137
3085
|
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3086
|
+
54
|
3087
|
+
55
|
3088
|
+
56</pre>
|
3141
3089
|
</td>
|
3142
3090
|
<td>
|
3143
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3091
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 54</span>
|
3144
3092
|
|
3145
3093
|
<span class='kw'>def</span> <span class='id identifier rubyid_not_before'>not_before</span>
|
3146
3094
|
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_not_before'>not_before</span>
|
@@ -3195,12 +3143,12 @@ to this extension)</p>
|
|
3195
3143
|
<pre class="lines">
|
3196
3144
|
|
3197
3145
|
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3146
|
+
272
|
3147
|
+
273
|
3148
|
+
274</pre>
|
3201
3149
|
</td>
|
3202
3150
|
<td>
|
3203
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3151
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 272</span>
|
3204
3152
|
|
3205
3153
|
<span class='kw'>def</span> <span class='id identifier rubyid_ocsp_no_check?'>ocsp_no_check?</span>
|
3206
3154
|
<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>
|
@@ -3222,7 +3170,7 @@ to this extension)</p>
|
|
3222
3170
|
</h3><div class="docstring">
|
3223
3171
|
<div class="discussion">
|
3224
3172
|
|
3225
|
-
<p>Returns this object
|
3173
|
+
<p>Returns this object's PolicyConstraints extension as an R509 extension</p>
|
3226
3174
|
|
3227
3175
|
<p>if this cert does not have a PolicyConstraints extension.</p>
|
3228
3176
|
|
@@ -3256,12 +3204,12 @@ to this extension)</p>
|
|
3256
3204
|
<pre class="lines">
|
3257
3205
|
|
3258
3206
|
|
3259
|
-
|
3260
|
-
|
3261
|
-
|
3207
|
+
296
|
3208
|
+
297
|
3209
|
+
298</pre>
|
3262
3210
|
</td>
|
3263
3211
|
<td>
|
3264
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3212
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 296</span>
|
3265
3213
|
|
3266
3214
|
<span class='kw'>def</span> <span class='id identifier rubyid_policy_constraints'>policy_constraints</span>
|
3267
3215
|
<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>
|
@@ -3315,12 +3263,12 @@ to this extension)</p>
|
|
3315
3263
|
<pre class="lines">
|
3316
3264
|
|
3317
3265
|
|
3318
|
-
|
3319
|
-
|
3320
|
-
|
3266
|
+
82
|
3267
|
+
83
|
3268
|
+
84</pre>
|
3321
3269
|
</td>
|
3322
3270
|
<td>
|
3323
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3271
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 82</span>
|
3324
3272
|
|
3325
3273
|
<span class='kw'>def</span> <span class='id identifier rubyid_public_key'>public_key</span>
|
3326
3274
|
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_public_key'>public_key</span>
|
@@ -3339,6 +3287,11 @@ to this extension)</p>
|
|
3339
3287
|
|
3340
3288
|
|
3341
3289
|
|
3290
|
+
<span class="not_defined_here">
|
3291
|
+
Originally defined in module
|
3292
|
+
<span class='object_link'><a href="Helpers.html#rsa%3F-instance_method" title="R509::Helpers#rsa? (method)">Helpers</a></span>
|
3293
|
+
</span>
|
3294
|
+
|
3342
3295
|
</h3><div class="docstring">
|
3343
3296
|
<div class="discussion">
|
3344
3297
|
|
@@ -3368,25 +3321,7 @@ to this extension)</p>
|
|
3368
3321
|
|
3369
3322
|
</ul>
|
3370
3323
|
|
3371
|
-
</div
|
3372
|
-
<tr>
|
3373
|
-
<td>
|
3374
|
-
<pre class="lines">
|
3375
|
-
|
3376
|
-
|
3377
|
-
167
|
3378
|
-
168
|
3379
|
-
169</pre>
|
3380
|
-
</td>
|
3381
|
-
<td>
|
3382
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 167</span>
|
3383
|
-
|
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>
|
3386
|
-
<span class='kw'>end</span></pre>
|
3387
|
-
</td>
|
3388
|
-
</tr>
|
3389
|
-
</table>
|
3324
|
+
</div>
|
3390
3325
|
</div>
|
3391
3326
|
|
3392
3327
|
<div class="method_details ">
|
@@ -3428,12 +3363,12 @@ to this extension)</p>
|
|
3428
3363
|
<pre class="lines">
|
3429
3364
|
|
3430
3365
|
|
3431
|
-
|
3432
|
-
|
3433
|
-
|
3366
|
+
61
|
3367
|
+
62
|
3368
|
+
63</pre>
|
3434
3369
|
</td>
|
3435
3370
|
<td>
|
3436
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3371
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 61</span>
|
3437
3372
|
|
3438
3373
|
<span class='kw'>def</span> <span class='id identifier rubyid_serial'>serial</span>
|
3439
3374
|
<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>
|
@@ -3488,12 +3423,12 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3488
3423
|
<pre class="lines">
|
3489
3424
|
|
3490
3425
|
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3426
|
+
145
|
3427
|
+
146
|
3428
|
+
147</pre>
|
3494
3429
|
</td>
|
3495
3430
|
<td>
|
3496
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3431
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 145</span>
|
3497
3432
|
|
3498
3433
|
<span class='kw'>def</span> <span class='id identifier rubyid_signature_algorithm'>signature_algorithm</span>
|
3499
3434
|
<span class='ivar'>@cert</span><span class='period'>.</span><span class='id identifier rubyid_signature_algorithm'>signature_algorithm</span>
|
@@ -3519,7 +3454,8 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3519
3454
|
</h3><div class="docstring">
|
3520
3455
|
<div class="discussion">
|
3521
3456
|
|
3522
|
-
<p>Returns this object
|
3457
|
+
<p>Returns this object's SubjectAlternativeName extension as an R509
|
3458
|
+
extension</p>
|
3523
3459
|
|
3524
3460
|
<p>if this cert does not have a SubjectAlternativeName extension.</p>
|
3525
3461
|
|
@@ -3553,12 +3489,12 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3553
3489
|
<pre class="lines">
|
3554
3490
|
|
3555
3491
|
|
3556
|
-
|
3557
|
-
|
3558
|
-
|
3492
|
+
244
|
3493
|
+
245
|
3494
|
+
246</pre>
|
3559
3495
|
</td>
|
3560
3496
|
<td>
|
3561
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3497
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 244</span>
|
3562
3498
|
|
3563
3499
|
<span class='kw'>def</span> <span class='id identifier rubyid_subject_alternative_name'>subject_alternative_name</span>
|
3564
3500
|
<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>
|
@@ -3580,7 +3516,8 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3580
3516
|
</h3><div class="docstring">
|
3581
3517
|
<div class="discussion">
|
3582
3518
|
|
3583
|
-
<p>Returns this object
|
3519
|
+
<p>Returns this object's SubjectKeyIdentifier extension as an R509
|
3520
|
+
extension</p>
|
3584
3521
|
|
3585
3522
|
<p>if this cert does not have a SubjectKeyIdentifier extension.</p>
|
3586
3523
|
|
@@ -3614,12 +3551,12 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3614
3551
|
<pre class="lines">
|
3615
3552
|
|
3616
3553
|
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
3554
|
+
228
|
3555
|
+
229
|
3556
|
+
230</pre>
|
3620
3557
|
</td>
|
3621
3558
|
<td>
|
3622
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3559
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 228</span>
|
3623
3560
|
|
3624
3561
|
<span class='kw'>def</span> <span class='id identifier rubyid_subject_key_identifier'>subject_key_identifier</span>
|
3625
3562
|
<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>
|
@@ -3638,10 +3575,15 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3638
3575
|
|
3639
3576
|
|
3640
3577
|
|
3578
|
+
<span class="not_defined_here">
|
3579
|
+
Originally defined in module
|
3580
|
+
<span class='object_link'><a href="Helpers.html#to_der-instance_method" title="R509::Helpers#to_der (method)">Helpers</a></span>
|
3581
|
+
</span>
|
3582
|
+
|
3641
3583
|
</h3><div class="docstring">
|
3642
3584
|
<div class="discussion">
|
3643
3585
|
|
3644
|
-
<p>Converts the
|
3586
|
+
<p>Converts the object into DER format</p>
|
3645
3587
|
|
3646
3588
|
|
3647
3589
|
</div>
|
@@ -3660,36 +3602,14 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3660
3602
|
|
3661
3603
|
—
|
3662
3604
|
<div class='inline'>
|
3663
|
-
<p>the
|
3605
|
+
<p>the object converted into DER format.</p>
|
3664
3606
|
</div>
|
3665
3607
|
|
3666
3608
|
</li>
|
3667
3609
|
|
3668
3610
|
</ul>
|
3669
3611
|
|
3670
|
-
</div
|
3671
|
-
<tr>
|
3672
|
-
<td>
|
3673
|
-
<pre class="lines">
|
3674
|
-
|
3675
|
-
|
3676
|
-
67
|
3677
|
-
68
|
3678
|
-
69
|
3679
|
-
70
|
3680
|
-
71</pre>
|
3681
|
-
</td>
|
3682
|
-
<td>
|
3683
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 67</span>
|
3684
|
-
|
3685
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_der'>to_der</span>
|
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>
|
3689
|
-
<span class='kw'>end</span></pre>
|
3690
|
-
</td>
|
3691
|
-
</tr>
|
3692
|
-
</table>
|
3612
|
+
</div>
|
3693
3613
|
</div>
|
3694
3614
|
|
3695
3615
|
<div class="method_details ">
|
@@ -3699,16 +3619,17 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3699
3619
|
|
3700
3620
|
|
3701
3621
|
|
3702
|
-
<span class="aliases">Also known as:
|
3703
|
-
<span class="names"><span id='to_s-instance_method'>to_s</span></span>
|
3704
|
-
</span>
|
3705
|
-
|
3706
3622
|
|
3707
3623
|
|
3624
|
+
<span class="not_defined_here">
|
3625
|
+
Originally defined in module
|
3626
|
+
<span class='object_link'><a href="Helpers.html#to_pem-instance_method" title="R509::Helpers#to_pem (method)">Helpers</a></span>
|
3627
|
+
</span>
|
3628
|
+
|
3708
3629
|
</h3><div class="docstring">
|
3709
3630
|
<div class="discussion">
|
3710
3631
|
|
3711
|
-
<p>Converts the
|
3632
|
+
<p>Converts the object into PEM format</p>
|
3712
3633
|
|
3713
3634
|
|
3714
3635
|
</div>
|
@@ -3727,36 +3648,14 @@ sha256WithRSAEncryption, md5WithRSAEncryption, et cetera</p>
|
|
3727
3648
|
|
3728
3649
|
—
|
3729
3650
|
<div class='inline'>
|
3730
|
-
<p>the
|
3651
|
+
<p>the object converted into PEM format.</p>
|
3731
3652
|
</div>
|
3732
3653
|
|
3733
3654
|
</li>
|
3734
3655
|
|
3735
3656
|
</ul>
|
3736
3657
|
|
3737
|
-
</div
|
3738
|
-
<tr>
|
3739
|
-
<td>
|
3740
|
-
<pre class="lines">
|
3741
|
-
|
3742
|
-
|
3743
|
-
56
|
3744
|
-
57
|
3745
|
-
58
|
3746
|
-
59
|
3747
|
-
60</pre>
|
3748
|
-
</td>
|
3749
|
-
<td>
|
3750
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 56</span>
|
3751
|
-
|
3752
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_pem'>to_pem</span>
|
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>
|
3756
|
-
<span class='kw'>end</span></pre>
|
3757
|
-
</td>
|
3758
|
-
</tr>
|
3759
|
-
</table>
|
3658
|
+
</div>
|
3760
3659
|
</div>
|
3761
3660
|
|
3762
3661
|
<div class="method_details ">
|
@@ -3804,12 +3703,12 @@ extensions that do not have R509 implementations.</p>
|
|
3804
3703
|
<pre class="lines">
|
3805
3704
|
|
3806
3705
|
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3706
|
+
190
|
3707
|
+
191
|
3708
|
+
192</pre>
|
3810
3709
|
</td>
|
3811
3710
|
<td>
|
3812
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3711
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 190</span>
|
3813
3712
|
|
3814
3713
|
<span class='kw'>def</span> <span class='id identifier rubyid_unknown_extensions'>unknown_extensions</span>
|
3815
3714
|
<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>
|
@@ -3859,12 +3758,12 @@ times in the certificate.</p>
|
|
3859
3758
|
<pre class="lines">
|
3860
3759
|
|
3861
3760
|
|
3862
|
-
|
3863
|
-
|
3864
|
-
|
3761
|
+
101
|
3762
|
+
102
|
3763
|
+
103</pre>
|
3865
3764
|
</td>
|
3866
3765
|
<td>
|
3867
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3766
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 101</span>
|
3868
3767
|
|
3869
3768
|
<span class='kw'>def</span> <span class='id identifier rubyid_valid?'>valid?</span>
|
3870
3769
|
<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>
|
@@ -3934,20 +3833,20 @@ the time provided</p>
|
|
3934
3833
|
<pre class="lines">
|
3935
3834
|
|
3936
3835
|
|
3937
|
-
|
3938
|
-
|
3939
|
-
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
|
3945
|
-
|
3946
|
-
|
3947
|
-
|
3836
|
+
109
|
3837
|
+
110
|
3838
|
+
111
|
3839
|
+
112
|
3840
|
+
113
|
3841
|
+
114
|
3842
|
+
115
|
3843
|
+
116
|
3844
|
+
117
|
3845
|
+
118
|
3846
|
+
119</pre>
|
3948
3847
|
</td>
|
3949
3848
|
<td>
|
3950
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
3849
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 109</span>
|
3951
3850
|
|
3952
3851
|
<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>
|
3953
3852
|
<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>
|
@@ -3974,10 +3873,15 @@ the time provided</p>
|
|
3974
3873
|
|
3975
3874
|
|
3976
3875
|
|
3876
|
+
<span class="not_defined_here">
|
3877
|
+
Originally defined in module
|
3878
|
+
<span class='object_link'><a href="Helpers.html#write_der-instance_method" title="R509::Helpers#write_der (method)">Helpers</a></span>
|
3879
|
+
</span>
|
3880
|
+
|
3977
3881
|
</h3><div class="docstring">
|
3978
3882
|
<div class="discussion">
|
3979
3883
|
|
3980
|
-
<p>Writes the
|
3884
|
+
<p>Writes the object into DER format</p>
|
3981
3885
|
|
3982
3886
|
|
3983
3887
|
</div>
|
@@ -3997,8 +3901,8 @@ the time provided</p>
|
|
3997
3901
|
|
3998
3902
|
—
|
3999
3903
|
<div class='inline'>
|
4000
|
-
<p>Either a string of the path for the file that you
|
4001
|
-
IO-like object.</p>
|
3904
|
+
<p>Either a string of the path for the file that you'd like to write, or
|
3905
|
+
an IO-like object.</p>
|
4002
3906
|
</div>
|
4003
3907
|
|
4004
3908
|
</li>
|
@@ -4006,25 +3910,7 @@ IO-like object.</p>
|
|
4006
3910
|
</ul>
|
4007
3911
|
|
4008
3912
|
|
4009
|
-
</div
|
4010
|
-
<tr>
|
4011
|
-
<td>
|
4012
|
-
<pre class="lines">
|
4013
|
-
|
4014
|
-
|
4015
|
-
240
|
4016
|
-
241
|
4017
|
-
242</pre>
|
4018
|
-
</td>
|
4019
|
-
<td>
|
4020
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 240</span>
|
4021
|
-
|
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>
|
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>
|
4024
|
-
<span class='kw'>end</span></pre>
|
4025
|
-
</td>
|
4026
|
-
</tr>
|
4027
|
-
</table>
|
3913
|
+
</div>
|
4028
3914
|
</div>
|
4029
3915
|
|
4030
3916
|
<div class="method_details ">
|
@@ -4036,10 +3922,15 @@ IO-like object.</p>
|
|
4036
3922
|
|
4037
3923
|
|
4038
3924
|
|
3925
|
+
<span class="not_defined_here">
|
3926
|
+
Originally defined in module
|
3927
|
+
<span class='object_link'><a href="Helpers.html#write_pem-instance_method" title="R509::Helpers#write_pem (method)">Helpers</a></span>
|
3928
|
+
</span>
|
3929
|
+
|
4039
3930
|
</h3><div class="docstring">
|
4040
3931
|
<div class="discussion">
|
4041
3932
|
|
4042
|
-
<p>Writes the
|
3933
|
+
<p>Writes the object into PEM format</p>
|
4043
3934
|
|
4044
3935
|
|
4045
3936
|
</div>
|
@@ -4059,8 +3950,8 @@ IO-like object.</p>
|
|
4059
3950
|
|
4060
3951
|
—
|
4061
3952
|
<div class='inline'>
|
4062
|
-
<p>Either a string of the path for the file that you
|
4063
|
-
IO-like object.</p>
|
3953
|
+
<p>Either a string of the path for the file that you'd like to write, or
|
3954
|
+
an IO-like object.</p>
|
4064
3955
|
</div>
|
4065
3956
|
|
4066
3957
|
</li>
|
@@ -4068,31 +3959,13 @@ IO-like object.</p>
|
|
4068
3959
|
</ul>
|
4069
3960
|
|
4070
3961
|
|
4071
|
-
</div
|
4072
|
-
<tr>
|
4073
|
-
<td>
|
4074
|
-
<pre class="lines">
|
4075
|
-
|
4076
|
-
|
4077
|
-
233
|
4078
|
-
234
|
4079
|
-
235</pre>
|
4080
|
-
</td>
|
4081
|
-
<td>
|
4082
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 233</span>
|
4083
|
-
|
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>
|
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>
|
4086
|
-
<span class='kw'>end</span></pre>
|
4087
|
-
</td>
|
4088
|
-
</tr>
|
4089
|
-
</table>
|
3962
|
+
</div>
|
4090
3963
|
</div>
|
4091
3964
|
|
4092
3965
|
<div class="method_details ">
|
4093
3966
|
<h3 class="signature " id="write_pkcs12-instance_method">
|
4094
3967
|
|
4095
|
-
- (<tt>Object</tt>) <strong>write_pkcs12</strong>(filename_or_io, password, friendly_name =
|
3968
|
+
- (<tt>Object</tt>) <strong>write_pkcs12</strong>(filename_or_io, password, friendly_name = 'r509 pkcs12')
|
4096
3969
|
|
4097
3970
|
|
4098
3971
|
|
@@ -4122,8 +3995,8 @@ encryption (des3)</p>
|
|
4122
3995
|
|
4123
3996
|
—
|
4124
3997
|
<div class='inline'>
|
4125
|
-
<p>Either a string of the path for the file that you
|
4126
|
-
IO-like object.</p>
|
3998
|
+
<p>Either a string of the path for the file that you'd like to write, or
|
3999
|
+
an IO-like object.</p>
|
4127
4000
|
</div>
|
4128
4001
|
|
4129
4002
|
</li>
|
@@ -4152,13 +4025,13 @@ IO-like object.</p>
|
|
4152
4025
|
<span class='type'>(<tt>String</tt>)</span>
|
4153
4026
|
|
4154
4027
|
|
4155
|
-
<em class="default">(defaults to: <tt
|
4028
|
+
<em class="default">(defaults to: <tt>'r509 pkcs12'</tt>)</em>
|
4156
4029
|
|
4157
4030
|
|
4158
4031
|
—
|
4159
4032
|
<div class='inline'>
|
4160
4033
|
<p>An optional string to encode in the PKCS12 for friendlyName. defaults to
|
4161
|
-
|
4034
|
+
“r509 pkcs12”</p>
|
4162
4035
|
</div>
|
4163
4036
|
|
4164
4037
|
</li>
|
@@ -4172,18 +4045,18 @@ IO-like object.</p>
|
|
4172
4045
|
<pre class="lines">
|
4173
4046
|
|
4174
4047
|
|
4175
|
-
|
4176
|
-
|
4177
|
-
|
4178
|
-
|
4179
|
-
|
4180
|
-
|
4181
|
-
|
4048
|
+
154
|
4049
|
+
155
|
4050
|
+
156
|
4051
|
+
157
|
4052
|
+
158
|
4053
|
+
159
|
4054
|
+
160</pre>
|
4182
4055
|
</td>
|
4183
4056
|
<td>
|
4184
|
-
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line
|
4057
|
+
<pre class="code"><span class="info file"># File 'lib/r509/cert.rb', line 154</span>
|
4185
4058
|
|
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'
|
4059
|
+
<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>
|
4187
4060
|
<span class='kw'>if</span> <span class='ivar'>@key</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
4188
4061
|
<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
4062
|
<span class='kw'>end</span>
|
@@ -4200,9 +4073,9 @@ IO-like object.</p>
|
|
4200
4073
|
</div>
|
4201
4074
|
|
4202
4075
|
<div id="footer">
|
4203
|
-
Generated on
|
4076
|
+
Generated on Sun Jan 26 13:37:26 2014 by
|
4204
4077
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
4205
|
-
0.8.
|
4078
|
+
0.8.6.1 (ruby-2.0.0).
|
4206
4079
|
</div>
|
4207
4080
|
|
4208
4081
|
</body>
|