r509-middleware-validity 0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # r509-middleware-validity
2
+
3
+ This project is related to [r509](http://github.com/reaperhulk/r509) and [r509-ca-http](http://github.com/sirsean/r509-ca-http), allowing us to save certificate validity status to a Redis backend via Rack Middleware, so the CA itself doesn't need to know anything about Redis. This is done so that you can run a CA without saving validity status, if you want to do that.
4
+
5
+ # Redis
6
+
7
+ Make sure you have a Redis server running on localhost. The standard configuration should work. You also need to ```gem install redis```.
8
+
9
+ Ruby will connect to it using ```Redis.new```.
10
+
11
+ # config.ru
12
+
13
+ require 'r509/middleware/validity'
14
+
15
+ use R509::Middleware::Validity
16
+ run R509::CertificateAuthority::Http::Server
17
+
18
+ Now all the issue/revoke/unrevoke events will be saved in your Redis database.
data/Rakefile ADDED
@@ -0,0 +1,36 @@
1
+ require 'rubygems'
2
+ require 'rspec/core/rake_task'
3
+ require "#{File.dirname(__FILE__)}/lib/r509/middleware/validity/version"
4
+
5
+ task :default => :spec
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ desc 'Run all rspec tests with rcov (1.8 only)'
9
+ RSpec::Core::RakeTask.new(:rcov) do |t|
10
+ t.rcov_opts = %q[--exclude "spec,gems"]
11
+ t.rcov = true
12
+ end
13
+
14
+ namespace :gem do
15
+ desc 'Build the gem'
16
+ task :build do
17
+ puts `yard`
18
+ puts `gem build r509-middleware-validity.gemspec`
19
+ end
20
+
21
+ desc 'Install gem'
22
+ task :install do
23
+ puts `gem install r509-middleware-validity-#{R509::Middleware::Validity::VERSION}.gem`
24
+ end
25
+
26
+ desc 'Uninstall gem'
27
+ task :uninstall do
28
+ puts `gem uninstall r509-middleware-validity`
29
+ end
30
+ end
31
+
32
+ desc 'Build yard documentation'
33
+ task :yard do
34
+ puts `yard`
35
+ `open doc/index.html`
36
+ end
data/doc/R509.html ADDED
@@ -0,0 +1,108 @@
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
8
+
9
+ &mdash; Documentation by YARD 0.7.4
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
+ relpath = '';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="_index.html">Index (R)</a> &raquo;
37
+
38
+
39
+ <span class="title">R509</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: R509
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/r509/Middleware/Validity.rb<span class="defines">,<br />
76
+ lib/r509/Middleware/Validity/Version.rb</span>
77
+ </dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Defined Under Namespace</h2>
83
+ <p class="children">
84
+
85
+
86
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="R509/Middleware.html" title="R509::Middleware (module)">Middleware</a></span>
87
+
88
+
89
+
90
+
91
+ </p>
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ </div>
100
+
101
+ <div id="footer">
102
+ Generated on Wed Jan 4 14:50:53 2012 by
103
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
104
+ 0.7.4 (ruby-1.9.3).
105
+ </div>
106
+
107
+ </body>
108
+ </html>
@@ -0,0 +1,108 @@
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::Middleware
8
+
9
+ &mdash; Documentation by YARD 0.7.4
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
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (M)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../R509.html" title="R509 (module)">R509</a></span></span>
38
+ &raquo;
39
+ <span class="title">Middleware</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: R509::Middleware
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/r509/Middleware/Validity.rb<span class="defines">,<br />
76
+ lib/r509/Middleware/Validity/Version.rb</span>
77
+ </dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Defined Under Namespace</h2>
83
+ <p class="children">
84
+
85
+
86
+
87
+
88
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Middleware/Validity.html" title="R509::Middleware::Validity (class)">Validity</a></span>
89
+
90
+
91
+ </p>
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ </div>
100
+
101
+ <div id="footer">
102
+ Generated on Wed Jan 4 14:50:53 2012 by
103
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
104
+ 0.7.4 (ruby-1.9.3).
105
+ </div>
106
+
107
+ </body>
108
+ </html>
@@ -0,0 +1,108 @@
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::Middleware::Validity
8
+
9
+ &mdash; Documentation by YARD 0.7.4
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
+ relpath = '../..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../../_index.html">Index (V)</a> &raquo;
37
+ <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="../Middleware.html" title="R509::Middleware (module)">Middleware</a></span></span>
38
+ &raquo;
39
+ <span class="title">Validity</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: R509::Middleware::Validity
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/r509/Middleware/Validity/Version.rb</dd>
76
+
77
+ </dl>
78
+ <div class="clear"></div>
79
+
80
+
81
+ <h2>Constant Summary</h2>
82
+
83
+ <dl class="constants">
84
+
85
+ <dt id="VERSION-constant" class="">VERSION =
86
+
87
+ </dt>
88
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
89
+
90
+ </dl>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ </div>
100
+
101
+ <div id="footer">
102
+ Generated on Wed Jan 4 14:50:53 2012 by
103
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
104
+ 0.7.4 (ruby-1.9.3).
105
+ </div>
106
+
107
+ </body>
108
+ </html>
data/doc/_index.html ADDED
@@ -0,0 +1,136 @@
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
+ Documentation by YARD 0.7.4
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ relpath = '';
17
+ if (relpath != '') relpath += '/';
18
+ </script>
19
+
20
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
23
+
24
+
25
+ </head>
26
+ <body>
27
+ <script type="text/javascript" charset="utf-8">
28
+ if (window.top.frames.main) document.body.className = 'frames';
29
+ </script>
30
+
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+
35
+ <span class="title"></span>
36
+
37
+
38
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
+ </div>
40
+
41
+ <div id="search">
42
+
43
+ <a id="class_list_link" href="#">Class List</a>
44
+
45
+ <a id="method_list_link" href="#">Method List</a>
46
+
47
+ <a id="file_list_link" href="#">File List</a>
48
+
49
+ </div>
50
+ <div class="clear"></div>
51
+ </div>
52
+
53
+ <iframe id="search_frame"></iframe>
54
+
55
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.7.4</h1>
56
+ <div id="listing">
57
+ <h1 class="alphaindex">Alphabetic Index</h1>
58
+
59
+ <h2>File Listing</h2>
60
+ <ul id="files">
61
+
62
+
63
+ <li class="r1"><a href="index.html" title="README">README</a></li>
64
+
65
+
66
+ </ul>
67
+
68
+ <div class="clear"></div>
69
+ <h2>Namespace Listing A-Z</h2>
70
+
71
+
72
+
73
+
74
+ <table>
75
+ <tr>
76
+ <td valign='top' width="33%">
77
+
78
+
79
+ <ul id="alpha_M" class="alpha">
80
+ <li class="letter">M</li>
81
+ <ul>
82
+
83
+ <li>
84
+ <span class='object_link'><a href="R509/Middleware.html" title="R509::Middleware (module)">Middleware</a></span>
85
+
86
+ <small>(R509)</small>
87
+
88
+ </li>
89
+
90
+ </ul>
91
+ </ul>
92
+
93
+
94
+ <ul id="alpha_R" class="alpha">
95
+ <li class="letter">R</li>
96
+ <ul>
97
+
98
+ <li>
99
+ <span class='object_link'><a href="R509.html" title="R509 (module)">R509</a></span>
100
+
101
+ </li>
102
+
103
+ </ul>
104
+ </ul>
105
+
106
+
107
+ <ul id="alpha_V" class="alpha">
108
+ <li class="letter">V</li>
109
+ <ul>
110
+
111
+ <li>
112
+ <span class='object_link'><a href="R509/Middleware/Validity.html" title="R509::Middleware::Validity (module)">Validity</a></span>
113
+
114
+ <small>(R509::Middleware)</small>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+ </ul>
120
+
121
+ </td>
122
+ </tr>
123
+ </table>
124
+
125
+ </div>
126
+
127
+ </div>
128
+
129
+ <div id="footer">
130
+ Generated on Wed Jan 4 14:50:53 2012 by
131
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
132
+ 0.7.4 (ruby-1.9.3).
133
+ </div>
134
+
135
+ </body>
136
+ </html>