r509 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/README.md +447 -0
  2. data/Rakefile +38 -0
  3. data/bin/r509 +96 -0
  4. data/bin/r509-parse +35 -0
  5. data/doc/R509.html +154 -0
  6. data/doc/R509/Cert.html +3954 -0
  7. data/doc/R509/Cert/Extensions.html +360 -0
  8. data/doc/R509/Cert/Extensions/AuthorityInfoAccess.html +391 -0
  9. data/doc/R509/Cert/Extensions/AuthorityKeyIdentifier.html +148 -0
  10. data/doc/R509/Cert/Extensions/BasicConstraints.html +482 -0
  11. data/doc/R509/Cert/Extensions/CrlDistributionPoints.html +316 -0
  12. data/doc/R509/Cert/Extensions/ExtendedKeyUsage.html +780 -0
  13. data/doc/R509/Cert/Extensions/KeyUsage.html +1230 -0
  14. data/doc/R509/Cert/Extensions/SubjectAlternativeName.html +467 -0
  15. data/doc/R509/Cert/Extensions/SubjectKeyIdentifier.html +216 -0
  16. data/doc/R509/CertificateAuthority.html +126 -0
  17. data/doc/R509/CertificateAuthority/Signer.html +855 -0
  18. data/doc/R509/Config.html +127 -0
  19. data/doc/R509/Config/CaConfig.html +2144 -0
  20. data/doc/R509/Config/CaConfigPool.html +599 -0
  21. data/doc/R509/Config/CaProfile.html +656 -0
  22. data/doc/R509/Config/SubjectItemPolicy.html +578 -0
  23. data/doc/R509/Crl.html +126 -0
  24. data/doc/R509/Crl/Administrator.html +2077 -0
  25. data/doc/R509/Crl/Parser.html +1224 -0
  26. data/doc/R509/Csr.html +2248 -0
  27. data/doc/R509/IOHelpers.html +564 -0
  28. data/doc/R509/MessageDigest.html +396 -0
  29. data/doc/R509/NameSanitizer.html +319 -0
  30. data/doc/R509/Ocsp.html +128 -0
  31. data/doc/R509/Ocsp/Request.html +126 -0
  32. data/doc/R509/Ocsp/Request/Nonce.html +160 -0
  33. data/doc/R509/Ocsp/Response.html +837 -0
  34. data/doc/R509/OidMapper.html +393 -0
  35. data/doc/R509/PrivateKey.html +1647 -0
  36. data/doc/R509/R509Error.html +134 -0
  37. data/doc/R509/Spki.html +1424 -0
  38. data/doc/R509/Subject.html +836 -0
  39. data/doc/R509/Validity.html +160 -0
  40. data/doc/R509/Validity/Checker.html +320 -0
  41. data/doc/R509/Validity/DefaultChecker.html +283 -0
  42. data/doc/R509/Validity/DefaultWriter.html +330 -0
  43. data/doc/R509/Validity/Status.html +561 -0
  44. data/doc/R509/Validity/Writer.html +394 -0
  45. data/doc/_index.html +501 -0
  46. data/doc/class_list.html +53 -0
  47. data/doc/css/common.css +1 -0
  48. data/doc/css/full_list.css +57 -0
  49. data/doc/css/style.css +328 -0
  50. data/doc/file.README.html +534 -0
  51. data/doc/file.r509.html +149 -0
  52. data/doc/file_list.html +58 -0
  53. data/doc/frames.html +28 -0
  54. data/doc/index.html +534 -0
  55. data/doc/js/app.js +208 -0
  56. data/doc/js/full_list.js +173 -0
  57. data/doc/js/jquery.js +4 -0
  58. data/doc/methods_list.html +1932 -0
  59. data/doc/top-level-namespace.html +112 -0
  60. data/lib/r509.rb +22 -0
  61. data/lib/r509/cert.rb +414 -0
  62. data/lib/r509/cert/extensions.rb +309 -0
  63. data/lib/r509/certificateauthority.rb +290 -0
  64. data/lib/r509/config.rb +407 -0
  65. data/lib/r509/crl.rb +379 -0
  66. data/lib/r509/csr.rb +324 -0
  67. data/lib/r509/exceptions.rb +5 -0
  68. data/lib/r509/io_helpers.rb +52 -0
  69. data/lib/r509/messagedigest.rb +49 -0
  70. data/lib/r509/ocsp.rb +85 -0
  71. data/lib/r509/oidmapper.rb +32 -0
  72. data/lib/r509/privatekey.rb +185 -0
  73. data/lib/r509/spki.rb +112 -0
  74. data/lib/r509/subject.rb +133 -0
  75. data/lib/r509/validity.rb +92 -0
  76. data/lib/r509/version.rb +4 -0
  77. data/r509.yaml +73 -0
  78. data/spec/cert/extensions_spec.rb +632 -0
  79. data/spec/cert_spec.rb +321 -0
  80. data/spec/certificate_authority_spec.rb +260 -0
  81. data/spec/config_spec.rb +349 -0
  82. data/spec/crl_spec.rb +215 -0
  83. data/spec/csr_spec.rb +302 -0
  84. data/spec/fixtures.rb +233 -0
  85. data/spec/fixtures/cert1.der +0 -0
  86. data/spec/fixtures/cert1.pem +24 -0
  87. data/spec/fixtures/cert1_public_key_modulus.txt +1 -0
  88. data/spec/fixtures/cert3.p12 +0 -0
  89. data/spec/fixtures/cert3.pem +28 -0
  90. data/spec/fixtures/cert3_key.pem +27 -0
  91. data/spec/fixtures/cert3_key_des3.pem +30 -0
  92. data/spec/fixtures/cert4.pem +14 -0
  93. data/spec/fixtures/cert5.pem +30 -0
  94. data/spec/fixtures/cert6.pem +26 -0
  95. data/spec/fixtures/cert_expired.pem +26 -0
  96. data/spec/fixtures/cert_not_yet_valid.pem +26 -0
  97. data/spec/fixtures/cert_san.pem +27 -0
  98. data/spec/fixtures/cert_san2.pem +22 -0
  99. data/spec/fixtures/config_pool_test_minimal.yaml +15 -0
  100. data/spec/fixtures/config_test.yaml +41 -0
  101. data/spec/fixtures/config_test_engine_key.yaml +7 -0
  102. data/spec/fixtures/config_test_engine_no_key_name.yaml +6 -0
  103. data/spec/fixtures/config_test_minimal.yaml +7 -0
  104. data/spec/fixtures/config_test_password.yaml +7 -0
  105. data/spec/fixtures/config_test_various.yaml +100 -0
  106. data/spec/fixtures/crl_list_file.txt +1 -0
  107. data/spec/fixtures/crl_with_reason.pem +17 -0
  108. data/spec/fixtures/csr1.der +0 -0
  109. data/spec/fixtures/csr1.pem +17 -0
  110. data/spec/fixtures/csr1_key.der +0 -0
  111. data/spec/fixtures/csr1_key.pem +27 -0
  112. data/spec/fixtures/csr1_key_encrypted_des3.pem +30 -0
  113. data/spec/fixtures/csr1_newlines.pem +32 -0
  114. data/spec/fixtures/csr1_no_begin_end.pem +15 -0
  115. data/spec/fixtures/csr1_public_key_modulus.txt +1 -0
  116. data/spec/fixtures/csr2.pem +15 -0
  117. data/spec/fixtures/csr2_key.pem +27 -0
  118. data/spec/fixtures/csr3.pem +16 -0
  119. data/spec/fixtures/csr4.pem +25 -0
  120. data/spec/fixtures/csr_dsa.pem +15 -0
  121. data/spec/fixtures/csr_invalid_signature.pem +13 -0
  122. data/spec/fixtures/dsa_key.pem +20 -0
  123. data/spec/fixtures/key4.pem +27 -0
  124. data/spec/fixtures/key4_encrypted_des3.pem +30 -0
  125. data/spec/fixtures/missing_key_identifier_ca.cer +21 -0
  126. data/spec/fixtures/missing_key_identifier_ca.key +27 -0
  127. data/spec/fixtures/ocsptest.r509.local.pem +27 -0
  128. data/spec/fixtures/ocsptest.r509.local_ocsp_request.der +0 -0
  129. data/spec/fixtures/ocsptest2.r509.local.pem +27 -0
  130. data/spec/fixtures/second_ca.cer +26 -0
  131. data/spec/fixtures/second_ca.key +27 -0
  132. data/spec/fixtures/spkac.der +0 -0
  133. data/spec/fixtures/spkac.txt +1 -0
  134. data/spec/fixtures/spkac_dsa.txt +1 -0
  135. data/spec/fixtures/stca.pem +22 -0
  136. data/spec/fixtures/stca_ocsp_request.der +0 -0
  137. data/spec/fixtures/stca_ocsp_response.der +0 -0
  138. data/spec/fixtures/test1.csr +17 -0
  139. data/spec/fixtures/test_ca.cer +22 -0
  140. data/spec/fixtures/test_ca.key +28 -0
  141. data/spec/fixtures/test_ca.p12 +0 -0
  142. data/spec/fixtures/test_ca_des3.key +30 -0
  143. data/spec/fixtures/test_ca_ocsp.cer +26 -0
  144. data/spec/fixtures/test_ca_ocsp.key +27 -0
  145. data/spec/fixtures/test_ca_ocsp.p12 +0 -0
  146. data/spec/fixtures/test_ca_ocsp_chain.txt +48 -0
  147. data/spec/fixtures/test_ca_ocsp_response.der +0 -0
  148. data/spec/fixtures/test_ca_subroot.cer +26 -0
  149. data/spec/fixtures/test_ca_subroot.key +27 -0
  150. data/spec/fixtures/test_ca_subroot_ocsp.cer +25 -0
  151. data/spec/fixtures/test_ca_subroot_ocsp.key +27 -0
  152. data/spec/fixtures/test_ca_subroot_ocsp_response.der +0 -0
  153. data/spec/fixtures/unknown_oid.csr +17 -0
  154. data/spec/message_digest_spec.rb +89 -0
  155. data/spec/ocsp_spec.rb +111 -0
  156. data/spec/oid_mapper_spec.rb +31 -0
  157. data/spec/privatekey_spec.rb +198 -0
  158. data/spec/spec_helper.rb +14 -0
  159. data/spec/spki_spec.rb +157 -0
  160. data/spec/subject_spec.rb +203 -0
  161. data/spec/validity_spec.rb +98 -0
  162. metadata +257 -0
