r509 0.10.0 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.mdown +2 -2
- data/Rakefile +2 -3
- data/bin/r509 +77 -80
- data/bin/r509-parse +4 -4
- data/doc/R509.html +60 -60
- data/doc/R509/ASN1.html +158 -48
- data/doc/R509/ASN1/GeneralName.html +157 -154
- data/doc/R509/ASN1/GeneralNames.html +246 -237
- data/doc/R509/CRL.html +41 -39
- data/doc/R509/CRL/Administrator.html +105 -100
- data/doc/R509/CRL/FileReaderWriter.html +146 -98
- data/doc/R509/CRL/ReaderWriter.html +57 -54
- data/doc/R509/CRL/SQLiteReaderWriter.html +727 -0
- data/doc/R509/CRL/SignedList.html +83 -80
- data/doc/R509/CSR.html +184 -162
- data/doc/R509/Cert.html +271 -269
- data/doc/R509/Cert/Extensions.html +62 -63
- data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +138 -108
- data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +100 -84
- data/doc/R509/Cert/Extensions/BasicConstraints.html +89 -88
- data/doc/R509/Cert/Extensions/CRLDistributionPoints.html +87 -83
- data/doc/R509/Cert/Extensions/CertificatePolicies.html +78 -76
- data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +128 -125
- data/doc/R509/Cert/Extensions/GeneralNamesMixin.html +83 -78
- data/doc/R509/Cert/Extensions/InhibitAnyPolicy.html +69 -67
- data/doc/R509/Cert/Extensions/KeyUsage.html +138 -135
- data/doc/R509/Cert/Extensions/NameConstraints.html +82 -81
- data/doc/R509/Cert/Extensions/NoticeReference.html +59 -56
- data/doc/R509/Cert/Extensions/OCSPNoCheck.html +70 -69
- data/doc/R509/Cert/Extensions/PolicyConstraints.html +71 -69
- data/doc/R509/Cert/Extensions/PolicyInformation.html +63 -60
- data/doc/R509/Cert/Extensions/PolicyQualifiers.html +60 -57
- data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +91 -87
- data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +72 -71
- data/doc/R509/Cert/Extensions/UserNotice.html +60 -57
- data/doc/R509/Cert/Extensions/ValidationMixin.html +43 -40
- data/doc/R509/CertificateAuthority.html +39 -37
- data/doc/R509/CertificateAuthority/OptionsBuilder.html +58 -55
- data/doc/R509/CertificateAuthority/Signer.html +277 -60
- data/doc/R509/Config.html +40 -38
- data/doc/R509/Config/CAConfig.html +255 -188
- data/doc/R509/Config/CAConfigPool.html +64 -61
- data/doc/R509/Config/CertProfile.html +119 -116
- data/doc/R509/Config/SubjectItemPolicy.html +94 -93
- data/doc/R509/Engine.html +60 -56
- data/doc/R509/Helpers.html +99 -96
- data/doc/R509/MessageDigest.html +69 -68
- data/doc/R509/NameSanitizer.html +51 -48
- data/doc/R509/OCSP.html +39 -37
- data/doc/R509/OCSP/Request.html +39 -37
- data/doc/R509/OCSP/Request/Nonce.html +67 -67
- data/doc/R509/OCSP/Response.html +93 -90
- data/doc/R509/OIDMapper.html +48 -46
- data/doc/R509/PrivateKey.html +170 -169
- data/doc/R509/R509Error.html +45 -42
- data/doc/R509/SPKI.html +99 -89
- data/doc/R509/Subject.html +86 -83
- data/doc/R509/Validity.html +57 -57
- data/doc/R509/Validity/Checker.html +63 -93
- data/doc/R509/Validity/DefaultChecker.html +58 -55
- data/doc/R509/Validity/DefaultWriter.html +62 -59
- data/doc/R509/Validity/Status.html +77 -74
- data/doc/R509/Validity/Writer.html +75 -123
- data/doc/_index.html +37 -31
- data/doc/class_list.html +25 -27
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +221 -78
- data/doc/file.CONTRIBUTING.html +29 -30
- data/doc/file.LICENSE.html +29 -30
- data/doc/file.README.html +31 -32
- data/doc/file.YAML.html +33 -34
- data/doc/file.r509.html +39 -48
- data/doc/file_list.html +39 -30
- data/doc/frames.html +10 -21
- data/doc/index.html +31 -32
- data/doc/js/app.js +100 -71
- data/doc/js/full_list.js +168 -130
- data/doc/method_list.html +1788 -1119
- data/doc/top-level-namespace.html +45 -49
- data/lib/r509.rb +21 -7
- data/lib/r509/asn1.rb +45 -32
- data/lib/r509/cert.rb +45 -51
- data/lib/r509/cert/extensions/authority_info_access.rb +49 -23
- data/lib/r509/cert/extensions/authority_key_identifier.rb +16 -11
- data/lib/r509/cert/extensions/base.rb +22 -23
- data/lib/r509/cert/extensions/basic_constraints.rb +11 -12
- data/lib/r509/cert/extensions/certificate_policies.rb +26 -26
- data/lib/r509/cert/extensions/crl_distribution_points.rb +5 -7
- data/lib/r509/cert/extensions/extended_key_usage.rb +5 -5
- data/lib/r509/cert/extensions/inhibit_any_policy.rb +4 -3
- data/lib/r509/cert/extensions/key_usage.rb +5 -5
- data/lib/r509/cert/extensions/name_constraints.rb +16 -16
- data/lib/r509/cert/extensions/ocsp_no_check.rb +3 -3
- data/lib/r509/cert/extensions/policy_constraints.rb +8 -8
- data/lib/r509/cert/extensions/subject_alternative_name.rb +5 -4
- data/lib/r509/cert/extensions/subject_key_identifier.rb +5 -5
- data/lib/r509/cert/extensions/validation_mixin.rb +11 -10
- data/lib/r509/certificate_authority/options_builder.rb +19 -21
- data/lib/r509/certificate_authority/signer.rb +26 -27
- data/lib/r509/config.rb +1 -0
- data/lib/r509/config/ca_config.rb +70 -75
- data/lib/r509/config/cert_profile.rb +9 -8
- data/lib/r509/config/subject_item_policy.rb +25 -28
- data/lib/r509/crl/administrator.rb +19 -20
- data/lib/r509/crl/reader_writer.rb +10 -8
- data/lib/r509/crl/signed_list.rb +4 -4
- data/lib/r509/crl/sqlite_reader_writer.rb +75 -0
- data/lib/r509/csr.rb +54 -60
- data/lib/r509/ec-hack.rb +3 -2
- data/lib/r509/engine.rb +5 -6
- data/lib/r509/exceptions.rb +1 -1
- data/lib/r509/helpers.rb +11 -14
- data/lib/r509/io_helpers.rb +7 -7
- data/lib/r509/message_digest.rb +5 -6
- data/lib/r509/ocsp.rb +11 -13
- data/lib/r509/oid_mapper.rb +2 -2
- data/lib/r509/private_key.rb +28 -32
- data/lib/r509/spki.rb +17 -20
- data/lib/r509/subject.rb +26 -27
- data/lib/r509/trollop.rb +1 -0
- data/lib/r509/validity.rb +30 -21
- data/lib/r509/version.rb +4 -2
- data/r509.yaml +9 -17
- data/spec/asn1_spec.rb +145 -146
- data/spec/cert/extensions/authority_info_access_spec.rb +41 -41
- data/spec/cert/extensions/authority_key_identifier_spec.rb +29 -23
- data/spec/cert/extensions/base_spec.rb +38 -34
- data/spec/cert/extensions/basic_constraints_spec.rb +21 -21
- data/spec/cert/extensions/certificate_policies_spec.rb +99 -87
- data/spec/cert/extensions/crl_distribution_points_spec.rb +24 -25
- data/spec/cert/extensions/extended_key_usage_spec.rb +40 -36
- data/spec/cert/extensions/inhibit_any_policy_spec.rb +12 -12
- data/spec/cert/extensions/key_usage_spec.rb +44 -39
- data/spec/cert/extensions/name_constraints_spec.rb +83 -83
- data/spec/cert/extensions/ocsp_no_check_spec.rb +10 -10
- data/spec/cert/extensions/policy_constraints_spec.rb +19 -19
- data/spec/cert/extensions/subject_alternative_name_spec.rb +46 -47
- data/spec/cert/extensions/subject_key_identifier_spec.rb +10 -10
- data/spec/cert_spec.rb +105 -101
- data/spec/certificate_authority/options_builder_spec.rb +90 -90
- data/spec/certificate_authority/signer_spec.rb +41 -41
- data/spec/config/ca_config_spec.rb +169 -119
- data/spec/config/cert_profile_spec.rb +33 -33
- data/spec/config/subject_item_policy_spec.rb +22 -22
- data/spec/crl/administrator_spec.rb +65 -65
- data/spec/crl/reader_writer_spec.rb +20 -19
- data/spec/crl/signed_list_spec.rb +26 -26
- data/spec/crl/sqlite_reader_writer_spec.rb +42 -0
- data/spec/csr_spec.rb +149 -145
- data/spec/engine_spec.rb +14 -14
- data/spec/fixtures.rb +56 -39
- data/spec/fixtures/crl_list.sql +13 -0
- data/spec/fixtures/csr1.der +0 -0
- data/spec/fixtures/csr1.pem +6 -6
- data/spec/message_digest_spec.rb +43 -43
- data/spec/ocsp_spec.rb +25 -25
- data/spec/oid_mapper_spec.rb +18 -19
- data/spec/private_key_spec.rb +79 -81
- data/spec/r509_spec.rb +16 -16
- data/spec/spec_helper.rb +3 -3
- data/spec/spki_spec.rb +94 -94
- data/spec/subject_spec.rb +107 -107
- data/spec/validity_spec.rb +25 -25
- metadata +113 -111
- metadata.gz.sig +0 -0
data/doc/R509/R509Error.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Exception: R509::R509Error
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
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
|
+
pathId = "R509::R509Error";
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,51 +27,50 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="../_index.html">Index (R)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">R509Error</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
62
|
+
<iframe id="search_frame" src="../class_list.html"></iframe>
|
65
63
|
|
66
|
-
|
64
|
+
<div id="content"><h1>Exception: R509::R509Error
|
67
65
|
|
68
66
|
|
69
67
|
|
70
68
|
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
69
|
+
<div class="box_info">
|
73
70
|
|
74
|
-
|
75
|
-
<
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
76
74
|
<span class="inheritName">StandardError</span>
|
77
75
|
|
78
76
|
<ul class="fullTree">
|
@@ -85,21 +83,25 @@
|
|
85
83
|
</ul>
|
86
84
|
<a href="#" class="inheritanceTree">show all</a>
|
87
85
|
|
88
|
-
|
89
|
-
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
90
|
|
91
91
|
|
92
|
-
|
93
92
|
|
94
|
-
|
95
93
|
|
96
94
|
|
95
|
+
|
96
|
+
|
97
|
+
|
97
98
|
|
98
|
-
|
99
|
-
<
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>lib/r509/exceptions.rb</dd>
|
102
|
+
</dl>
|
100
103
|
|
101
|
-
</
|
102
|
-
<div class="clear"></div>
|
104
|
+
</div>
|
103
105
|
|
104
106
|
<h2>Overview</h2><div class="docstring">
|
105
107
|
<div class="discussion">
|
@@ -124,11 +126,12 @@
|
|
124
126
|
|
125
127
|
</div>
|
126
128
|
|
127
|
-
|
128
|
-
Generated on
|
129
|
+
<div id="footer">
|
130
|
+
Generated on Tue Dec 6 17:27:40 2016 by
|
129
131
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
130
|
-
0.
|
132
|
+
0.9.5 (ruby-2.4.0).
|
131
133
|
</div>
|
132
134
|
|
135
|
+
</div>
|
133
136
|
</body>
|
134
137
|
</html>
|
data/doc/R509/SPKI.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Class: R509::SPKI
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
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
|
+
pathId = "R509::SPKI";
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,51 +27,50 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
33
38
|
|
34
39
|
<a href="../_index.html">Index (S)</a> »
|
35
40
|
<span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
|
36
41
|
»
|
37
42
|
<span class="title">SPKI</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="../class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
62
|
+
<iframe id="search_frame" src="../class_list.html"></iframe>
|
65
63
|
|
66
|
-
|
64
|
+
<div id="content"><h1>Class: R509::SPKI
|
67
65
|
|
68
66
|
|
69
67
|
|
70
68
|
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
69
|
+
<div class="box_info">
|
73
70
|
|
74
|
-
|
75
|
-
<
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
76
74
|
<span class="inheritName">Object</span>
|
77
75
|
|
78
76
|
<ul class="fullTree">
|
@@ -83,25 +81,30 @@
|
|
83
81
|
</ul>
|
84
82
|
<a href="#" class="inheritanceTree">show all</a>
|
85
83
|
|
86
|
-
|
87
|
-
|
84
|
+
</dd>
|
85
|
+
</dl>
|
88
86
|
|
87
|
+
|
89
88
|
|
90
|
-
|
91
89
|
|
92
|
-
|
93
|
-
<dt class="r2">Includes:</dt>
|
94
|
-
<dd class="r2"><span class='object_link'><a href="Helpers.html" title="R509::Helpers (module)">Helpers</a></span></dd>
|
95
|
-
|
96
|
-
|
97
90
|
|
98
91
|
|
92
|
+
<dl>
|
93
|
+
<dt>Includes:</dt>
|
94
|
+
<dd><span class='object_link'><a href="Helpers.html" title="R509::Helpers (module)">Helpers</a></span></dd>
|
95
|
+
</dl>
|
99
96
|
|
100
|
-
<dt class="r1 last">Defined in:</dt>
|
101
|
-
<dd class="r1 last">lib/r509/spki.rb</dd>
|
102
97
|
|
103
|
-
|
104
|
-
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt>Defined in:</dt>
|
104
|
+
<dd>lib/r509/spki.rb</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
</div>
|
105
108
|
|
106
109
|
<h2>Overview</h2><div class="docstring">
|
107
110
|
<div class="discussion">
|
@@ -119,13 +122,13 @@ the <keygen> tag</p>
|
|
119
122
|
|
120
123
|
|
121
124
|
|
122
|
-
<h2>Instance Attribute Summary <small
|
125
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
123
126
|
<ul class="summary">
|
124
127
|
|
125
128
|
<li class="public ">
|
126
129
|
<span class="summary_signature">
|
127
130
|
|
128
|
-
<a href="#key-instance_method" title="#key (instance method)"
|
131
|
+
<a href="#key-instance_method" title="#key (instance method)">#<strong>key</strong> ⇒ Object </a>
|
129
132
|
|
130
133
|
|
131
134
|
|
@@ -154,10 +157,12 @@ the <keygen> tag</p>
|
|
154
157
|
<li class="public ">
|
155
158
|
<span class="summary_signature">
|
156
159
|
|
157
|
-
<a href="#spki-instance_method" title="#spki (instance method)"
|
160
|
+
<a href="#spki-instance_method" title="#spki (instance method)">#<strong>spki</strong> ⇒ Object </a>
|
158
161
|
|
159
162
|
|
160
163
|
|
164
|
+
(also: #internal_obj)
|
165
|
+
|
161
166
|
</span>
|
162
167
|
|
163
168
|
|
@@ -188,7 +193,7 @@ the <keygen> tag</p>
|
|
188
193
|
|
189
194
|
<h2>
|
190
195
|
Instance Method Summary
|
191
|
-
<small
|
196
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
192
197
|
</h2>
|
193
198
|
|
194
199
|
<ul class="summary">
|
@@ -196,7 +201,7 @@ the <keygen> tag</p>
|
|
196
201
|
<li class="public ">
|
197
202
|
<span class="summary_signature">
|
198
203
|
|
199
|
-
<a href="#bit_length-instance_method" title="#bit_length (instance method)"
|
204
|
+
<a href="#bit_length-instance_method" title="#bit_length (instance method)">#<strong>bit_length</strong> ⇒ Integer </a>
|
200
205
|
|
201
206
|
|
202
207
|
|
@@ -227,7 +232,7 @@ the <keygen> tag</p>
|
|
227
232
|
<li class="public ">
|
228
233
|
<span class="summary_signature">
|
229
234
|
|
230
|
-
<a href="#curve_name-instance_method" title="#curve_name (instance method)"
|
235
|
+
<a href="#curve_name-instance_method" title="#curve_name (instance method)">#<strong>curve_name</strong> ⇒ String </a>
|
231
236
|
|
232
237
|
|
233
238
|
|
@@ -257,7 +262,7 @@ key if the key is EC.</p>
|
|
257
262
|
<li class="public ">
|
258
263
|
<span class="summary_signature">
|
259
264
|
|
260
|
-
<a href="#dsa%3F-instance_method" title="#dsa? (instance method)"
|
265
|
+
<a href="#dsa%3F-instance_method" title="#dsa? (instance method)">#<strong>dsa?</strong> ⇒ Boolean </a>
|
261
266
|
|
262
267
|
|
263
268
|
|
@@ -286,7 +291,7 @@ key if the key is EC.</p>
|
|
286
291
|
<li class="public ">
|
287
292
|
<span class="summary_signature">
|
288
293
|
|
289
|
-
<a href="#ec%3F-instance_method" title="#ec? (instance method)"
|
294
|
+
<a href="#ec%3F-instance_method" title="#ec? (instance method)">#<strong>ec?</strong> ⇒ Boolean </a>
|
290
295
|
|
291
296
|
|
292
297
|
|
@@ -315,7 +320,7 @@ key if the key is EC.</p>
|
|
315
320
|
<li class="public ">
|
316
321
|
<span class="summary_signature">
|
317
322
|
|
318
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)"
|
323
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) ⇒ SPKI </a>
|
319
324
|
|
320
325
|
|
321
326
|
|
@@ -341,7 +346,7 @@ key if the key is EC.</p>
|
|
341
346
|
<li class="public ">
|
342
347
|
<span class="summary_signature">
|
343
348
|
|
344
|
-
<a href="#key_algorithm-instance_method" title="#key_algorithm (instance method)"
|
349
|
+
<a href="#key_algorithm-instance_method" title="#key_algorithm (instance method)">#<strong>key_algorithm</strong> ⇒ String </a>
|
345
350
|
|
346
351
|
|
347
352
|
|
@@ -370,7 +375,7 @@ key if the key is EC.</p>
|
|
370
375
|
<li class="public ">
|
371
376
|
<span class="summary_signature">
|
372
377
|
|
373
|
-
<a href="#public_key-instance_method" title="#public_key (instance method)"
|
378
|
+
<a href="#public_key-instance_method" title="#public_key (instance method)">#<strong>public_key</strong> ⇒ OpenSSL::PKey::RSA </a>
|
374
379
|
|
375
380
|
|
376
381
|
|
@@ -394,7 +399,7 @@ key if the key is EC.</p>
|
|
394
399
|
<li class="public ">
|
395
400
|
<span class="summary_signature">
|
396
401
|
|
397
|
-
<a href="#rsa%3F-instance_method" title="#rsa? (instance method)"
|
402
|
+
<a href="#rsa%3F-instance_method" title="#rsa? (instance method)">#<strong>rsa?</strong> ⇒ Boolean </a>
|
398
403
|
|
399
404
|
|
400
405
|
|
@@ -423,7 +428,7 @@ key if the key is EC.</p>
|
|
423
428
|
<li class="public ">
|
424
429
|
<span class="summary_signature">
|
425
430
|
|
426
|
-
<a href="#signature_algorithm-instance_method" title="#signature_algorithm (instance method)"
|
431
|
+
<a href="#signature_algorithm-instance_method" title="#signature_algorithm (instance method)">#<strong>signature_algorithm</strong> ⇒ String </a>
|
427
432
|
|
428
433
|
|
429
434
|
|
@@ -447,7 +452,7 @@ key if the key is EC.</p>
|
|
447
452
|
<li class="public ">
|
448
453
|
<span class="summary_signature">
|
449
454
|
|
450
|
-
<a href="#to_der-instance_method" title="#to_der (instance method)"
|
455
|
+
<a href="#to_der-instance_method" title="#to_der (instance method)">#<strong>to_der</strong> ⇒ String </a>
|
451
456
|
|
452
457
|
|
453
458
|
|
@@ -476,7 +481,7 @@ key if the key is EC.</p>
|
|
476
481
|
<li class="public ">
|
477
482
|
<span class="summary_signature">
|
478
483
|
|
479
|
-
<a href="#to_pem-instance_method" title="#to_pem (instance method)"
|
484
|
+
<a href="#to_pem-instance_method" title="#to_pem (instance method)">#<strong>to_pem</strong> ⇒ String </a>
|
480
485
|
|
481
486
|
|
482
487
|
|
@@ -505,7 +510,7 @@ key if the key is EC.</p>
|
|
505
510
|
<li class="public ">
|
506
511
|
<span class="summary_signature">
|
507
512
|
|
508
|
-
<a href="#verify_signature-instance_method" title="#verify_signature (instance method)"
|
513
|
+
<a href="#verify_signature-instance_method" title="#verify_signature (instance method)">#<strong>verify_signature</strong> ⇒ Boolean </a>
|
509
514
|
|
510
515
|
|
511
516
|
|
@@ -529,7 +534,7 @@ key if the key is EC.</p>
|
|
529
534
|
<li class="public ">
|
530
535
|
<span class="summary_signature">
|
531
536
|
|
532
|
-
<a href="#write_der-instance_method" title="#write_der (instance method)"
|
537
|
+
<a href="#write_der-instance_method" title="#write_der (instance method)">#<strong>write_der</strong>(filename_or_io) ⇒ Object </a>
|
533
538
|
|
534
539
|
|
535
540
|
|
@@ -558,7 +563,7 @@ key if the key is EC.</p>
|
|
558
563
|
<li class="public ">
|
559
564
|
<span class="summary_signature">
|
560
565
|
|
561
|
-
<a href="#write_pem-instance_method" title="#write_pem (instance method)"
|
566
|
+
<a href="#write_pem-instance_method" title="#write_pem (instance method)">#<strong>write_pem</strong>(filename_or_io) ⇒ Object </a>
|
562
567
|
|
563
568
|
|
564
569
|
|
@@ -597,7 +602,7 @@ key if the key is EC.</p>
|
|
597
602
|
<div class="method_details first">
|
598
603
|
<h3 class="signature first" id="initialize-instance_method">
|
599
604
|
|
600
|
-
|
605
|
+
#<strong>initialize</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="R509::SPKI (class)">SPKI</a></span></tt>
|
601
606
|
|
602
607
|
|
603
608
|
|
@@ -606,7 +611,7 @@ key if the key is EC.</p>
|
|
606
611
|
</h3><div class="docstring">
|
607
612
|
<div class="discussion">
|
608
613
|
|
609
|
-
<p>
|
614
|
+
<p>Returns a new instance of SPKI</p>
|
610
615
|
|
611
616
|
|
612
617
|
</div>
|
@@ -678,7 +683,7 @@ support). if supplied you do not need to pass an spki.</p>
|
|
678
683
|
|
679
684
|
— <div class='inline'>
|
680
685
|
<p>Optional digest. sha1, sha224, sha256, sha384, sha512, md5. Defaults to
|
681
|
-
|
686
|
+
sha256. Only used if you supply a :key and no :spki</p>
|
682
687
|
</div>
|
683
688
|
|
684
689
|
</li>
|
@@ -713,19 +718,19 @@ sha1. Only used if you supply a :key and no :spki</p>
|
|
713
718
|
<td>
|
714
719
|
<pre class="code"><span class="info file"># File 'lib/r509/spki.rb', line 16</span>
|
715
720
|
|
716
|
-
<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
|
717
|
-
<span class='kw'>if</span> <span class='
|
721
|
+
<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>
|
722
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
718
723
|
<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>
|
719
|
-
<span class='kw'>elsif</span> <span class='
|
724
|
+
<span class='kw'>elsif</span> <span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:spki</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:key</span><span class='rparen'>)</span>
|
720
725
|
<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 either :spki or :key</span><span class='tstring_end'>'</span></span>
|
721
726
|
<span class='kw'>end</span>
|
722
727
|
|
723
728
|
<span class='ivar'>@key</span> <span class='op'>=</span> <span class='id identifier rubyid_load_private_key'>load_private_key</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
724
729
|
|
725
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier
|
730
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:spki</span><span class='rparen'>)</span>
|
726
731
|
<span class='ivar'>@spki</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_spki'>parse_spki</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:spki</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
727
732
|
<span class='kw'>else</span>
|
728
|
-
|
733
|
+
<span class='comment'># create the SPKI from the private key if it wasn't passed in
|
729
734
|
</span> <span class='ivar'>@spki</span> <span class='op'>=</span> <span class='id identifier rubyid_build_spki'>build_spki</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:message_digest</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
730
735
|
<span class='kw'>end</span>
|
731
736
|
<span class='kw'>end</span></pre>
|
@@ -744,7 +749,7 @@ sha1. Only used if you supply a :key and no :spki</p>
|
|
744
749
|
<div class="method_details first">
|
745
750
|
<h3 class="signature first" id="key-instance_method">
|
746
751
|
|
747
|
-
|
752
|
+
#<strong>key</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
748
753
|
|
749
754
|
|
750
755
|
|
@@ -787,10 +792,14 @@ sha1. Only used if you supply a :key and no :spki</p>
|
|
787
792
|
<div class="method_details ">
|
788
793
|
<h3 class="signature " id="spki-instance_method">
|
789
794
|
|
790
|
-
|
795
|
+
#<strong>spki</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
791
796
|
|
792
797
|
|
793
798
|
|
799
|
+
<span class="aliases">Also known as:
|
800
|
+
<span class="names"><span id='internal_obj-instance_method'>internal_obj</span></span>
|
801
|
+
</span>
|
802
|
+
|
794
803
|
|
795
804
|
|
796
805
|
</h3><div class="docstring">
|
@@ -835,7 +844,7 @@ sha1. Only used if you supply a :key and no :spki</p>
|
|
835
844
|
<div class="method_details first">
|
836
845
|
<h3 class="signature first" id="bit_length-instance_method">
|
837
846
|
|
838
|
-
|
847
|
+
#<strong>bit_length</strong> ⇒ <tt>Integer</tt>
|
839
848
|
|
840
849
|
|
841
850
|
|
@@ -885,7 +894,7 @@ sha1. Only used if you supply a :key and no :spki</p>
|
|
885
894
|
<div class="method_details ">
|
886
895
|
<h3 class="signature " id="curve_name-instance_method">
|
887
896
|
|
888
|
-
|
897
|
+
#<strong>curve_name</strong> ⇒ <tt>String</tt>
|
889
898
|
|
890
899
|
|
891
900
|
|
@@ -932,7 +941,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
932
941
|
<div class="method_details ">
|
933
942
|
<h3 class="signature " id="dsa?-instance_method">
|
934
943
|
|
935
|
-
|
944
|
+
#<strong>dsa?</strong> ⇒ <tt>Boolean</tt>
|
936
945
|
|
937
946
|
|
938
947
|
|
@@ -978,7 +987,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
978
987
|
<div class="method_details ">
|
979
988
|
<h3 class="signature " id="ec?-instance_method">
|
980
989
|
|
981
|
-
|
990
|
+
#<strong>ec?</strong> ⇒ <tt>Boolean</tt>
|
982
991
|
|
983
992
|
|
984
993
|
|
@@ -1024,7 +1033,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1024
1033
|
<div class="method_details ">
|
1025
1034
|
<h3 class="signature " id="key_algorithm-instance_method">
|
1026
1035
|
|
1027
|
-
|
1036
|
+
#<strong>key_algorithm</strong> ⇒ <tt>String</tt>
|
1028
1037
|
|
1029
1038
|
|
1030
1039
|
|
@@ -1070,7 +1079,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1070
1079
|
<div class="method_details ">
|
1071
1080
|
<h3 class="signature " id="public_key-instance_method">
|
1072
1081
|
|
1073
|
-
|
1082
|
+
#<strong>public_key</strong> ⇒ <tt>OpenSSL::PKey::RSA</tt>
|
1074
1083
|
|
1075
1084
|
|
1076
1085
|
|
@@ -1079,7 +1088,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1079
1088
|
</h3><div class="docstring">
|
1080
1089
|
<div class="discussion">
|
1081
1090
|
|
1082
|
-
<p>
|
1091
|
+
<p>Returns public key</p>
|
1083
1092
|
|
1084
1093
|
|
1085
1094
|
</div>
|
@@ -1129,7 +1138,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1129
1138
|
<div class="method_details ">
|
1130
1139
|
<h3 class="signature " id="rsa?-instance_method">
|
1131
1140
|
|
1132
|
-
|
1141
|
+
#<strong>rsa?</strong> ⇒ <tt>Boolean</tt>
|
1133
1142
|
|
1134
1143
|
|
1135
1144
|
|
@@ -1175,7 +1184,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1175
1184
|
<div class="method_details ">
|
1176
1185
|
<h3 class="signature " id="signature_algorithm-instance_method">
|
1177
1186
|
|
1178
|
-
|
1187
|
+
#<strong>signature_algorithm</strong> ⇒ <tt>String</tt>
|
1179
1188
|
|
1180
1189
|
|
1181
1190
|
|
@@ -1226,7 +1235,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1226
1235
|
|
1227
1236
|
<span class='kw'>def</span> <span class='id identifier rubyid_signature_algorithm'>signature_algorithm</span>
|
1228
1237
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='period'>.</span><span class='id identifier rubyid_decode'>decode</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span><span class='rparen'>)</span>
|
1229
|
-
<span class='
|
1238
|
+
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
1230
1239
|
<span class='kw'>end</span></pre>
|
1231
1240
|
</td>
|
1232
1241
|
</tr>
|
@@ -1236,7 +1245,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1236
1245
|
<div class="method_details ">
|
1237
1246
|
<h3 class="signature " id="to_der-instance_method">
|
1238
1247
|
|
1239
|
-
|
1248
|
+
#<strong>to_der</strong> ⇒ <tt>String</tt>
|
1240
1249
|
|
1241
1250
|
|
1242
1251
|
|
@@ -1282,7 +1291,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1282
1291
|
<div class="method_details ">
|
1283
1292
|
<h3 class="signature " id="to_pem-instance_method">
|
1284
1293
|
|
1285
|
-
|
1294
|
+
#<strong>to_pem</strong> ⇒ <tt>String</tt>
|
1286
1295
|
|
1287
1296
|
|
1288
1297
|
|
@@ -1328,7 +1337,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1328
1337
|
<div class="method_details ">
|
1329
1338
|
<h3 class="signature " id="verify_signature-instance_method">
|
1330
1339
|
|
1331
|
-
|
1340
|
+
#<strong>verify_signature</strong> ⇒ <tt>Boolean</tt>
|
1332
1341
|
|
1333
1342
|
|
1334
1343
|
|
@@ -1382,7 +1391,7 @@ key if the key is EC. If not, raises an error.</p>
|
|
1382
1391
|
<div class="method_details ">
|
1383
1392
|
<h3 class="signature " id="write_der-instance_method">
|
1384
1393
|
|
1385
|
-
|
1394
|
+
#<strong>write_der</strong>(filename_or_io) ⇒ <tt>Object</tt>
|
1386
1395
|
|
1387
1396
|
|
1388
1397
|
|
@@ -1431,7 +1440,7 @@ an IO-like object.</p>
|
|
1431
1440
|
<div class="method_details ">
|
1432
1441
|
<h3 class="signature " id="write_pem-instance_method">
|
1433
1442
|
|
1434
|
-
|
1443
|
+
#<strong>write_pem</strong>(filename_or_io) ⇒ <tt>Object</tt>
|
1435
1444
|
|
1436
1445
|
|
1437
1446
|
|
@@ -1481,11 +1490,12 @@ an IO-like object.</p>
|
|
1481
1490
|
|
1482
1491
|
</div>
|
1483
1492
|
|
1484
|
-
|
1485
|
-
Generated on
|
1493
|
+
<div id="footer">
|
1494
|
+
Generated on Tue Dec 6 17:27:39 2016 by
|
1486
1495
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1487
|
-
0.
|
1496
|
+
0.9.5 (ruby-2.4.0).
|
1488
1497
|
</div>
|
1489
1498
|
|
1499
|
+
</div>
|
1490
1500
|
</body>
|
1491
1501
|
</html>
|