r509-validity-redis 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e0c8daf706e8f0becb590914e70756a1451eb59f
4
+ data.tar.gz: a64b4f6c47b85e28475a8adc171bc299b3c29d99
5
+ SHA512:
6
+ metadata.gz: 734a18bc551efd533f15974dab436de6ea3f6ac5f334aa5a2210d42956a2ef0782771b364e6c2383af497118675e12e96434e3c985384f3a65f91696a586124b
7
+ data.tar.gz: 372f0aabb5b3f668fcd79e17e7a35a29216d99a2c9130cea10430b3875f26aa6919cab972e15c8484d4e46745251ea6f58988e94599633a4ae4bb07e8d0461f3
Binary file
Binary file
data/README.md CHANGED
@@ -1,30 +1,33 @@
1
- This project is related to [r509](http://github.com/reaperhulk/r509) and [ocsp-responder](http://github.com/reaperhulk/ocsp-responder), allowing certificate validity and revocation information to be read and written to a Redis backend.
1
+ This project is related to [r509](http://github.com/reaperhulk/r509), [r509-ca-http](http://github.com/sirsean/r509-ca-http), and [r509-ocsp-responder](http://github.com/reaperhulk/r509-ocsp-responder), allowing certificate validity and revocation information to be read and written to a Redis backend.
2
2
 
3
3
  When a certificate is issued, we want this sent to Redis:
4
4
 
5
- HMSET "cert:<serial>" status 0
5
+ HMSET "cert:<issuer>:<serial>" status 0
6
6
 
7
7
  When revoked:
8
8
 
9
- HMSET "cert:<serial>" status 1 revocation_time <timestamp> revocation_reason 0
9
+ HMSET "cert:<issuer>:<serial>" status 1 revocation_time <timestamp> revocation_reason 0
10
10
 
11
11
 
12
12
  To get the status of a certificate:
13
13
 
14
- HGETALL "cert:<serial>"
14
+ HGETALL "cert:<issuer>:<serial>"
15
15
 
16
16
  The "status" field can be one of:
17
17
 
18
18
  R509::Validity::VALID
19
19
  R509::Validity::REVOKED
20
20
 
21
- The "revocation_reason" field can be one of:
22
-
23
- I don't know, we should probably find out
24
-
25
- Use this in a project like ocsp-responder by passing it into R509::Ocsp::Signer's constructor:
26
-
27
- R509::Ocsp::Signer.new(
28
- :validity_checker => R509::Validity::Redis::Checker.new(Redis.new)
29
- )
30
-
21
+ The "revocation\_reason" field can be one of:
22
+
23
+ null
24
+ 0 (unspecified)
25
+ 1 (keyCompromise)
26
+ 2 (cACompromise)
27
+ 3 (affiliationChanged)
28
+ 4 (superseded)
29
+ 5 (cessationOfOperation)
30
+ 6 (certificateHold)
31
+ 8 (removeFromCRL)
32
+ 9 (privilegeWithdrawn)
33
+ 10 (aACompromise)
@@ -153,7 +153,7 @@
153
153
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis.rb', line 5</span>
154
154
 
155
155
  <span class='kw'>def</span> <span class='id identifier rubyid_require_relative'>require_relative</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
156
- <span class='id identifier rubyid_require'>require</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='id identifier rubyid_caller'>caller</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span><span class='rparen'>)</span>
156
+ <span class='id identifier rubyid_require'>require</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='id identifier rubyid_caller'>caller</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span><span class='rparen'>)</span>
157
157
  <span class='kw'>end</span></pre>
158
158
  </td>
159
159
  </tr>
@@ -165,9 +165,9 @@
165
165
  </div>
166
166
 
167
167
  <div id="footer">
168
- Generated on Tue Apr 16 13:53:37 2013 by
168
+ Generated on Sun Jan 26 14:17:21 2014 by
169
169
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
170
- 0.8.6.1 (ruby-1.9.3).
170
+ 0.8.6.1 (ruby-2.0.0).
171
171
  </div>
172
172
 
173
173
  </body>
@@ -106,9 +106,9 @@
106
106
  </div>
107
107
 
108
108
  <div id="footer">
109
- Generated on Tue Apr 16 13:53:37 2013 by
109
+ Generated on Sun Jan 26 14:17:21 2014 by
110
110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.8.6.1 (ruby-1.9.3).
111
+ 0.8.6.1 (ruby-2.0.0).
112
112
  </div>
113
113
 
114
114
  </body>
@@ -106,9 +106,9 @@
106
106
  </div>
107
107
 
108
108
  <div id="footer">