@@ -0,0 +1,128 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: R509::Ocsp
8
+
9
+ &mdash; Documentation by YARD 0.8.0
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (O)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
36
+ &raquo;
37
+ <span class="title">Ocsp</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: R509::Ocsp
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/r509/ocsp.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>Ocsp module</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div><h2>Defined Under Namespace</h2>
99
+ <p class="children">
100
+
101
+
102
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Ocsp/Request.html" title="R509::Ocsp::Request (module)">Request</a></span>
103
+
104
+
105
+
106
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Ocsp/Response.html" title="R509::Ocsp::Response (class)">Response</a></span>
107
+
108
+
109
+ </p>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ </div>
120
+
121
+ <div id="footer">
122
+ Generated on Tue Oct 23 22:48:01 2012 by
123
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
+ 0.8.0 (ruby-1.9.3).
125
+ </div>
126
+
127
+ </body>
128
+ </html>
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: R509::Ocsp::Request
8
+
9
+ &mdash; Documentation by YARD 0.8.0
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Ocsp.html" title="R509::Ocsp (module)">Ocsp</a></span></span>
36
+ &raquo;
37
+ <span class="title">Request</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: R509::Ocsp::Request
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/r509/ocsp.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>holds OCSP request related items</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div><h2>Defined Under Namespace</h2>
99
+ <p class="children">
100
+
101
+
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
+
104
+
105
+
106
+
107
+ </p>
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ </div>
118
+
119
+ <div id="footer">
120
+ Generated on Tue Oct 23 22:48:01 2012 by
121
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
122
+ 0.8.0 (ruby-1.9.3).
123
+ </div>
124
+
125
+ </body>
126
+ </html>
@@ -0,0 +1,160 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: R509::Ocsp::Request::Nonce
8
+
9
+ &mdash; Documentation by YARD 0.8.0
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../../_index.html">Index (N)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Ocsp.html" title="R509::Ocsp (module)">Ocsp</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Request.html" title="R509::Ocsp::Request (module)">Request</a></span></span>
36
+ &raquo;
37
+ <span class="title">Nonce</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: R509::Ocsp::Request::Nonce
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/r509/ocsp.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>contains constants r509 uses for OCSP responses</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div>
99
+ <h2>Constant Summary</h2>
100
+
101
+ <dl class="constants">
102
+
103
+ <dt id="PRESENT_AND_EQUAL-constant" class="">PRESENT_AND_EQUAL =
104
+ <div class="docstring">
105
+ <div class="discussion">
106
+
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></p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+ </dt>
118
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
119
+
120
+ <dt id="BOTH_ABSENT-constant" class="">BOTH_ABSENT =
121
+
122
+ </dt>
123
+ <dd><pre class="code"><span class='int'>2</span></pre></dd>
124
+
125
+ <dt id="RESPONSE_ONLY-constant" class="">RESPONSE_ONLY =
126
+
127
+ </dt>
128
+ <dd><pre class="code"><span class='int'>3</span></pre></dd>
129
+
130
+ <dt id="NOT_EQUAL-constant" class="">NOT_EQUAL =
131
+
132
+ </dt>
133
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
134
+
135
+ <dt id="REQUEST_ONLY-constant" class="">REQUEST_ONLY =
136
+
137
+ </dt>
138
+ <dd><pre class="code"><span class='op'>-</span><span class='int'>1</span></pre></dd>
139
+
140
+ </dl>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ </div>
152
+
153
+ <div id="footer">
154
+ Generated on Tue Oct 23 22:48:01 2012 by
155
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
156
+ 0.8.0 (ruby-1.9.3).
157
+ </div>
158
+
159
+ </body>
160
+ </html>
@@ -0,0 +1,837 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: R509::Ocsp::Response
8
+
9
+ &mdash; Documentation by YARD 0.8.0
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Ocsp.html" title="R509::Ocsp (module)">Ocsp</a></span></span>
36
+ &raquo;
37
+ <span class="title">Response</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: R509::Ocsp::Response
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">R509::Ocsp::Response</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/r509/ocsp.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>builds OCSP responses</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Class Method Summary
123
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#parse-class_method" title="parse (class method)">+ (R509::Ocsp::Response) <strong>parse</strong>(ocsp_string) </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'></div></span>
146
+
147
+ </li>
148
+
149
+
150
+ </ul>
151
+
152
+ <h2>
153
+ Instance Method Summary
154
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
155
+ </h2>
156
+
157
+ <ul class="summary">
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#basic-instance_method" title="#basic (instance method)">- (OpenSSL::OCSP::BasicResponse) <strong>basic</strong> </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'></div></span>
177
+
178
+ </li>
179
+
180
+
181
+ <li class="public ">
182
+ <span class="summary_signature">
183
+
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
+
186
+
187
+
188
+ </span>
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ <span class="summary_desc"><div class='inline'>
199
+ <p>The status code of the nonce check.</p>
200
+ </div></span>
201
+
202
+ </li>
203
+
204
+
205
+ <li class="public ">
206
+ <span class="summary_signature">
207
+
208
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Response) <strong>initialize</strong>(ocsp_response) </a>
209
+
210
+
211
+
212
+ </span>
213
+
214
+
215
+ <span class="note title constructor">constructor</span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'>
225
+ <p>A new instance of Response.</p>
226
+ </div></span>
227
+
228
+ </li>
229
+
230
+
231
+ <li class="public ">
232
+ <span class="summary_signature">
233
+
234
+ <a href="#status-instance_method" title="#status (instance method)">- (OpenSSL::OCSP) <strong>status</strong> </a>
235
+
236
+
237
+
238
+ </span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'>
249
+ <p>Response status of this response.</p>
250
+ </div></span>
251
+
252
+ </li>
253
+
254
+
255
+ <li class="public ">
256
+ <span class="summary_signature">
257
+
258
+ <a href="#to_der-instance_method" title="#to_der (instance method)">- (String) <strong>to_der</strong> </a>
259
+
260
+
261
+
262
+ </span>
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+ <span class="summary_desc"><div class='inline'>
273
+ <p>Der encoded string.</p>
274
+ </div></span>
275
+
276
+ </li>
277
+
278
+
279
+ <li class="public ">
280
+ <span class="summary_signature">
281
+
282
+ <a href="#verify-instance_method" title="#verify (instance method)">- (Boolean) <strong>verify</strong>(certs) </a>
283
+
284
+
285
+
286
+ </span>
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+ <span class="summary_desc"><div class='inline'>
297
+ <p>True if the response is valid according to the given root.</p>
298
+ </div></span>
299
+
300
+ </li>
301
+
302
+
303
+ </ul>
304
+
305
+
306
+ <div id="constructor_details" class="method_details_list">
307
+ <h2>Constructor Details</h2>
308
+
309
+ <div class="method_details first">
310
+ <h3 class="signature first" id="initialize-instance_method">
311
+
312
+ - (<tt><span class='object_link'><a href="" title="R509::Ocsp::Response (class)">Response</a></span></tt>) <strong>initialize</strong>(ocsp_response)
313
+
314
+
315
+
316
+
317
+
318
+ </h3><div class="docstring">
319
+ <div class="discussion">
320
+
321
+ <p>A new instance of Response</p>
322
+
323
+
324
+ </div>
325
+ </div>
326
+ <div class="tags">
327
+ <p class="tag_title">Parameters:</p>
328
+ <ul class="param">
329
+
330
+ <li>
331
+
332
+ <span class='name'>ocsp_response</span>
333
+
334
+
335
+ <span class='type'>(<tt>OpenSSL::OCSP::Response</tt>)</span>
336
+
337
+
338
+
339
+ </li>
340
+
341
+ </ul>
342
+
343
+
344
+ </div><table class="source_code">
345
+ <tr>
346
+ <td>
347
+ <pre class="lines">
348
+
349
+
350
+ 11
351
+ 12
352
+ 13
353
+ 14
354
+ 15
355
+ 16</pre>
356
+ </td>
357
+ <td>
358
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 11</span>
359
+
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
+ <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
+ <span class='kw'>end</span></pre>
366
+ </td>
367
+ </tr>
368
+ </table>
369
+ </div>
370
+
371
+ </div>
372
+
373
+
374
+ <div id="class_method_details" class="method_details_list">
375
+ <h2>Class Method Details</h2>
376
+
377
+
378
+ <div class="method_details first">
379
+ <h3 class="signature first" id="parse-class_method">
380
+
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
+
383
+
384
+
385
+
386
+
387
+ </h3><div class="docstring">
388
+ <div class="discussion">
389
+
390
+
391
+ </div>
392
+ </div>
393
+ <div class="tags">
394
+ <p class="tag_title">Parameters:</p>
395
+ <ul class="param">
396
+
397
+ <li>
398
+
399
+ <span class='name'>ocsp_string</span>
400
+
401
+
402
+ <span class='type'>(<tt>String</tt>, <tt>OpenSSL::OCSP::Response</tt>)</span>
403
+
404
+
405
+
406
+ &mdash;
407
+ <div class='inline'>
408
+ <p>parses an existing response</p>
409
+ </div>
410
+
411
+ </li>
412
+
413
+ </ul>
414
+
415
+ <p class="tag_title">Returns:</p>
416
+ <ul class="return">
417
+
418
+ <li>
419
+
420
+
421
+ <span class='type'>(<tt><span class='object_link'><a href="" title="R509::Ocsp::Response (class)">R509::Ocsp::Response</a></span></tt>)</span>
422
+
423
+
424
+
425
+ </li>
426
+
427
+ </ul>
428
+
429
+ </div><table class="source_code">
430
+ <tr>
431
+ <td>
432
+ <pre class="lines">
433
+
434
+
435
+ 19
436
+ 20
437
+ 21
438
+ 22
439
+ 23
440
+ 24</pre>
441
+ </td>
442
+ <td>
443
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 19</span>
444
+
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
+ <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
+ <span class='kw'>end</span></pre>
451
+ </td>
452
+ </tr>
453
+ </table>
454
+ </div>
455
+
456
+ </div>
457
+
458
+ <div id="instance_method_details" class="method_details_list">
459
+ <h2>Instance Method Details</h2>
460
+
461
+
462
+ <div class="method_details first">
463
+ <h3 class="signature first" id="basic-instance_method">
464
+
465
+ - (<tt>OpenSSL::OCSP::BasicResponse</tt>) <strong>basic</strong>
466
+
467
+
468
+
469
+
470
+
471
+ </h3><div class="docstring">
472
+ <div class="discussion">
473
+
474
+
475
+ </div>
476
+ </div>
477
+ <div class="tags">
478
+
479
+ <p class="tag_title">Returns:</p>
480
+ <ul class="return">
481
+
482
+ <li>
483
+
484
+
485
+ <span class='type'>(<tt>OpenSSL::OCSP::BasicResponse</tt>)</span>
486
+
487
+
488
+
489
+ </li>
490
+
491
+ </ul>
492
+
493
+ </div><table class="source_code">
494
+ <tr>
495
+ <td>
496
+ <pre class="lines">
497
+
498
+
499
+ 37
500
+ 38
501
+ 39</pre>
502
+ </td>
503
+ <td>
504
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 37</span>
505
+
506
+ <span class='kw'>def</span> <span class='id identifier rubyid_basic'>basic</span>
507
+ <span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_basic'>basic</span>
508
+ <span class='kw'>end</span></pre>
509
+ </td>
510
+ </tr>
511
+ </table>
512
+ </div>
513
+
514
+ <div class="method_details ">
515
+ <h3 class="signature " id="check_nonce-instance_method">
516
+
517
+ - (<tt>R509::Ocsp::Request::Nonce::CONSTANT</tt>) <strong>check_nonce</strong>(ocsp_request)
518
+
519
+
520
+
521
+
522
+
523
+ </h3><div class="docstring">
524
+ <div class="discussion">
525
+
526
+ <p>The status code of the nonce check</p>
527
+
528
+
529
+ </div>
530
+ </div>
531
+ <div class="tags">
532
+ <p class="tag_title">Parameters:</p>
533
+ <ul class="param">
534
+
535
+ <li>
536
+
537
+ <span class='name'>ocsp_request</span>
538
+
539
+
540
+ <span class='type'>(<tt>OpenSSL::OCSP::Request</tt>)</span>
541
+
542
+
543
+
544
+ &mdash;
545
+ <div class='inline'>
546
+ <p>the OCSP request whose nonce to check</p>
547
+ </div>
548
+
549
+ </li>
550
+
551
+ </ul>
552
+
553
+ <p class="tag_title">Returns:</p>
554
+ <ul class="return">
555
+
556
+ <li>
557
+
558
+
559
+ <span class='type'>(<tt>R509::Ocsp::Request::Nonce::CONSTANT</tt>)</span>
560
+
561
+
562
+
563
+ &mdash;
564
+ <div class='inline'>
565
+ <p>the status code of the nonce check</p>
566
+ </div>
567
+
568
+ </li>
569
+
570
+ </ul>
571
+
572
+ </div><table class="source_code">
573
+ <tr>
574
+ <td>
575
+ <pre class="lines">
576
+
577
+
578
+ 67
579
+ 68
580
+ 69</pre>
581
+ </td>
582
+ <td>
583
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 67</span>
584
+
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
+ <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
+ <span class='kw'>end</span></pre>
588
+ </td>
589
+ </tr>
590
+ </table>
591
+ </div>
592
+
593
+ <div class="method_details ">
594
+ <h3 class="signature " id="status-instance_method">
595
+
596
+ - (<tt>OpenSSL::OCSP</tt>) <strong>status</strong>
597
+
598
+
599
+
600
+
601
+
602
+ </h3><div class="docstring">
603
+ <div class="discussion">
604
+
605
+ <p>Response status of this response</p>
606
+
607
+
608
+ </div>
609
+ </div>
610
+ <div class="tags">
611
+
612
+ <p class="tag_title">Returns:</p>
613
+ <ul class="return">
614
+
615
+ <li>
616
+
617
+
618
+ <span class='type'>(<tt>OpenSSL::OCSP</tt>)</span>
619
+
620
+
621
+
622
+ &mdash;
623
+ <div class='inline'>
624
+ <p>response status of this response</p>
625
+ </div>
626
+
627
+ </li>
628
+
629
+ </ul>
630
+
631
+ </div><table class="source_code">
632
+ <tr>
633
+ <td>
634
+ <pre class="lines">
635
+
636
+
637
+ 27
638
+ 28
639
+ 29</pre>
640
+ </td>
641
+ <td>
642
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 27</span>
643
+
644
+ <span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
645
+ <span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span>
646
+ <span class='kw'>end</span></pre>
647
+ </td>
648
+ </tr>
649
+ </table>
650
+ </div>
651
+
652
+ <div class="method_details ">
653
+ <h3 class="signature " id="to_der-instance_method">
654
+
655
+ - (<tt>String</tt>) <strong>to_der</strong>
656
+
657
+
658
+
659
+
660
+
661
+ </h3><div class="docstring">
662
+ <div class="discussion">
663
+
664
+ <p>Der encoded string</p>
665
+
666
+
667
+ </div>
668
+ </div>
669
+ <div class="tags">
670
+
671
+ <p class="tag_title">Returns:</p>
672
+ <ul class="return">
673
+
674
+ <li>
675
+
676
+
677
+ <span class='type'>(<tt>String</tt>)</span>
678
+
679
+
680
+
681
+ &mdash;
682
+ <div class='inline'>
683
+ <p>der encoded string</p>
684
+ </div>
685
+
686
+ </li>
687
+
688
+ </ul>
689
+
690
+ </div><table class="source_code">
691
+ <tr>
692
+ <td>
693
+ <pre class="lines">
694
+
695
+
696
+ 32
697
+ 33
698
+ 34</pre>
699
+ </td>
700
+ <td>
701
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 32</span>
702
+
703
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_der'>to_der</span>
704
+ <span class='ivar'>@ocsp_response</span><span class='period'>.</span><span class='id identifier rubyid_to_der'>to_der</span>
705
+ <span class='kw'>end</span></pre>
706
+ </td>
707
+ </tr>
708
+ </table>
709
+ </div>
710
+
711
+ <div class="method_details ">
712
+ <h3 class="signature " id="verify-instance_method">
713
+
714
+ - (<tt>Boolean</tt>) <strong>verify</strong>(certs)
715
+
716
+
717
+
718
+
719
+
720
+ </h3><div class="docstring">
721
+ <div class="discussion">
722
+
723
+ <p>True if the response is valid according to the given root</p>
724
+
725
+
726
+ </div>
727
+ </div>
728
+ <div class="tags">
729
+ <p class="tag_title">Parameters:</p>
730
+ <ul class="param">
731
+
732
+ <li>
733
+
734
+ <span class='name'>certs</span>
735
+
736
+
737
+ <span class='type'>(<tt>Array&lt;OpenSSL::X509::Certificate&gt;</tt>, <tt>OpenSSL::X509::Certificate</tt>)</span>
738
+
739
+
740
+
741
+ &mdash;
742
+ <div class='inline'>
743
+ <p>A cert or array of certs to verify against</p>
744
+ </div>
745
+
746
+ </li>
747
+
748
+ </ul>
749
+
750
+ <p class="tag_title">Returns:</p>
751
+ <ul class="return">
752
+
753
+ <li>
754
+
755
+
756
+ <span class='type'>(<tt>Boolean</tt>)</span>
757
+
758
+
759
+
760
+ &mdash;
761
+ <div class='inline'>
762
+ <p>true if the response is valid according to the given root</p>
763
+ </div>
764
+
765
+ </li>
766
+
767
+ </ul>
768
+
769
+ </div><table class="source_code">
770
+ <tr>
771
+ <td>
772
+ <pre class="lines">
773
+
774
+
775
+ 43
776
+ 44
777
+ 45
778
+ 46
779
+ 47
780
+ 48
781
+ 49
782
+ 50
783
+ 51
784
+ 52
785
+ 53
786
+ 54
787
+ 55
788
+ 56
789
+ 57
790
+ 58
791
+ 59
792
+ 60
793
+ 61
794
+ 62
795
+ 63</pre>
796
+ </td>
797
+ <td>
798
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp.rb', line 43</span>
799
+
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
+ <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>
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>
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
+ <span class='kw'>end</span></pre>
821
+ </td>
822
+ </tr>
823
+ </table>
824
+ </div>
825
+
826
+ </div>
827
+
828
+ </div>
829
+
830
+ <div id="footer">
831
+ Generated on Tue Oct 23 22:48:02 2012 by
832
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
833
+ 0.8.0 (ruby-1.9.3).
834
+ </div>
835
+
836
+ </body>
837
+ </html>