r509-ocsp-responder 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/README.md +77 -0
  2. data/Rakefile +38 -0
  3. data/doc/R509.html +115 -0
  4. data/doc/R509/Ocsp.html +130 -0
  5. data/doc/R509/Ocsp/Helper.html +126 -0
  6. data/doc/R509/Ocsp/Helper/RequestChecker.html +739 -0
  7. data/doc/R509/Ocsp/Helper/ResponseSigner.html +583 -0
  8. data/doc/R509/Ocsp/Responder.html +129 -0
  9. data/doc/R509/Ocsp/Responder/OcspConfig.html +289 -0
  10. data/doc/R509/Ocsp/Responder/Server.html +128 -0
  11. data/doc/R509/Ocsp/Responder/StatusError.html +134 -0
  12. data/doc/R509/Ocsp/Signer.html +584 -0
  13. data/doc/_index.html +197 -0
  14. data/doc/class_list.html +53 -0
  15. data/doc/css/common.css +1 -0
  16. data/doc/css/full_list.css +57 -0
  17. data/doc/css/style.css +328 -0
  18. data/doc/file.README.html +156 -0
  19. data/doc/file_list.html +55 -0
  20. data/doc/frames.html +28 -0
  21. data/doc/index.html +156 -0
  22. data/doc/js/app.js +214 -0
  23. data/doc/js/full_list.js +173 -0
  24. data/doc/js/jquery.js +4 -0
  25. data/doc/method_list.html +164 -0
  26. data/doc/top-level-namespace.html +112 -0
  27. data/lib/r509/ocsp/responder/ocsp-config.rb +35 -0
  28. data/lib/r509/ocsp/responder/server.rb +169 -0
  29. data/lib/r509/ocsp/responder/version.rb +7 -0
  30. data/lib/r509/ocsp/signer.rb +244 -0
  31. data/spec/fixtures.rb +196 -0
  32. data/spec/fixtures/cert1.pem +24 -0
  33. data/spec/fixtures/config_test_various.yaml +46 -0
  34. data/spec/fixtures/ocsptest.r509.local.pem +27 -0
  35. data/spec/fixtures/second_ca.cer +26 -0
  36. data/spec/fixtures/second_ca.key +27 -0
  37. data/spec/fixtures/stca.pem +22 -0
  38. data/spec/fixtures/stca_ocsp_request.der +0 -0
  39. data/spec/fixtures/stca_ocsp_response.der +0 -0
  40. data/spec/fixtures/test_ca.cer +22 -0
  41. data/spec/fixtures/test_ca.key +28 -0
  42. data/spec/fixtures/test_ca_ocsp.cer +26 -0
  43. data/spec/fixtures/test_ca_ocsp.key +27 -0
  44. data/spec/fixtures/test_ca_ocsp_chain.txt +48 -0
  45. data/spec/fixtures/test_ca_request.der +0 -0
  46. data/spec/fixtures/test_ca_response.der +0 -0
  47. data/spec/fixtures/test_ca_subroot.cer +25 -0
  48. data/spec/fixtures/test_ca_subroot.key +27 -0
  49. data/spec/fixtures/test_ca_subroot_ocsp.cer +25 -0
  50. data/spec/fixtures/test_ca_subroot_ocsp.key +27 -0
  51. data/spec/fixtures/test_config.yaml +17 -0
  52. data/spec/server_spec.rb +400 -0
  53. data/spec/signer_spec.rb +275 -0
  54. data/spec/spec_helper.rb +18 -0
  55. metadata +259 -0