109
- Generated on Tue Apr 16 13:53:37 2013 by
109
+ Generated on Sun Jan 26 14:17:21 2014 by
110
110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
- 0.8.6.1 (ruby-1.9.3).
111
+ 0.8.6.1 (ruby-2.0.0).
112
112
  </div>
113
113
 
114
114
  </body>
@@ -104,7 +104,7 @@
104
104
  <dt id="VERSION-constant" class="">VERSION =
105
105
 
106
106
  </dt>
107
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.4.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
107
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.4.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>
108
108
 
109
109
  </dl>
110
110
 
@@ -120,9 +120,9 @@
120
120
  </div>
121
121
 
122
122
  <div id="footer">
123
- Generated on Tue Apr 16 13:53:37 2013 by
123
+ Generated on Sun Jan 26 14:17:21 2014 by
124
124
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
125
- 0.8.6.1 (ruby-1.9.3).
125
+ 0.8.6.1 (ruby-2.0.0).
126
126
  </div>
127
127
 
128
128
  </body>
@@ -241,8 +241,8 @@
241
241
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/checker.rb', line 5</span>
242
242
 
243
243
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_redis'>redis</span><span class='rparen'>)</span>
244
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Redis must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_redis'>redis</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
245
- <span class='ivar'>@redis</span> <span class='op'>=</span> <span class='id identifier rubyid_redis'>redis</span>
244
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Redis must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_redis'>redis</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
245
+ <span class='ivar'>@redis</span> <span class='op'>=</span> <span class='id identifier rubyid_redis'>redis</span>
246
246
  <span class='kw'>end</span></pre>
247
247
  </td>
248
248
  </tr>
@@ -325,18 +325,18 @@
325
325
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/checker.rb', line 11</span>
326
326
 
327
327
  <span class='kw'>def</span> <span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_issuer'>issuer</span><span class='comma'>,</span><span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
328
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
329
-
330
- <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hgetall'>hgetall</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
331
- <span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
332
- <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Status</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
333
- <span class='symbol'>:status</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
334
- <span class='symbol'>:revocation_time</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_time</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>||</span> <span class='kw'>nil</span><span class='comma'>,</span>
335
- <span class='symbol'>:revocation_reason</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_reason</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>||</span> <span class='int'>0</span>
336
- <span class='rparen'>)</span>
337
- <span class='kw'>else</span>
338
- <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Status</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:status</span> <span class='op'>=&gt;</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>UNKNOWN</span><span class='rparen'>)</span>
339
- <span class='kw'>end</span>
328
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
329
+
330
+ <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hgetall'>hgetall</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
331
+ <span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
332
+ <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Status</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
333
+ <span class='symbol'>:status</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
334
+ <span class='symbol'>:revocation_time</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_time</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>||</span> <span class='kw'>nil</span><span class='comma'>,</span>
335
+ <span class='symbol'>:revocation_reason</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_reason</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>||</span> <span class='int'>0</span>
336
+ <span class='rparen'>)</span>
337
+ <span class='kw'>else</span>
338
+ <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Status</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:status</span> <span class='op'>=&gt;</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>UNKNOWN</span><span class='rparen'>)</span>
339
+ <span class='kw'>end</span>
340
340
  <span class='kw'>end</span></pre>
341
341
  </td>
342
342
  </tr>
@@ -388,7 +388,7 @@
388
388
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/checker.rb', line 26</span>
389
389
 
390
390
  <span class='kw'>def</span> <span class='id identifier rubyid_is_available?'>is_available?</span>
