r509 0.8.1 → 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +343 -151
- data/Rakefile +26 -23
- data/bin/r509 +126 -112
- data/bin/r509-parse +24 -24
- data/doc/R509.html +169 -7
- data/doc/R509/ASN1.html +370 -0
- data/doc/R509/ASN1/GeneralName.html +1121 -0
- data/doc/R509/ASN1/GeneralNames.html +843 -0
- data/doc/R509/ASN1/NoticeReference.html +392 -0
- data/doc/R509/ASN1/PolicyInformation.html +387 -0
- data/doc/R509/ASN1/PolicyQualifiers.html +455 -0
- data/doc/R509/ASN1/UserNotice.html +386 -0
- data/doc/R509/{Crl.html → CRL.html} +7 -7
- data/doc/R509/CRL/Administrator.html +1559 -0
- data/doc/R509/{Crl/Parser.html → CRL/SignedList.html} +501 -210
- data/doc/R509/{Csr.html → CSR.html} +444 -314
- data/doc/R509/Cert.html +866 -617
- data/doc/R509/Cert/Extensions.html +52 -41
- data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +70 -35
- data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +387 -4
- data/doc/R509/Cert/Extensions/BasicConstraints.html +61 -25
- data/doc/R509/Cert/Extensions/CRLDistributionPoints.html +354 -0
- data/doc/R509/Cert/Extensions/CertificatePolicies.html +340 -0
- data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +440 -49
- data/doc/R509/Cert/Extensions/{CrlDistributionPoints.html → InhibitAnyPolicy.html} +52 -35
- data/doc/R509/Cert/Extensions/KeyUsage.html +247 -121
- data/doc/R509/Cert/Extensions/NameConstraints.html +445 -0
- data/doc/R509/Cert/Extensions/OCSPNoCheck.html +239 -0
- data/doc/R509/Cert/Extensions/PolicyConstraints.html +424 -0
- data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +437 -62
- data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +52 -10
- data/doc/R509/CertificateAuthority.html +4 -4
- data/doc/R509/CertificateAuthority/Signer.html +154 -187
- data/doc/R509/Config.html +6 -6
- data/doc/R509/Config/{CaConfig.html → CAConfig.html} +451 -348
- data/doc/R509/Config/{CaConfigPool.html → CAConfigPool.html} +47 -47
- data/doc/R509/Config/CAProfile.html +1015 -0
- data/doc/R509/Config/SubjectItemPolicy.html +86 -86
- data/doc/R509/IOHelpers.html +22 -22
- data/doc/R509/MessageDigest.html +14 -14
- data/doc/R509/NameSanitizer.html +53 -53
- data/doc/R509/{Ocsp.html → OCSP.html} +9 -9
- data/doc/R509/{Ocsp → OCSP}/Request.html +7 -7
- data/doc/R509/{Ocsp → OCSP}/Request/Nonce.html +56 -11
- data/doc/R509/{Ocsp → OCSP}/Response.html +44 -44
- data/doc/R509/{OidMapper.html → OIDMapper.html} +23 -39
- data/doc/R509/PrivateKey.html +415 -168
- data/doc/R509/R509Error.html +3 -3
- data/doc/R509/{Spki.html → SPKI.html} +354 -192
- data/doc/R509/Subject.html +224 -113
- data/doc/R509/Validity.html +27 -5
- data/doc/R509/Validity/Checker.html +13 -13
- data/doc/R509/Validity/DefaultChecker.html +13 -13
- data/doc/R509/Validity/DefaultWriter.html +14 -14
- data/doc/R509/Validity/Status.html +39 -39
- data/doc/R509/Validity/Writer.html +18 -18
- data/doc/_index.html +138 -35
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +10 -0
- data/doc/file.README.html +368 -171
- data/doc/file.r509.html +92 -69
- data/doc/frames.html +1 -1
- data/doc/index.html +368 -171
- data/doc/method_list.html +910 -390
- data/doc/top-level-namespace.html +3 -3
- data/lib/r509.rb +32 -16
- data/lib/r509/asn1.rb +375 -0
- data/lib/r509/cert.rb +381 -364
- data/lib/r509/cert/extensions.rb +443 -76
- data/lib/r509/certificate_authority.rb +407 -0
- data/lib/r509/config.rb +547 -351
- data/lib/r509/crl.rb +336 -366
- data/lib/r509/csr.rb +278 -289
- data/lib/r509/ec-hack.rb +37 -0
- data/lib/r509/exceptions.rb +3 -3
- data/lib/r509/io_helpers.rb +44 -44
- data/lib/r509/message_digest.rb +53 -0
- data/lib/r509/ocsp.rb +80 -70
- data/lib/r509/oid_mapper.rb +32 -0
- data/lib/r509/private_key.rb +228 -0
- data/lib/r509/spki.rb +145 -93
- data/lib/r509/subject.rb +203 -110
- data/lib/r509/validity.rb +70 -68
- data/lib/r509/version.rb +2 -2
- data/r509.yaml +92 -69
- data/spec/asn1_spec.rb +402 -0
- data/spec/cert/extensions_spec.rb +957 -494
- data/spec/cert_spec.rb +382 -307
- data/spec/certificate_authority_spec.rb +668 -250
- data/spec/config_spec.rb +515 -302
- data/spec/crl_spec.rb +197 -198
- data/spec/csr_spec.rb +334 -289
- data/spec/fixtures.rb +247 -171
- data/spec/fixtures/cert1.der +0 -0
- data/spec/fixtures/cert1.pem +0 -0
- data/spec/fixtures/cert1_public_key_modulus.txt +0 -0
- data/spec/fixtures/cert3.p12 +0 -0
- data/spec/fixtures/cert3.pem +0 -0
- data/spec/fixtures/cert3_key.pem +0 -0
- data/spec/fixtures/cert3_key_des3.pem +0 -0
- data/spec/fixtures/cert4.pem +0 -0
- data/spec/fixtures/cert5.pem +0 -0
- data/spec/fixtures/cert6.pem +0 -0
- data/spec/fixtures/cert_expired.pem +0 -0
- data/spec/fixtures/cert_inhibit.pem +24 -0
- data/spec/fixtures/cert_name_constraints.pem +29 -0
- data/spec/fixtures/cert_not_yet_valid.pem +0 -0
- data/spec/fixtures/cert_ocsp_no_check.pem +18 -0
- data/spec/fixtures/cert_policy_constraints.pem +31 -0
- data/spec/fixtures/cert_san.pem +0 -0
- data/spec/fixtures/cert_san2.pem +0 -0
- data/spec/fixtures/cert_unknown_extension.pem +28 -0
- data/spec/fixtures/config_pool_test_minimal.yaml +11 -11
- data/spec/fixtures/config_test.yaml +54 -36
- data/spec/fixtures/config_test_dsa.yaml +35 -0
- data/spec/fixtures/config_test_ec.yaml +35 -0
- data/spec/fixtures/config_test_engine_key.yaml +5 -5
- data/spec/fixtures/config_test_engine_no_key_name.yaml +4 -4
- data/spec/fixtures/config_test_minimal.yaml +4 -4
- data/spec/fixtures/config_test_password.yaml +5 -5
- data/spec/fixtures/config_test_various.yaml +111 -74
- data/spec/fixtures/crl_list_file.txt +0 -0
- data/spec/fixtures/crl_with_reason.pem +0 -0
- data/spec/fixtures/csr1.der +0 -0
- data/spec/fixtures/csr1.pem +0 -0
- data/spec/fixtures/csr1_key.der +0 -0
- data/spec/fixtures/csr1_key.pem +0 -0
- data/spec/fixtures/csr1_key_encrypted_des3.pem +0 -0
- data/spec/fixtures/csr1_newlines.pem +0 -0
- data/spec/fixtures/csr1_no_begin_end.pem +0 -0
- data/spec/fixtures/csr1_public_key_modulus.txt +0 -0
- data/spec/fixtures/csr2.pem +0 -0
- data/spec/fixtures/csr2_key.pem +0 -0
- data/spec/fixtures/csr3.pem +0 -0
- data/spec/fixtures/csr4.pem +0 -0
- data/spec/fixtures/csr_dsa.pem +0 -0
- data/spec/fixtures/csr_invalid_signature.pem +0 -0
- data/spec/fixtures/dsa_key.pem +0 -0
- data/spec/fixtures/dsa_root.cer +28 -0
- data/spec/fixtures/dsa_root.key +20 -0
- data/spec/fixtures/ec_csr2.der +0 -0
- data/spec/fixtures/ec_csr2.pem +8 -0
- data/spec/fixtures/ec_key1.der +0 -0
- data/spec/fixtures/ec_key1.pem +6 -0
- data/spec/fixtures/ec_key1_encrypted.pem +9 -0
- data/spec/fixtures/ec_key2.pem +6 -0
- data/spec/fixtures/hmacsha1.sig +1 -0
- data/spec/fixtures/hmacsha512.sig +1 -0
- data/spec/fixtures/key4.pem +0 -0
- data/spec/fixtures/key4_encrypted_des3.pem +0 -0
- data/spec/fixtures/missing_key_identifier_ca.cer +0 -0
- data/spec/fixtures/missing_key_identifier_ca.key +0 -0
- data/spec/fixtures/ocsptest.r509.local.pem +0 -0
- data/spec/fixtures/ocsptest.r509.local_ocsp_request.der +0 -0
- data/spec/fixtures/ocsptest2.r509.local.pem +0 -0
- data/spec/fixtures/second_ca.cer +0 -0
- data/spec/fixtures/second_ca.key +0 -0
- data/spec/fixtures/spkac.der +0 -0
- data/spec/fixtures/spkac.txt +0 -0
- data/spec/fixtures/spkac_dsa.txt +1 -1
- data/spec/fixtures/spkac_dsa_no_verify.txt +1 -0
- data/spec/fixtures/spkac_ec.txt +1 -0
- data/spec/fixtures/spkac_rsa_newlines.txt +13 -0
- data/spec/fixtures/stca.pem +0 -0
- data/spec/fixtures/stca_ocsp_request.der +0 -0
- data/spec/fixtures/stca_ocsp_response.der +0 -0
- data/spec/fixtures/test1.csr +0 -0
- data/spec/fixtures/test_ca.cer +0 -0
- data/spec/fixtures/test_ca.key +0 -0
- data/spec/fixtures/test_ca.p12 +0 -0
- data/spec/fixtures/test_ca_des3.key +0 -0
- data/spec/fixtures/test_ca_ec.cer +14 -0
- data/spec/fixtures/test_ca_ec.key +6 -0
- data/spec/fixtures/test_ca_ec_ee.cer +22 -0
- data/spec/fixtures/test_ca_ec_ee.key +6 -0
- data/spec/fixtures/test_ca_ocsp.cer +0 -0
- data/spec/fixtures/test_ca_ocsp.key +0 -0
- data/spec/fixtures/test_ca_ocsp.p12 +0 -0
- data/spec/fixtures/test_ca_ocsp_chain.txt +0 -0
- data/spec/fixtures/test_ca_ocsp_response.der +0 -0
- data/spec/fixtures/test_ca_subroot.cer +0 -0
- data/spec/fixtures/test_ca_subroot.key +0 -0
- data/spec/fixtures/test_ca_subroot_ocsp.cer +0 -0
- data/spec/fixtures/test_ca_subroot_ocsp.key +0 -0
- data/spec/fixtures/test_ca_subroot_ocsp_response.der +0 -0
- data/spec/fixtures/unknown_oid.csr +0 -0
- data/spec/message_digest_spec.rb +104 -84
- data/spec/ocsp_spec.rb +105 -105
- data/spec/oid_mapper_spec.rb +21 -21
- data/spec/private_key_spec.rb +275 -0
- data/spec/r509_spec.rb +35 -0
- data/spec/spec_helper.rb +15 -6
- data/spec/spki_spec.rb +221 -142
- data/spec/subject_spec.rb +232 -164
- data/spec/validity_spec.rb +91 -91
- metadata +79 -25
- data/doc/R509/Config/CaProfile.html +0 -651
- data/doc/R509/Crl/Administrator.html +0 -2073
- data/lib/r509/certificateauthority.rb +0 -290
- data/lib/r509/messagedigest.rb +0 -49
- data/lib/r509/oidmapper.rb +0 -32
- data/lib/r509/privatekey.rb +0 -185
- data/spec/privatekey_spec.rb +0 -198
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: R509::
|
7
|
+
Module: R509::OCSP
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<a href="../_index.html">Index (O)</a> »
|
35
35
|
<span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">OCSP</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: R509::
|
66
|
+
<div id="content"><h1>Module: R509::OCSP
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -87,7 +87,7 @@
|
|
87
87
|
<h2>Overview</h2><div class="docstring">
|
88
88
|
<div class="discussion">
|
89
89
|
|
90
|
-
<p>
|
90
|
+
<p>OCSP module</p>
|
91
91
|
|
92
92
|
|
93
93
|
</div>
|
@@ -99,11 +99,11 @@
|
|
99
99
|
<p class="children">
|
100
100
|
|
101
101
|
|
102
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="
|
102
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="OCSP/Request.html" title="R509::OCSP::Request (module)">Request</a></span>
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="
|
106
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="OCSP/Response.html" title="R509::OCSP::Response (class)">Response</a></span>
|
107
107
|
|
108
108
|
|
109
109
|
</p>
|
@@ -119,9 +119,9 @@
|
|
119
119
|
</div>
|
120
120
|
|
121
121
|
<div id="footer">
|
122
|
-
Generated on
|
122
|
+
Generated on Tue Apr 16 10:49:55 2013 by
|
123
123
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
124
|
-
0.8.
|
124
|
+
0.8.5 (ruby-1.9.3).
|
125
125
|
</div>
|
126
126
|
|
127
127
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: R509::
|
7
|
+
Module: R509::OCSP::Request
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../_index.html">Index (R)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../OCSP.html" title="R509::OCSP (module)">OCSP</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">Request</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: R509::
|
66
|
+
<div id="content"><h1>Module: R509::OCSP::Request
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -99,7 +99,7 @@
|
|
99
99
|
<p class="children">
|
100
100
|
|
101
101
|
|
102
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Request/Nonce.html" title="R509::
|
102
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Request/Nonce.html" title="R509::OCSP::Request::Nonce (module)">Nonce</a></span>
|
103
103
|
|
104
104
|
|
105
105
|
|
@@ -117,9 +117,9 @@
|
|
117
117
|
</div>
|
118
118
|
|
119
119
|
<div id="footer">
|
120
|
-
Generated on
|
120
|
+
Generated on Tue Apr 16 10:49:55 2013 by
|
121
121
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
122
|
-
0.8.
|
122
|
+
0.8.5 (ruby-1.9.3).
|
123
123
|
</div>
|
124
124
|
|
125
125
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: R509::
|
7
|
+
Module: R509::OCSP::Request::Nonce
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../_index.html">Index (N)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../OCSP.html" title="R509::OCSP (module)">OCSP</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="R509::OCSP::Request (module)">Request</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">Nonce</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: R509::
|
66
|
+
<div id="content"><h1>Module: R509::OCSP::Request::Nonce
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -105,7 +105,8 @@
|
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
107
|
<p>these values are defined at <a
|
108
|
-
href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/OCSP/Request.html">www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/OCSP/Request.html</a
|
108
|
+
href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/OCSP/Request.html">www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/OCSP/Request.html</a>
|
109
|
+
nonce is present and matches</p>
|
109
110
|
|
110
111
|
|
111
112
|
</div>
|
@@ -118,22 +119,66 @@ href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/OCSP/Requ
|
|
118
119
|
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
119
120
|
|
120
121
|
<dt id="BOTH_ABSENT-constant" class="">BOTH_ABSENT =
|
121
|
-
|
122
|
+
<div class="docstring">
|
123
|
+
<div class="discussion">
|
124
|
+
|
125
|
+
<p>nonce is missing in request and response</p>
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
<div class="tags">
|
131
|
+
|
132
|
+
|
133
|
+
</div>
|
122
134
|
</dt>
|
123
135
|
<dd><pre class="code"><span class='int'>2</span></pre></dd>
|
124
136
|
|
125
137
|
<dt id="RESPONSE_ONLY-constant" class="">RESPONSE_ONLY =
|
126
|
-
|
138
|
+
<div class="docstring">
|
139
|
+
<div class="discussion">
|
140
|
+
|
141
|
+
<p>nonce is present in response only</p>
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
<div class="tags">
|
147
|
+
|
148
|
+
|
149
|
+
</div>
|
127
150
|
</dt>
|
128
151
|
<dd><pre class="code"><span class='int'>3</span></pre></dd>
|
129
152
|
|
130
153
|
<dt id="NOT_EQUAL-constant" class="">NOT_EQUAL =
|
131
|
-
|
154
|
+
<div class="docstring">
|
155
|
+
<div class="discussion">
|
156
|
+
|
157
|
+
<p>nonce is in both request and response, but does not match</p>
|
158
|
+
|
159
|
+
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
<div class="tags">
|
163
|
+
|
164
|
+
|
165
|
+
</div>
|
132
166
|
</dt>
|
133
167
|
<dd><pre class="code"><span class='int'>0</span></pre></dd>
|
134
168
|
|
135
169
|
<dt id="REQUEST_ONLY-constant" class="">REQUEST_ONLY =
|
136
|
-
|
170
|
+
<div class="docstring">
|
171
|
+
<div class="discussion">
|
172
|
+
|
173
|
+
<p>nonce is present in request only</p>
|
174
|
+
|
175
|
+
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
<div class="tags">
|
179
|
+
|
180
|
+
|
181
|
+
</div>
|
137
182
|
</dt>
|
138
183
|
<dd><pre class="code"><span class='op'>-</span><span class='int'>1</span></pre></dd>
|
139
184
|
|
@@ -151,9 +196,9 @@ href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/OCSP/Requ
|
|
151
196
|
</div>
|
152
197
|
|
153
198
|
<div id="footer">
|
154
|
-
Generated on
|
199
|
+
Generated on Tue Apr 16 10:49:55 2013 by
|
155
200
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
156
|
-
0.8.
|
201
|
+
0.8.5 (ruby-1.9.3).
|
157
202
|
</div>
|
158
203
|
|
159
204
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: R509::
|
7
|
+
Class: R509::OCSP::Response
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../_index.html">Index (R)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../OCSP.html" title="R509::OCSP (module)">OCSP</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">Response</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: R509::
|
66
|
+
<div id="content"><h1>Class: R509::OCSP::Response
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next">R509::
|
81
|
+
<li class="next">R509::OCSP::Response</li>
|
82
82
|
|
83
83
|
</ul>
|
84
84
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -128,7 +128,7 @@
|
|
128
128
|
<li class="public ">
|
129
129
|
<span class="summary_signature">
|
130
130
|
|
131
|
-
<a href="#parse-class_method" title="parse (class method)">+ (R509::
|
131
|
+
<a href="#parse-class_method" title="parse (class method)">+ (R509::OCSP::Response) <strong>parse</strong>(ocsp_string) </a>
|
132
132
|
|
133
133
|
|
134
134
|
|
@@ -181,7 +181,7 @@
|
|
181
181
|
<li class="public ">
|
182
182
|
<span class="summary_signature">
|
183
183
|
|
184
|
-
<a href="#check_nonce-instance_method" title="#check_nonce (instance method)">- (R509::
|
184
|
+
<a href="#check_nonce-instance_method" title="#check_nonce (instance method)">- (R509::OCSP::Request::Nonce::CONSTANT) <strong>check_nonce</strong>(ocsp_request) </a>
|
185
185
|
|
186
186
|
|
187
187
|
|
@@ -309,7 +309,7 @@
|
|
309
309
|
<div class="method_details first">
|
310
310
|
<h3 class="signature first" id="initialize-instance_method">
|
311
311
|
|
312
|
-
- (<tt><span class='object_link'><a href="" title="R509::
|
312
|
+
- (<tt><span class='object_link'><a href="" title="R509::OCSP::Response (class)">Response</a></span></tt>) <strong>initialize</strong>(ocsp_response)
|
313
313
|
|
314
314
|
|
315
315
|
|
@@ -358,10 +358,10 @@
|
|
358
358
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 11</span>
|
359
359
|
|
360
360
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_ocsp_response'>ocsp_response</span><span class='rparen'>)</span>
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
361
|
+
<span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_ocsp_response'>ocsp_response</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'>OCSP</span><span class='op'>::</span><span class='const'>Response</span><span class='rparen'>)</span>
|
362
|
+
<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'>You must pass an OpenSSL::OCSP::Response object to the constructor. See R509::OCSP::Response.parse if you are trying to parse</span><span class='tstring_end'>'</span></span>
|
363
|
+
<span class='kw'>end</span>
|
364
|
+
<span class='ivar'>@ocsp_response</span> <span class='op'>=</span> <span class='id identifier rubyid_ocsp_response'>ocsp_response</span>
|
365
365
|
<span class='kw'>end</span></pre>
|
366
366
|
</td>
|
367
367
|
</tr>
|
@@ -378,7 +378,7 @@
|
|
378
378
|
<div class="method_details first">
|
379
379
|
<h3 class="signature first" id="parse-class_method">
|
380
380
|
|
381
|
-
+ (<tt><span class='object_link'><a href="" title="R509::
|
381
|
+
+ (<tt><span class='object_link'><a href="" title="R509::OCSP::Response (class)">R509::OCSP::Response</a></span></tt>) <strong>parse</strong>(ocsp_string)
|
382
382
|
|
383
383
|
|
384
384
|
|
@@ -418,7 +418,7 @@
|
|
418
418
|
<li>
|
419
419
|
|
420
420
|
|
421
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="R509::
|
421
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="R509::OCSP::Response (class)">R509::OCSP::Response</a></span></tt>)</span>
|
422
422
|
|
423
423
|
|
424
424
|
|
@@ -443,10 +443,10 @@
|
|
443
443
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 19</span>
|
444
444
|
|
445
445
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_ocsp_string'>ocsp_string</span><span class='rparen'>)</span>
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
446
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_ocsp_string'>ocsp_string</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
447
|
+
<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'>You must pass a DER encoded OCSP response to this method</span><span class='tstring_end'>'</span></span>
|
448
|
+
<span class='kw'>end</span>
|
449
|
+
<span class='const'>R509</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_ocsp_string'>ocsp_string</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
450
450
|
<span class='kw'>end</span></pre>
|
451
451
|
</td>
|
452
452
|
</tr>
|
@@ -504,7 +504,7 @@
|
|
504
504
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 37</span>
|
505
505
|
|
506
506
|
<span class='kw'>def</span> <span class='id identifier rubyid_basic'>basic</span>
|
507
|
-
|
507
|
+
<span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_basic'>basic</span>
|
508
508
|
<span class='kw'>end</span></pre>
|
509
509
|
</td>
|
510
510
|
</tr>
|
@@ -514,7 +514,7 @@
|
|
514
514
|
<div class="method_details ">
|
515
515
|
<h3 class="signature " id="check_nonce-instance_method">
|
516
516
|
|
517
|
-
- (<tt>R509::
|
517
|
+
- (<tt>R509::OCSP::Request::Nonce::CONSTANT</tt>) <strong>check_nonce</strong>(ocsp_request)
|
518
518
|
|
519
519
|
|
520
520
|
|
@@ -556,7 +556,7 @@
|
|
556
556
|
<li>
|
557
557
|
|
558
558
|
|
559
|
-
<span class='type'>(<tt>R509::
|
559
|
+
<span class='type'>(<tt>R509::OCSP::Request::Nonce::CONSTANT</tt>)</span>
|
560
560
|
|
561
561
|
|
562
562
|
|
@@ -583,7 +583,7 @@
|
|
583
583
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 67</span>
|
584
584
|
|
585
585
|
<span class='kw'>def</span> <span class='id identifier rubyid_check_nonce'>check_nonce</span><span class='lparen'>(</span><span class='id identifier rubyid_ocsp_request'>ocsp_request</span><span class='rparen'>)</span>
|
586
|
-
|
586
|
+
<span class='id identifier rubyid_ocsp_request'>ocsp_request</span><span class='period'>.</span><span class='id identifier rubyid_check_nonce'>check_nonce</span><span class='lparen'>(</span><span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_basic'>basic</span><span class='rparen'>)</span>
|
587
587
|
<span class='kw'>end</span></pre>
|
588
588
|
</td>
|
589
589
|
</tr>
|
@@ -642,7 +642,7 @@
|
|
642
642
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 27</span>
|
643
643
|
|
644
644
|
<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
|
645
|
-
|
645
|
+
<span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span>
|
646
646
|
<span class='kw'>end</span></pre>
|
647
647
|
</td>
|
648
648
|
</tr>
|
@@ -701,7 +701,7 @@
|
|
701
701
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 32</span>
|
702
702
|
|
703
703
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_der'>to_der</span>
|
704
|
-
|
704
|
+
<span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span>
|
705
705
|
<span class='kw'>end</span></pre>
|
706
706
|
</td>
|
707
707
|
</tr>
|
@@ -798,25 +798,25 @@
|
|
798
798
|
<pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 43</span>
|
799
799
|
|
800
800
|
<span class='kw'>def</span> <span class='id identifier rubyid_verify'>verify</span><span class='lparen'>(</span><span class='id identifier rubyid_certs'>certs</span><span class='rparen'>)</span>
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
<span class='kw'>end</span>
|
807
|
-
<span class='kw'>else</span>
|
808
|
-
<span class='id identifier rubyid_stack'>stack</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_certs'>certs</span><span class='rbracket'>]</span>
|
809
|
-
<span class='id identifier rubyid_store'>store</span><span class='period'>.</span><span class='id identifier rubyid_add_cert'>add_cert</span><span class='lparen'>(</span><span class='id identifier rubyid_certs'>certs</span><span class='rparen'>)</span>
|
801
|
+
<span class='id identifier rubyid_store'>store</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>X509</span><span class='op'>::</span><span class='const'>Store</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
802
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_certs'>certs</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
803
|
+
<span class='id identifier rubyid_stack'>stack</span> <span class='op'>=</span> <span class='id identifier rubyid_certs'>certs</span>
|
804
|
+
<span class='id identifier rubyid_certs'>certs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cert'>cert</span><span class='op'>|</span>
|
805
|
+
<span class='id identifier rubyid_store'>store</span><span class='period'>.</span><span class='id identifier rubyid_add_cert'>add_cert</span><span class='lparen'>(</span><span class='id identifier rubyid_cert'>cert</span><span class='rparen'>)</span>
|
810
806
|
<span class='kw'>end</span>
|
811
|
-
|
812
|
-
<span class='
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
</span>
|
818
|
-
|
819
|
-
|
807
|
+
<span class='kw'>else</span>
|
808
|
+
<span class='id identifier rubyid_stack'>stack</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_certs'>certs</span><span class='rbracket'>]</span>
|
809
|
+
<span class='id identifier rubyid_store'>store</span><span class='period'>.</span><span class='id identifier rubyid_add_cert'>add_cert</span><span class='lparen'>(</span><span class='id identifier rubyid_certs'>certs</span><span class='rparen'>)</span>
|
810
|
+
<span class='kw'>end</span>
|
811
|
+
|
812
|
+
<span class='comment'>#suppress verbosity since #verify will output a warning if it does not match
|
813
|
+
</span> <span class='comment'>#as well as returning false. we just want the boolean
|
814
|
+
</span> <span class='id identifier rubyid_original_verbosity'>original_verbosity</span> <span class='op'>=</span> <span class='gvar'>$VERBOSE</span>
|
815
|
+
<span class='gvar'>$VERBOSE</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
816
|
+
<span class='comment'>#still a bit unclear on why we add to store and pass in array to verify
|
817
|
+
</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_basic'>basic</span><span class='period'>.</span><span class='id identifier rubyid_verify'>verify</span><span class='lparen'>(</span><span class='id identifier rubyid_stack'>stack</span><span class='comma'>,</span> <span class='id identifier rubyid_store'>store</span><span class='rparen'>)</span>
|
818
|
+
<span class='gvar'>$VERBOSE</span> <span class='op'>=</span> <span class='id identifier rubyid_original_verbosity'>original_verbosity</span>
|
819
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_result'>result</span>
|
820
820
|
<span class='kw'>end</span></pre>
|
821
821
|
</td>
|
822
822
|
</tr>
|
@@ -828,9 +828,9 @@
|
|
828
828
|
</div>
|
829
829
|
|
830
830
|
<div id="footer">
|
831
|
-
Generated on
|
831
|
+
Generated on Tue Apr 16 10:49:56 2013 by
|
832
832
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
833
|
-
0.8.
|
833
|
+
0.8.5 (ruby-1.9.3).
|
834
834
|
</div>
|
835
835
|
|
836
836
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
|
7
|
+
Module: R509::OIDMapper
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<a href="../_index.html">Index (O)</a> »
|
35
35
|
<span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">OIDMapper</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>
|
66
|
+
<div id="content"><h1>Module: R509::OIDMapper
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -71,21 +71,6 @@
|
|
71
71
|
|
72
72
|
<dl class="box">
|
73
73
|
|
74
|
-
<dt class="r1">Inherits:</dt>
|
75
|
-
<dd class="r1">
|
76
|
-
<span class="inheritName">Object</span>
|
77
|
-
|
78
|
-
<ul class="fullTree">
|
79
|
-
<li>Object</li>
|
80
|
-
|
81
|
-
<li class="next">R509::OidMapper</li>
|
82
|
-
|
83
|
-
</ul>
|
84
|
-
<a href="#" class="inheritanceTree">show all</a>
|
85
|
-
|
86
|
-
</dd>
|
87
|
-
|
88
|
-
|
89
74
|
|
90
75
|
|
91
76
|
|
@@ -93,8 +78,8 @@
|
|
93
78
|
|
94
79
|
|
95
80
|
|
96
|
-
<dt class="
|
97
|
-
<dd class="
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/r509/oid_mapper.rb</dd>
|
98
83
|
|
99
84
|
</dl>
|
100
85
|
<div class="clear"></div>
|
@@ -143,7 +128,7 @@
|
|
143
128
|
|
144
129
|
|
145
130
|
<span class="summary_desc"><div class='inline'>
|
146
|
-
<p>Register a batch of OIDs so we have friendly short names.</p>
|
131
|
+
<p>Register a batch of OIDs so we have friendly short names ].</p>
|
147
132
|
</div></span>
|
148
133
|
|
149
134
|
</li>
|
@@ -194,7 +179,7 @@
|
|
194
179
|
</h3><div class="docstring">
|
195
180
|
<div class="discussion">
|
196
181
|
|
197
|
-
<p>Register a batch of OIDs so we have friendly short names</p>
|
182
|
+
<p>Register a batch of OIDs so we have friendly short names ]</p>
|
198
183
|
|
199
184
|
|
200
185
|
</div>
|
@@ -205,10 +190,9 @@
|
|
205
190
|
<p class="tag_title">Examples:</p>
|
206
191
|
|
207
192
|
|
208
|
-
<pre class="example code">R509::
|
209
|
-
|
210
|
-
|
211
|
-
]</pre>
|
193
|
+
<pre class="example code"><code>R509::OIDMapper.batch_register([
|
194
|
+
{:oid => "1.2.3.4.5", :short_name => "sName", :long_name => "lName"},
|
195
|
+
{:oid => "1.2.3.4.6", :short_name => "oName"}</code></pre>
|
212
196
|
|
213
197
|
</div>
|
214
198
|
<p class="tag_title">Parameters:</p>
|
@@ -247,13 +231,13 @@
|
|
247
231
|
30</pre>
|
248
232
|
</td>
|
249
233
|
<td>
|
250
|
-
<pre class="code"><span class="info file"># File 'lib/r509/
|
234
|
+
<pre class="code"><span class="info file"># File 'lib/r509/oid_mapper.rb', line 25</span>
|
251
235
|
|
252
236
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_batch_register'>batch_register</span><span class='lparen'>(</span><span class='id identifier rubyid_oids'>oids</span><span class='rparen'>)</span>
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
237
|
+
<span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_oid_hash'>oid_hash</span><span class='op'>|</span>
|
238
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='id identifier rubyid_oid_hash'>oid_hash</span><span class='lbracket'>[</span><span class='symbol'>:oid</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_oid_hash'>oid_hash</span><span class='lbracket'>[</span><span class='symbol'>:short_name</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='id identifier rubyid_oid_hash'>oid_hash</span><span class='lbracket'>[</span><span class='symbol'>:long_name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
239
|
+
<span class='kw'>end</span>
|
240
|
+
<span class='kw'>nil</span>
|
257
241
|
<span class='kw'>end</span></pre>
|
258
242
|
</td>
|
259
243
|
</tr>
|
@@ -366,13 +350,13 @@
|
|
366
350
|
16</pre>
|
367
351
|
</td>
|
368
352
|
<td>
|
369
|
-
<pre class="code"><span class="info file"># File 'lib/r509/
|
353
|
+
<pre class="code"><span class="info file"># File 'lib/r509/oid_mapper.rb', line 11</span>
|
370
354
|
|
371
355
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='id identifier rubyid_oid'>oid</span><span class='comma'>,</span><span class='id identifier rubyid_short_name'>short_name</span><span class='comma'>,</span><span class='id identifier rubyid_long_name'>long_name</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
356
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_long_name'>long_name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
357
|
+
<span class='id identifier rubyid_long_name'>long_name</span> <span class='op'>=</span> <span class='id identifier rubyid_short_name'>short_name</span>
|
358
|
+
<span class='kw'>end</span>
|
359
|
+
<span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>ObjectId</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='id identifier rubyid_oid'>oid</span><span class='comma'>,</span> <span class='id identifier rubyid_short_name'>short_name</span><span class='comma'>,</span> <span class='id identifier rubyid_long_name'>long_name</span><span class='rparen'>)</span>
|
376
360
|
<span class='kw'>end</span></pre>
|
377
361
|
</td>
|
378
362
|
</tr>
|
@@ -384,9 +368,9 @@
|
|
384
368
|
</div>
|
385
369
|
|
386
370
|
<div id="footer">
|
387
|
-
Generated on
|
371
|
+
Generated on Tue Apr 16 10:49:55 2013 by
|
388
372
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
389
|
-
0.8.
|
373
|
+
0.8.5 (ruby-1.9.3).
|
390
374
|
</div>
|
391
375
|
|
392
376
|
</body>
|