@@ -0,0 +1,134 @@
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
+ Exception: R509::Ocsp::Responder::StatusError
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
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 (S)</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="../Responder.html" title="R509::Ocsp::Responder (module)">Responder</a></span></span>
36
+ &raquo;
37
+ <span class="title">StatusError</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>Exception: R509::Ocsp::Responder::StatusError
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">StandardError</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">StandardError</li>
82
+
83
+ <li class="next">R509::Ocsp::Responder::StatusError</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/r509/ocsp/responder/server.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>error for status checking</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ </div>
126
+
127
+ <div id="footer">
128
+ Generated on Thu Nov 8 14:33:52 2012 by
129
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
+ 0.8.2.1 (ruby-1.9.3).
131
+ </div>
132
+
133
+ </body>
134
+ </html>
@@ -0,0 +1,584 @@
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::Signer
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
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 (S)</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">Signer</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::Signer
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::Signer</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/signer.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>A class for signing OCSP responses</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#request_checker-instance_method" title="#request_checker (instance method)">- (Object) <strong>request_checker</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+ <span class="note title readonly">readonly</span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>Returns the value of attribute request_checker.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#validity_checker-instance_method" title="#validity_checker (instance method)">- (Object) <strong>validity_checker</strong> </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+ <span class="note title readonly">readonly</span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>Returns the value of attribute validity_checker.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ </ul>
179
+
180
+
181
+
182
+
183
+
184
+ <h2>
185
+ Instance Method Summary
186
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
187
+ </h2>
188
+
189
+ <ul class="summary">
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#handle_request-instance_method" title="#handle_request (instance method)">- (Hash) <strong>handle_request</strong>(request) </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'><ul><li>
209
+ <p>:request [OpenSSL::OCSP::Request] parsed request object</p>
210
+ </li><li>
211
+ <p>:response [OpenSSL::OCSP::Response] full response object.</p>
212
+ </li></ul>
213
+ </div></span>
214
+
215
+ </li>
216
+
217
+
218
+ <li class="public ">
219
+ <span class="summary_signature">
220
+
221
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Signer) <strong>initialize</strong>(options) </a>
222
+
223
+
224
+
225
+ </span>
226
+
227
+
228
+ <span class="note title constructor">constructor</span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'>
238
+ <p>possible OCSP issuance roots that we want to issue OCSP responses for.</p>
239
+ </div></span>
240
+
241
+ </li>
242
+
243
+
244
+ </ul>
245
+
246
+
247
+ <div id="constructor_details" class="method_details_list">
248
+ <h2>Constructor Details</h2>
249
+
250
+ <div class="method_details first">
251
+ <h3 class="signature first" id="initialize-instance_method">
252
+
253
+ - (<tt><span class='object_link'><a href="" title="R509::Ocsp::Signer (class)">Signer</a></span></tt>) <strong>initialize</strong>(options)
254
+
255
+
256
+
257
+
258
+
259
+ </h3><div class="docstring">
260
+ <div class="discussion">
261
+
262
+ <p>possible OCSP issuance roots that we want to issue OCSP responses for</p>
263
+
264
+
265
+ </div>
266
+ </div>
267
+ <div class="tags">
268
+ <p class="tag_title">Parameters:</p>
269
+ <ul class="param">
270
+
271
+ <li>
272
+
273
+ <span class='name'>options</span>
274
+
275
+
276
+ <span class='type'>(<tt>Hash</tt>)</span>
277
+
278
+
279
+
280
+ &mdash;
281
+ <div class='inline'>
282
+ <p>a customizable set of options</p>
283
+ </div>
284
+
285
+ </li>
286
+
287
+ </ul>
288
+
289
+
290
+
291
+
292
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
293
+ <ul class="option">
294
+
295
+ <li>
296
+ <span class="name">:copy_nonce</span>
297
+ <span class="type">(<tt>Boolean</tt>)</span>
298
+ <span class="default">
299
+
300
+ </span>
301
+
302
+ &mdash; <div class='inline'>
303
+ <p>copy nonce from request to response?</p>
304
+ </div>
305
+
306
+ </li>
307
+
308
+ <li>
309
+ <span class="name">:configs</span>
310
+ <span class="type">(<tt>R509::Config::CaConfigPool</tt>)</span>
311
+ <span class="default">
312
+
313
+ </span>
314
+
315
+ &mdash; <div class='inline'>
316
+ <p>CaConfigPool object</p>
317
+ </div>
318
+
319
+ </li>
320
+
321
+ </ul>
322
+
323
+
324
+
325
+ </div><table class="source_code">
326
+ <tr>
327
+ <td>
328
+ <pre class="lines">
329
+
330
+
331
+ 15
332
+ 16
333
+ 17
334
+ 18
335
+ 19
336
+ 20
337
+ 21
338
+ 22
339
+ 23</pre>
340
+ </td>
341
+ <td>
342
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 15</span>
343
+
344
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
345
+ <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='symbol'>:validity_checker</span><span class='rparen'>)</span>
346
+ <span class='ivar'>@validity_checker</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:validity_checker</span><span class='rbracket'>]</span>
347
+ <span class='kw'>else</span>
348
+ <span class='ivar'>@validity_checker</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>DefaultChecker</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
349
+ <span class='kw'>end</span>
350
+ <span class='ivar'>@request_checker</span> <span class='op'>=</span> <span class='const'>Helper</span><span class='op'>::</span><span class='const'>RequestChecker</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:configs</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='ivar'>@validity_checker</span><span class='rparen'>)</span>
351
+ <span class='ivar'>@response_signer</span> <span class='op'>=</span> <span class='const'>Helper</span><span class='op'>::</span><span class='const'>ResponseSigner</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
352
+ <span class='kw'>end</span></pre>
353
+ </td>
354
+ </tr>
355
+ </table>
356
+ </div>
357
+
358
+ </div>
359
+
360
+ <div id="instance_attr_details" class="attr_details">
361
+ <h2>Instance Attribute Details</h2>
362
+
363
+
364
+ <span id=""></span>
365
+ <div class="method_details first">
366
+ <h3 class="signature first" id="request_checker-instance_method">
367
+
368
+ - (<tt>Object</tt>) <strong>request_checker</strong> <span class="extras">(readonly)</span>
369
+
370
+
371
+
372
+
373
+
374
+ </h3><div class="docstring">
375
+ <div class="discussion">
376
+
377
+ <p>Returns the value of attribute request_checker</p>
378
+
379
+
380
+ </div>
381
+ </div>
382
+ <div class="tags">
383
+
384
+
385
+ </div><table class="source_code">
386
+ <tr>
387
+ <td>
388
+ <pre class="lines">
389
+
390
+
391
+ 10
392
+ 11
393
+ 12</pre>
394
+ </td>
395
+ <td>
396
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 10</span>
397
+
398
+ <span class='kw'>def</span> <span class='id identifier rubyid_request_checker'>request_checker</span>
399
+ <span class='ivar'>@request_checker</span>
400
+ <span class='kw'>end</span></pre>
401
+ </td>
402
+ </tr>
403
+ </table>
404
+ </div>
405
+
406
+
407
+ <span id=""></span>
408
+ <div class="method_details ">
409
+ <h3 class="signature " id="validity_checker-instance_method">
410
+
411
+ - (<tt>Object</tt>) <strong>validity_checker</strong> <span class="extras">(readonly)</span>
412
+
413
+
414
+
415
+
416
+
417
+ </h3><div class="docstring">
418
+ <div class="discussion">
419
+
420
+ <p>Returns the value of attribute validity_checker</p>
421
+
422
+
423
+ </div>
424
+ </div>
425
+ <div class="tags">
426
+
427
+
428
+ </div><table class="source_code">
429
+ <tr>
430
+ <td>
431
+ <pre class="lines">
432
+
433
+
434
+ 10
435
+ 11
436
+ 12</pre>
437
+ </td>
438
+ <td>
439
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 10</span>
440
+
441
+ <span class='kw'>def</span> <span class='id identifier rubyid_validity_checker'>validity_checker</span>
442
+ <span class='ivar'>@validity_checker</span>
443
+ <span class='kw'>end</span></pre>
444
+ </td>
445
+ </tr>
446
+ </table>
447
+ </div>
448
+
449
+ </div>
450
+
451
+
452
+ <div id="instance_method_details" class="method_details_list">
453
+ <h2>Instance Method Details</h2>
454
+
455
+
456
+ <div class="method_details first">
457
+ <h3 class="signature first" id="handle_request-instance_method">
458
+
459
+ - (<tt>Hash</tt>) <strong>handle_request</strong>(request)
460
+
461
+
462
+
463
+
464
+
465
+ </h3><div class="docstring">
466
+ <div class="discussion">
467
+ <ul><li>
468
+ <p>:request [OpenSSL::OCSP::Request] parsed request object</p>
469
+ </li><li>
470
+ <p>:response [OpenSSL::OCSP::Response] full response object</p>
471
+ </li></ul>
472
+
473
+
474
+ </div>
475
+ </div>
476
+ <div class="tags">
477
+ <p class="tag_title">Parameters:</p>
478
+ <ul class="param">
479
+
480
+ <li>
481
+
482
+ <span class='name'>request</span>
483
+
484
+
485
+ <span class='type'>(<tt>String</tt>, <tt>OpenSSL::OCSP::Request</tt>)</span>
486
+
487
+
488
+
489
+ &mdash;
490
+ <div class='inline'>
491
+ <p>OCSP request (string or parsed object)</p>
492
+ </div>
493
+
494
+ </li>
495
+
496
+ </ul>
497
+
498
+ <p class="tag_title">Returns:</p>
499
+ <ul class="return">
500
+
501
+ <li>
502
+
503
+
504
+ <span class='type'>(<tt>Hash</tt>)</span>
505
+
506
+
507
+
508
+ &mdash;
509
+ <div class='inline'><ul><li>
510
+ <p>:request [OpenSSL::OCSP::Request] parsed request object</p>
511
+ </li><li>
512
+ <p>:response [OpenSSL::OCSP::Response] full response object</p>
513
+ </li></ul>
514
+ </div>
515
+
516
+ </li>
517
+
518
+ </ul>
519
+
520
+ </div><table class="source_code">
521
+ <tr>
522
+ <td>
523
+ <pre class="lines">
524
+
525
+
526
+ 30
527
+ 31
528
+ 32
529
+ 33
530
+ 34
531
+ 35
532
+ 36
533
+ 37
534
+ 38
535
+ 39
536
+ 40
537
+ 41
538
+ 42
539
+ 43
540
+ 44
541
+ 45
542
+ 46
543
+ 47
544
+ 48</pre>
545
+ </td>
546
+ <td>
547
+ <pre class="code"><span class="info file"># File 'lib/r509/ocsp/signer.rb', line 30</span>
548
+
549
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle_request'>handle_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
550
+ <span class='kw'>begin</span>
551
+ <span class='id identifier rubyid_parsed_request'>parsed_request</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>Request</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_request'>request</span>
552
+ <span class='kw'>rescue</span>
553
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='symbol'>:response</span> <span class='op'>=&gt;</span> <span class='ivar'>@response_signer</span><span class='period'>.</span><span class='id identifier rubyid_create_response'>create_response</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_STATUS_MALFORMEDREQUEST</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:request</span> <span class='op'>=&gt;</span> <span class='kw'>nil</span><span class='rbrace'>}</span>
554
+ <span class='kw'>end</span>
555
+
556
+ <span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='ivar'>@request_checker</span><span class='period'>.</span><span class='id identifier rubyid_check_statuses'>check_statuses</span><span class='lparen'>(</span><span class='id identifier rubyid_parsed_request'>parsed_request</span><span class='rparen'>)</span>
557
+ <span class='kw'>if</span> <span class='kw'>not</span> <span class='ivar'>@request_checker</span><span class='period'>.</span><span class='id identifier rubyid_validate_statuses'>validate_statuses</span><span class='lparen'>(</span><span class='id identifier rubyid_statuses'>statuses</span><span class='rparen'>)</span>
558
+ <span class='kw'>return</span> <span class='lbrace'>{</span><span class='symbol'>:response</span> <span class='op'>=&gt;</span> <span class='ivar'>@response_signer</span><span class='period'>.</span><span class='id identifier rubyid_create_response'>create_response</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_STATUS_UNAUTHORIZED</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:request</span> <span class='op'>=&gt;</span> <span class='kw'>nil</span><span class='rbrace'>}</span>
559
+ <span class='kw'>end</span>
560
+
561
+ <span class='id identifier rubyid_basic_response'>basic_response</span> <span class='op'>=</span> <span class='ivar'>@response_signer</span><span class='period'>.</span><span class='id identifier rubyid_create_basic_response'>create_basic_response</span><span class='lparen'>(</span><span class='id identifier rubyid_parsed_request'>parsed_request</span><span class='comma'>,</span><span class='id identifier rubyid_statuses'>statuses</span><span class='rparen'>)</span>
562
+
563
+ <span class='lbrace'>{</span><span class='symbol'>:response</span> <span class='op'>=&gt;</span> <span class='ivar'>@response_signer</span><span class='period'>.</span><span class='id identifier rubyid_create_response'>create_response</span><span class='lparen'>(</span>
564
+ <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>OCSP</span><span class='op'>::</span><span class='const'>RESPONSE_STATUS_SUCCESSFUL</span><span class='comma'>,</span>
565
+ <span class='id identifier rubyid_basic_response'>basic_response</span>
566
+ <span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:request</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_parsed_request'>parsed_request</span><span class='rbrace'>}</span>
567
+ <span class='kw'>end</span></pre>
568
+ </td>
569
+ </tr>
570
+ </table>
571
+ </div>
572
+
573
+ </div>
574
+
575
+ </div>
576
+
577
+ <div id="footer">
578
+ Generated on Thu Nov 8 14:33:52 2012 by
579
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
580
+ 0.8.2.1 (ruby-1.9.3).
581
+ </div>
582
+
583
+ </body>
584
+ </html>