391
- <span class='lparen'>(</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_ping'>ping</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PONG</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
391
+ <span class='lparen'>(</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_ping'>ping</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PONG</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
392
392
  <span class='kw'>end</span></pre>
393
393
  </td>
394
394
  </tr>
@@ -400,9 +400,9 @@
400
400
  </div>
401
401
 
402
402
  <div id="footer">
403
- Generated on Tue Apr 16 13:53:37 2013 by
403
+ Generated on Sun Jan 26 14:17:21 2014 by
404
404
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
405
- 0.8.6.1 (ruby-1.9.3).
405
+ 0.8.6.1 (ruby-2.0.0).
406
406
  </div>
407
407
 
408
408
  </body>
@@ -285,8 +285,8 @@
285
285
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/writer.rb', line 5</span>
286
286
 
287
287
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_redis'>redis</span><span class='rparen'>)</span>
288
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Redis must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_redis'>redis</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
289
- <span class='ivar'>@redis</span> <span class='op'>=</span> <span class='id identifier rubyid_redis'>redis</span>
288
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Redis must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_redis'>redis</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
289
+ <span class='ivar'>@redis</span> <span class='op'>=</span> <span class='id identifier rubyid_redis'>redis</span>
290
290
  <span class='kw'>end</span></pre>
291
291
  </td>
292
292
  </tr>
@@ -345,7 +345,7 @@
345
345
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/writer.rb', line 39</span>
346
346
 
347
347
  <span class='kw'>def</span> <span class='id identifier rubyid_is_available?'>is_available?</span>
348
- <span class='lparen'>(</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_ping'>ping</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PONG</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
348
+ <span class='lparen'>(</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_ping'>ping</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PONG</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
349
349
  <span class='kw'>end</span></pre>
350
350
  </td>
351
351
  </tr>
@@ -403,13 +403,13 @@
403
403
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/writer.rb', line 10</span>
404
404
 
405
405
  <span class='kw'>def</span> <span class='id identifier rubyid_issue'>issue</span><span class='lparen'>(</span><span class='id identifier rubyid_issuer'>issuer</span><span class='comma'>,</span> <span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
406
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
407
- <span class='id identifier rubyid_cert'>cert</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hgetall'>hgetall</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
408
- <span class='kw'>if</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='kw'>not</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
409
- <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hmset'>hmset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
410
- <span class='kw'>else</span>
411
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>R509Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_content'> for issuer </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'> is already present</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
412
- <span class='kw'>end</span>
406
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
407
+ <span class='id identifier rubyid_cert'>cert</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hgetall'>hgetall</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
408
+ <span class='kw'>if</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='kw'>not</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
409
+ <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hmset'>hmset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
410
+ <span class='kw'>else</span>
411
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>R509Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_content'> for issuer </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'> is already present</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
412
+ <span class='kw'>end</span>
413
413
  <span class='kw'>end</span></pre>
414
414
  </td>
415
415
  </tr>
@@ -466,12 +466,12 @@
466
466
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/writer.rb', line 20</span>
467
467
 
468
468
  <span class='kw'>def</span> <span class='id identifier rubyid_revoke'>revoke</span><span class='lparen'>(</span><span class='id identifier rubyid_issuer'>issuer</span><span class='comma'>,</span> <span class='id identifier rubyid_serial'>serial</span><span class='comma'>,</span> <span class='id identifier rubyid_revocation_time'>revocation_time</span><span class='op'>=</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
469
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
470
- <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hmset'>hmset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
471
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span>
472
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_time</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_revocation_time'>revocation_time</span> <span class='op'>||</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
473
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_reason</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span> <span class='op'>||</span> <span class='int'>0</span>
474
- <span class='rparen'>)</span>
469
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
470
+ <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hmset'>hmset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
471
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span>
472
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_time</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_revocation_time'>revocation_time</span> <span class='op'>||</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
473
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>revocation_reason</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_reason'>reason</span> <span class='op'>||</span> <span class='int'>0</span>
474
+ <span class='rparen'>)</span>
475
475
  <span class='kw'>end</span></pre>
476
476
  </td>
477
477
  </tr>
@@ -529,13 +529,13 @@
529
529
  <pre class="code"><span class="info file"># File 'lib/r509/validity/redis/writer.rb', line 29</span>
530
530
 
531
531
  <span class='kw'>def</span> <span class='id identifier rubyid_unrevoke'>unrevoke</span><span class='lparen'>(</span><span class='id identifier rubyid_issuer'>issuer</span><span class='comma'>,</span> <span class='id identifier rubyid_serial'>serial</span><span class='rparen'>)</span>
532
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
533
- <span class='id identifier rubyid_cert'>cert</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hgetall'>hgetall</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
534
- <span class='kw'>if</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='kw'>not</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
535
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>R509Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_content'> for issuer </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'> is not present</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
536
- <span class='kw'>else</span>
537
- <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hmset'>hmset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
538
- <span class='kw'>end</span>
532
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial and issuer must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_serial'>serial</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>or</span> <span class='id identifier rubyid_issuer'>issuer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
533
+ <span class='id identifier rubyid_cert'>cert</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hgetall'>hgetall</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
534
+ <span class='kw'>if</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='kw'>not</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
535
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>R509Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Serial </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_content'> for issuer </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'> is not present</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
536
+ <span class='kw'>else</span>
537
+ <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_hmset'>hmset</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issuer'>issuer</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_serial'>serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
538
+ <span class='kw'>end</span>
539
539
  <span class='kw'>end</span></pre>
540
540
  </td>
541
541
  </tr>
@@ -547,9 +547,9 @@
547
547
  </div>
548
548
 
549
549
  <div id="footer">
550
- Generated on Tue Apr 16 13:53:37 2013 by
550
+ Generated on Sun Jan 26 14:17:21 2014 by
551
551
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
552
- 0.8.6.1 (ruby-1.9.3).
552
+ 0.8.6.1 (ruby-2.0.0).
553
553
  </div>
554
554
 
555
555
  </body>
@@ -166,9 +166,9 @@
166
166
  </div>
167
167
 
168
168
  <div id="footer">
169
- Generated on Tue Apr 16 13:53:37 2013 by
169
+ Generated on Sun Jan 26 14:17:21 2014 by
170
170
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
171
- 0.8.6.1 (ruby-1.9.3).
171
+ 0.8.6.1 (ruby-2.0.0).
172
172
  </div>
173
173
 
174
174
  </body>
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -61,21 +61,21 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'><p>This project is related to <a href="http://github.com/reaperhulk/r509">r509</a> and <a href="http://github.com/reaperhulk/ocsp-responder">ocsp-responder</a>, allowing certificate validity and revocation information to be read and written to a Redis backend.</p>
64
+ <div id="content"><div id='filecontents'><p>This project is related to <a href="http://github.com/reaperhulk/r509">r509</a>, <a href="http://github.com/sirsean/r509-ca-http">r509-ca-http</a>, and <a href="http://github.com/reaperhulk/r509-ocsp-responder">r509-ocsp-responder</a>, allowing certificate validity and revocation information to be read and written to a Redis backend.</p>
65
65
 
66
66
  <p>When a certificate is issued, we want this sent to Redis:</p>
67
67
 
68
- <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;serial&gt;&quot; status 0
68
+ <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;issuer&gt;:&lt;serial&gt;&quot; status 0
69
69
  </code></pre>
70
70
 
71
71
  <p>When revoked:</p>
72
72
 
73
- <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;serial&gt;&quot; status 1 revocation_time &lt;timestamp&gt; revocation_reason 0
73
+ <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;issuer&gt;:&lt;serial&gt;&quot; status 1 revocation_time &lt;timestamp&gt; revocation_reason 0
74
74
  </code></pre>
75
75
 
76
76
  <p>To get the status of a certificate:</p>
77
77
 
78
- <pre class="code ruby"><code class="ruby"><span class='const'>HGETALL</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:&lt;serial&gt;</span><span class='tstring_end'>&quot;</span></span>
78
+ <pre class="code ruby"><code class="ruby"><span class='const'>HGETALL</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:&lt;issuer&gt;:&lt;serial&gt;</span><span class='tstring_end'>&quot;</span></span>
79
79
  </code></pre>
80
80
 
81
81
  <p>The &quot;status&quot; field can be one of:</p>
@@ -86,21 +86,24 @@
86
86
 
87
87
  <p>The &quot;revocation_reason&quot; field can be one of:</p>
88
88
 
89
- <pre class="code ruby"><code class="ruby"><span class='const'>I</span> <span class='id identifier rubyid_don'>don</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>t know, we should probably find out
90
- </span></span></code></pre>
91
-
92
- <p>Use this in a project like ocsp-responder by passing it into R509::Ocsp::Signer&#39;s constructor:</p>
93
-
94
- <pre class="code ruby"><code class="ruby"><span class='const'>R509</span><span class='op'>::</span><span class='const'>Ocsp</span><span class='op'>::</span><span class='const'>Signer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
95
- <span class='symbol'>:validity_checker</span> <span class='op'>=&gt;</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Redis</span><span class='op'>::</span><span class='const'>Checker</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Redis</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
96
- <span class='rparen'>)</span>
89
+ <pre class="code ruby"><code class="ruby">null
90
+ 0 (unspecified)
91
+ 1 (keyCompromise)
92
+ 2 (cACompromise)
93
+ 3 (affiliationChanged)
94
+ 4 (superseded)
95
+ 5 (cessationOfOperation)
96
+ 6 (certificateHold)
97
+ 8 (removeFromCRL)
98
+ 9 (privilegeWithdrawn)
99
+ 10 (aACompromise)
97
100
  </code></pre>
98
101
  </div></div>
99
102
 
100
103
  <div id="footer">
101
- Generated on Tue Apr 16 13:53:37 2013 by
104
+ Generated on Sun Jan 26 14:17:21 2014 by
102
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
103
- 0.8.6.1 (ruby-1.9.3).
106
+ 0.8.6.1 (ruby-2.0.0).
104
107
  </div>
105
108
 
106
109
  </body>
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -61,21 +61,21 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'><p>This project is related to <a href="http://github.com/reaperhulk/r509">r509</a> and <a href="http://github.com/reaperhulk/ocsp-responder">ocsp-responder</a>, allowing certificate validity and revocation information to be read and written to a Redis backend.</p>
64
+ <div id="content"><div id='filecontents'><p>This project is related to <a href="http://github.com/reaperhulk/r509">r509</a>, <a href="http://github.com/sirsean/r509-ca-http">r509-ca-http</a>, and <a href="http://github.com/reaperhulk/r509-ocsp-responder">r509-ocsp-responder</a>, allowing certificate validity and revocation information to be read and written to a Redis backend.</p>
65
65
 
66
66
  <p>When a certificate is issued, we want this sent to Redis:</p>
67
67
 
68
- <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;serial&gt;&quot; status 0
68
+ <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;issuer&gt;:&lt;serial&gt;&quot; status 0
69
69
  </code></pre>
70
70
 
71
71
  <p>When revoked:</p>
72
72
 
73
- <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;serial&gt;&quot; status 1 revocation_time &lt;timestamp&gt; revocation_reason 0
73
+ <pre class="code ruby"><code class="ruby">HMSET &quot;cert:&lt;issuer&gt;:&lt;serial&gt;&quot; status 1 revocation_time &lt;timestamp&gt; revocation_reason 0
74
74
  </code></pre>
75
75
 
76
76
  <p>To get the status of a certificate:</p>
77
77
 
78
- <pre class="code ruby"><code class="ruby"><span class='const'>HGETALL</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:&lt;serial&gt;</span><span class='tstring_end'>&quot;</span></span>
78
+ <pre class="code ruby"><code class="ruby"><span class='const'>HGETALL</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cert:&lt;issuer&gt;:&lt;serial&gt;</span><span class='tstring_end'>&quot;</span></span>
79
79
  </code></pre>
80
80
 
81
81
  <p>The &quot;status&quot; field can be one of:</p>
@@ -86,21 +86,24 @@
86
86
 
87
87
  <p>The &quot;revocation_reason&quot; field can be one of:</p>
88
88
 
89
- <pre class="code ruby"><code class="ruby"><span class='const'>I</span> <span class='id identifier rubyid_don'>don</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>t know, we should probably find out
90
- </span></span></code></pre>
91
-
92
- <p>Use this in a project like ocsp-responder by passing it into R509::Ocsp::Signer&#39;s constructor:</p>
93
-
94
- <pre class="code ruby"><code class="ruby"><span class='const'>R509</span><span class='op'>::</span><span class='const'>Ocsp</span><span class='op'>::</span><span class='const'>Signer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
95
- <span class='symbol'>:validity_checker</span> <span class='op'>=&gt;</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Validity</span><span class='op'>::</span><span class='const'>Redis</span><span class='op'>::</span><span class='const'>Checker</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Redis</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
96
- <span class='rparen'>)</span>
89
+ <pre class="code ruby"><code class="ruby">null
90
+ 0 (unspecified)
91
+ 1 (keyCompromise)
92
+ 2 (cACompromise)
93
+ 3 (affiliationChanged)
94
+ 4 (superseded)
95
+ 5 (cessationOfOperation)
96
+ 6 (certificateHold)
97
+ 8 (removeFromCRL)
98
+ 9 (privilegeWithdrawn)
99
+ 10 (aACompromise)
97
100
  </code></pre>
98
101
  </div></div>
99
102
 
100
103
  <div id="footer">
101
- Generated on Tue Apr 16 13:53:37 2013 by
104
+ Generated on Sun Jan 26 14:17:21 2014 by
102
105
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
103
- 0.8.6.1 (ruby-1.9.3).
106
+ 0.8.6.1 (ruby-2.0.0).
104
107
  </div>
105
108
 
106
109
  </body>
@@ -103,9 +103,9 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Tue Apr 16 13:53:37 2013 by
106
+ Generated on Sun Jan 26 14:17:21 2014 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.6.1 (ruby-1.9.3).
108
+ 0.8.6.1 (ruby-2.0.0).
109
109
  </div>
110
110
 
111
111
  </body>
@@ -1,15 +1,15 @@
1
1
  require 'r509'
2
2
 
3
3
  unless Kernel.respond_to?(:require_relative)
4
- module Kernel
5
- def require_relative(path)
6
- require File.join(File.dirname(caller[0]), path.to_str)
7
- end
4
+ module Kernel
5
+ def require_relative(path)
6
+ require File.join(File.dirname(caller[0]), path.to_str)
8
7
  end
8
+ end
9
9
  end
10
10
 
11
11
  module R509::Validity::Redis
12
- require_relative('redis/checker.rb')
13
- require_relative('redis/writer.rb')
12
+ require_relative('redis/checker.rb')
13
+ require_relative('redis/writer.rb')
14
14
  end
15
15