r509-middleware-certwriter 0.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/R509.html +5 -5
- data/doc/R509/Middleware.html +5 -5
- data/doc/R509/Middleware/Certwriter.html +15 -9
- data/doc/_index.html +6 -6
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +10 -0
- data/doc/file.README.html +7 -7
- data/doc/file_list.html +1 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +7 -7
- data/doc/js/full_list.js +6 -1
- data/doc/method_list.html +2 -6
- data/doc/top-level-namespace.html +5 -5
- data/lib/r509/middleware/certwriter.rb +5 -2
- data/lib/r509/middleware/certwriter/version.rb +1 -1
- data/spec/middleware_spec.rb +7 -7
- metadata +19 -19
data/doc/R509.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: R509
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.8.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
</div>
|
|
109
109
|
|
|
110
110
|
<div id="footer">
|
|
111
|
-
Generated on
|
|
111
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
112
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
113
|
-
0.8.
|
|
113
|
+
0.8.6.1 (ruby-1.9.3).
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
</body>
|
data/doc/R509/Middleware.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: R509::Middleware
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.8.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
</div>
|
|
109
109
|
|
|
110
110
|
<div id="footer">
|
|
111
|
-
Generated on
|
|
111
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
112
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
113
|
-
0.8.
|
|
113
|
+
0.8.6.1 (ruby-1.9.3).
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
</body>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: R509::Middleware::Certwriter
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.8.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
<dt id="VERSION-constant" class="">VERSION =
|
|
114
114
|
|
|
115
115
|
</dt>
|
|
116
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.2</span><span class='tstring_end'>"</span></span></pre></dd>
|
|
116
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.2.1</span><span class='tstring_end'>"</span></span></pre></dd>
|
|
117
117
|
|
|
118
118
|
</dl>
|
|
119
119
|
|
|
@@ -288,7 +288,10 @@
|
|
|
288
288
|
42
|
|
289
289
|
43
|
|
290
290
|
44
|
|
291
|
-
45
|
|
291
|
+
45
|
|
292
|
+
46
|
|
293
|
+
47
|
|
294
|
+
48</pre>
|
|
292
295
|
</td>
|
|
293
296
|
<td>
|
|
294
297
|
<pre class="code"><span class="info file"># File 'lib/r509/middleware/certwriter.rb', line 19</span>
|
|
@@ -306,8 +309,8 @@
|
|
|
306
309
|
<span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_params'>parse_params</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
|
307
310
|
<span class='id identifier rubyid_cert'>cert</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Cert</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:cert</span> <span class='op'>=></span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
|
|
308
311
|
<span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>=</span> <span class='ivar'>@config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>certwriter</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>path</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
|
309
|
-
<span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span>
|
|
310
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier
|
|
312
|
+
<span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span><span class='comma'>,</span>
|
|
313
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_subject'>subject</span><span class='period'>.</span><span class='const'>CN</span><span class='rbrace'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ca</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_hexserial'>hexserial</span><span class='rbrace'>}</span><span class='tstring_content'>.pem</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span>
|
|
311
314
|
<span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STAR</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span>
|
|
312
315
|
<span class='id identifier rubyid_encode'>encode</span><span class='lparen'>(</span><span class='const'>Encoding</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ASCII</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='symbol'>:invalid</span> <span class='op'>=></span> <span class='symbol'>:replace</span><span class='comma'>,</span> <span class='symbol'>:undef</span> <span class='op'>=></span> <span class='symbol'>:replace</span><span class='comma'>,</span> <span class='symbol'>:replace</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:universal_newline</span> <span class='op'>=></span> <span class='kw'>true</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
313
316
|
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Writing: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_filename'>filename</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
@@ -315,6 +318,9 @@
|
|
|
315
318
|
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
316
319
|
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Writing failed</span><span class='tstring_end'>"</span></span>
|
|
317
320
|
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
|
|
321
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:to_pem</span><span class='rparen'>)</span>
|
|
322
|
+
<span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_to_pem'>to_pem</span>
|
|
323
|
+
<span class='kw'>end</span>
|
|
318
324
|
<span class='kw'>end</span>
|
|
319
325
|
<span class='kw'>end</span>
|
|
320
326
|
|
|
@@ -330,9 +336,9 @@
|
|
|
330
336
|
</div>
|
|
331
337
|
|
|
332
338
|
<div id="footer">
|
|
333
|
-
Generated on
|
|
339
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
334
340
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
335
|
-
0.8.
|
|
341
|
+
0.8.6.1 (ruby-1.9.3).
|
|
336
342
|
</div>
|
|
337
343
|
|
|
338
344
|
</body>
|
data/doc/_index.html
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
6
|
<title>
|
|
7
|
-
Documentation by YARD 0.8.
|
|
7
|
+
Documentation by YARD 0.8.6.1
|
|
8
8
|
|
|
9
9
|
</title>
|
|
10
10
|
|
|
11
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
11
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
15
|
<script type="text/javascript" charset="utf-8">
|
|
16
16
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<iframe id="search_frame"></iframe>
|
|
58
58
|
|
|
59
|
-
<div id="content"><h1 class="noborder title">Documentation by YARD 0.8.
|
|
59
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.8.6.1</h1>
|
|
60
60
|
<div id="listing">
|
|
61
61
|
<h1 class="alphaindex">Alphabetic Index</h1>
|
|
62
62
|
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
</div>
|
|
132
132
|
|
|
133
133
|
<div id="footer">
|
|
134
|
-
Generated on
|
|
134
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
135
135
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
136
|
-
0.8.
|
|
136
|
+
0.8.6.1 (ruby-1.9.3).
|
|
137
137
|
</div>
|
|
138
138
|
|
|
139
139
|
</body>
|
data/doc/class_list.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<div id="search">Search: <input type="text" /></div>
|
|
45
45
|
|
|
46
46
|
<ul id="full_list" class="class">
|
|
47
|
-
<li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
|
|
47
|
+
<li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
|
|
48
48
|
<li><a class='toggle'></a> <span class='object_link'><a href="R509.html" title="R509 (module)">R509</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="R509/Middleware.html" title="R509::Middleware (module)">Middleware</a></span><small class='search_info'>R509</small></li><ul><li><span class='object_link'><a href="R509/Middleware/Certwriter.html" title="R509::Middleware::Certwriter (class)">Certwriter</a></span> < Object<small class='search_info'>R509::Middleware</small></li></ul></ul>
|
|
49
49
|
|
|
50
50
|
</ul>
|
data/doc/css/style.css
CHANGED
|
@@ -27,6 +27,16 @@ h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right;
|
|
|
27
27
|
.rdoc-term { padding-right: 25px; font-weight: bold; }
|
|
28
28
|
.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
|
|
29
29
|
|
|
30
|
+
/* style for <table> */
|
|
31
|
+
#filecontents table, .docstring table { border-collapse: collapse; }
|
|
32
|
+
#filecontents table th, #filecontents table td,
|
|
33
|
+
.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
|
|
34
|
+
#filecontents table tr:nth-child(odd),
|
|
35
|
+
.docstring table tr:nth-child(odd) { background: #eee; }
|
|
36
|
+
#filecontents table tr:nth-child(even),
|
|
37
|
+
.docstring table tr:nth-child(even) { background: #fff; }
|
|
38
|
+
#filecontents table th, .docstring table th { background: #fff; }
|
|
39
|
+
|
|
30
40
|
/* style for <ul> */
|
|
31
41
|
#filecontents li > p, .docstring li > p { margin: 0px; }
|
|
32
42
|
#filecontents ul, .docstring ul { padding-left: 20px; }
|
data/doc/file.README.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.8.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
<h1>config.ru</h1>
|
|
69
69
|
|
|
70
|
-
<pre class="code ruby"><code><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r509/middleware/certwriter</span><span class='tstring_end'>'</span></span>
|
|
70
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r509/middleware/certwriter</span><span class='tstring_end'>'</span></span>
|
|
71
71
|
|
|
72
72
|
<span class='id identifier rubyid_use'>use</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Certwriter</span>
|
|
73
73
|
<span class='id identifier rubyid_run'>run</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>CertificateAuthority</span><span class='op'>::</span><span class='const'>Http</span><span class='op'>::</span><span class='const'>Server</span>
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
|
|
78
78
|
<p>You need to tell your CA where to save the issued certificates. Add this to the bottom of your <code>config.yaml</code> from <strong>r509-ca-http</strong>:</p>
|
|
79
79
|
|
|
80
|
-
<pre class="code ruby"><code>certwriter: {
|
|
80
|
+
<pre class="code ruby"><code class="ruby">certwriter: {
|
|
81
81
|
path: "/absolute/path/to/wherever/you/want/the/certs"
|
|
82
82
|
}
|
|
83
83
|
</code></pre>
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
</div></div>
|
|
87
87
|
|
|
88
88
|
<div id="footer">
|
|
89
|
-
Generated on
|
|
89
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
90
90
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
91
|
-
0.8.
|
|
91
|
+
0.8.6.1 (ruby-1.9.3).
|
|
92
92
|
</div>
|
|
93
93
|
|
|
94
94
|
</body>
|
data/doc/file_list.html
CHANGED
data/doc/frames.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
7
|
-
<title>Documentation by YARD 0.8.
|
|
7
|
+
<title>Documentation by YARD 0.8.6.1</title>
|
|
8
8
|
</head>
|
|
9
9
|
<script type="text/javascript" charset="utf-8">
|
|
10
10
|
window.onload = function() {
|
data/doc/index.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
File: README
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.8.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
<h1>config.ru</h1>
|
|
69
69
|
|
|
70
|
-
<pre class="code ruby"><code><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r509/middleware/certwriter</span><span class='tstring_end'>'</span></span>
|
|
70
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r509/middleware/certwriter</span><span class='tstring_end'>'</span></span>
|
|
71
71
|
|
|
72
72
|
<span class='id identifier rubyid_use'>use</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Middleware</span><span class='op'>::</span><span class='const'>Certwriter</span>
|
|
73
73
|
<span class='id identifier rubyid_run'>run</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>CertificateAuthority</span><span class='op'>::</span><span class='const'>Http</span><span class='op'>::</span><span class='const'>Server</span>
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
|
|
78
78
|
<p>You need to tell your CA where to save the issued certificates. Add this to the bottom of your <code>config.yaml</code> from <strong>r509-ca-http</strong>:</p>
|
|
79
79
|
|
|
80
|
-
<pre class="code ruby"><code>certwriter: {
|
|
80
|
+
<pre class="code ruby"><code class="ruby">certwriter: {
|
|
81
81
|
path: "/absolute/path/to/wherever/you/want/the/certs"
|
|
82
82
|
}
|
|
83
83
|
</code></pre>
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
</div></div>
|
|
87
87
|
|
|
88
88
|
<div id="footer">
|
|
89
|
-
Generated on
|
|
89
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
90
90
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
91
|
-
0.8.
|
|
91
|
+
0.8.6.1 (ruby-1.9.3).
|
|
92
92
|
</div>
|
|
93
93
|
|
|
94
94
|
</body>
|
data/doc/js/full_list.js
CHANGED
|
@@ -17,6 +17,7 @@ function fullListSearch() {
|
|
|
17
17
|
searchCache = [];
|
|
18
18
|
$('#full_list li').each(function() {
|
|
19
19
|
var link = $(this).find('.object_link a');
|
|
20
|
+
if (link.length === 0) return;
|
|
20
21
|
var fullName = link.attr('title').split(' ')[0];
|
|
21
22
|
searchCache.push({name:link.text(), fullName:fullName, node:$(this), link:link});
|
|
22
23
|
});
|
|
@@ -41,7 +42,7 @@ function fullListSearch() {
|
|
|
41
42
|
$('#full_list li').removeClass('found').each(function() {
|
|
42
43
|
|
|
43
44
|
var link = $(this).find('.object_link a');
|
|
44
|
-
link.text(link.text());
|
|
45
|
+
if (link.length > 0) link.text(link.text());
|
|
45
46
|
});
|
|
46
47
|
if (clicked) {
|
|
47
48
|
clicked.parents('ul').each(function() {
|
|
@@ -110,6 +111,10 @@ clicked = null;
|
|
|
110
111
|
function linkList() {
|
|
111
112
|
$('#full_list li, #full_list li a:last').click(function(evt) {
|
|
112
113
|
if ($(this).hasClass('toggle')) return true;
|
|
114
|
+
if ($(this).find('.object_link a').length === 0) {
|
|
115
|
+
$(this).children('a.toggle').click();
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
113
118
|
if (this.tagName.toLowerCase() == "li") {
|
|
114
119
|
var toggle = $(this).children('a.toggle');
|
|
115
120
|
if (toggle.size() > 0 && evt.pageX < toggle.offset().left) {
|
data/doc/method_list.html
CHANGED
|
@@ -48,17 +48,13 @@
|
|
|
48
48
|
|
|
49
49
|
<li class="r1 ">
|
|
50
50
|
<span class='object_link'><a href="R509/Middleware/Certwriter.html#call-instance_method" title="R509::Middleware::Certwriter#call (method)">#call</a></span>
|
|
51
|
-
|
|
52
|
-
<small>R509::Middleware::Certwriter</small>
|
|
53
|
-
|
|
51
|
+
<small>R509::Middleware::Certwriter</small>
|
|
54
52
|
</li>
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
<li class="r2 ">
|
|
58
56
|
<span class='object_link'><a href="R509/Middleware/Certwriter.html#initialize-instance_method" title="R509::Middleware::Certwriter#initialize (method)">#initialize</a></span>
|
|
59
|
-
|
|
60
|
-
<small>R509::Middleware::Certwriter</small>
|
|
61
|
-
|
|
57
|
+
<small>R509::Middleware::Certwriter</small>
|
|
62
58
|
</li>
|
|
63
59
|
|
|
64
60
|
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Top Level Namespace
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.8.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<div id="footer">
|
|
106
|
-
Generated on
|
|
106
|
+
Generated on Tue Apr 16 14:00:31 2013 by
|
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
108
|
-
0.8.
|
|
108
|
+
0.8.6.1 (ruby-1.9.3).
|
|
109
109
|
</div>
|
|
110
110
|
|
|
111
111
|
</body>
|
|
@@ -29,8 +29,8 @@ module R509
|
|
|
29
29
|
params = parse_params(env)
|
|
30
30
|
cert = R509::Cert.new(:cert => body)
|
|
31
31
|
file_path = @config["certwriter"]["path"]
|
|
32
|
-
filename = File.join(file_path,
|
|
33
|
-
"#{cert.
|
|
32
|
+
filename = File.join(file_path,
|
|
33
|
+
"#{cert.subject.CN}_#{params["ca"]}_#{cert.hexserial}.pem").
|
|
34
34
|
gsub("*", "STAR").
|
|
35
35
|
encode(Encoding.find("ASCII"), {:invalid => :replace, :undef => :replace, :replace => "", :universal_newline => true})
|
|
36
36
|
log.info "Writing: #{filename}"
|
|
@@ -38,6 +38,9 @@ module R509
|
|
|
38
38
|
rescue => e
|
|
39
39
|
log.error "Writing failed"
|
|
40
40
|
log.error e.inspect
|
|
41
|
+
if cert.respond_to?(:to_pem)
|
|
42
|
+
log.error cert.to_pem
|
|
43
|
+
end
|
|
41
44
|
end
|
|
42
45
|
end
|
|
43
46
|
|
data/spec/middleware_spec.rb
CHANGED
|
@@ -68,7 +68,7 @@ describe R509::Middleware::Certwriter do
|
|
|
68
68
|
after :all do
|
|
69
69
|
Dir.delete(@temp_write_directory)
|
|
70
70
|
end
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
def app
|
|
73
73
|
test_server = TestServer
|
|
74
74
|
test_server.send(:set, :config_pool, @config_pool)
|
|
@@ -85,7 +85,7 @@ describe R509::Middleware::Certwriter do
|
|
|
85
85
|
|
|
86
86
|
context "issuing" do
|
|
87
87
|
it "intercepts issuance" do
|
|
88
|
-
filename = "langui.
|
|
88
|
+
filename = "langui.sh_testy_314786F263.pem"
|
|
89
89
|
@config.should_receive(:[]).with("certwriter").and_return({"path"=>@temp_write_directory})
|
|
90
90
|
@logger.should_receive(:info).with("Writing: #{File.join(@temp_write_directory, filename)}")
|
|
91
91
|
|
|
@@ -98,7 +98,7 @@ describe R509::Middleware::Certwriter do
|
|
|
98
98
|
it "no certwriter" do
|
|
99
99
|
filename = "langui.sh_testy_211653423715.pem"
|
|
100
100
|
@config.should_receive(:[]).with("certwriter").and_return(nil)
|
|
101
|
-
@logger.should_receive(:error).
|
|
101
|
+
@logger.should_receive(:error).exactly(3).times
|
|
102
102
|
|
|
103
103
|
post "/1/certificate/issue", :successful => true, :ca => "testy"
|
|
104
104
|
last_response.status.should == 200
|
|
@@ -109,7 +109,7 @@ describe R509::Middleware::Certwriter do
|
|
|
109
109
|
it "no certwriter path" do
|
|
110
110
|
filename = "langui.sh_testy_211653423715.pem"
|
|
111
111
|
@config.should_receive(:[]).with("certwriter").and_return({})
|
|
112
|
-
@logger.should_receive(:error).
|
|
112
|
+
@logger.should_receive(:error).exactly(3).times
|
|
113
113
|
|
|
114
114
|
post "/1/certificate/issue", :successful => true, :ca => "testy"
|
|
115
115
|
last_response.status.should == 200
|
|
@@ -128,7 +128,7 @@ describe R509::Middleware::Certwriter do
|
|
|
128
128
|
last_response.body.should == "invalid cert body"
|
|
129
129
|
end
|
|
130
130
|
it "wildcard" do
|
|
131
|
-
filename = "STAR.xramp.
|
|
131
|
+
filename = "STAR.xramp.com_testy_314786B280.pem"
|
|
132
132
|
@config.should_receive(:[]).with("certwriter").and_return({"path"=>@temp_write_directory})
|
|
133
133
|
@logger.should_receive(:info).with("Writing: #{File.join(@temp_write_directory, filename)}")
|
|
134
134
|
|
|
@@ -139,7 +139,7 @@ describe R509::Middleware::Certwriter do
|
|
|
139
139
|
File.read(File.join(@temp_write_directory, filename)).should == TestFixtures::WILDCARD.chomp
|
|
140
140
|
end
|
|
141
141
|
it "san" do
|
|
142
|
-
filename = "langui.
|
|
142
|
+
filename = "langui.sh_testy_2B997A8456AEDA8545CA3AEAE18DED62.pem"
|
|
143
143
|
@config.should_receive(:[]).with("certwriter").and_return({"path"=>@temp_write_directory})
|
|
144
144
|
@logger.should_receive(:info).with("Writing: #{File.join(@temp_write_directory, filename)}")
|
|
145
145
|
|
|
@@ -150,7 +150,7 @@ describe R509::Middleware::Certwriter do
|
|
|
150
150
|
File.read(File.join(@temp_write_directory, filename)).should == TestFixtures::SAN.chomp
|
|
151
151
|
end
|
|
152
152
|
it "non-ascii characters" do
|
|
153
|
-
filename = "tf.
|
|
153
|
+
filename = "tf.com_testy_EC117029E20D11E66289C635C8B6867ED61148DB.pem"
|
|
154
154
|
@config.should_receive(:[]).with("certwriter").and_return({"path"=>@temp_write_directory})
|
|
155
155
|
@logger.should_receive(:info).with("Writing: #{File.join(@temp_write_directory, filename)}")
|
|
156
156
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: r509-middleware-certwriter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2013-04-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sinatra
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &2154502280 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
@@ -21,10 +21,10 @@ dependencies:
|
|
|
21
21
|
version: '0'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *2154502280
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: rack
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &2154501860 !ruby/object:Gem::Requirement
|
|
28
28
|
none: false
|
|
29
29
|
requirements:
|
|
30
30
|
- - ! '>='
|
|
@@ -32,10 +32,10 @@ dependencies:
|
|
|
32
32
|
version: '0'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *2154501860
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: dependo
|
|
38
|
-
requirement: &
|
|
38
|
+
requirement: &2154501440 !ruby/object:Gem::Requirement
|
|
39
39
|
none: false
|
|
40
40
|
requirements:
|
|
41
41
|
- - ! '>='
|
|
@@ -43,10 +43,10 @@ dependencies:
|
|
|
43
43
|
version: '0'
|
|
44
44
|
type: :runtime
|
|
45
45
|
prerelease: false
|
|
46
|
-
version_requirements: *
|
|
46
|
+
version_requirements: *2154501440
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: r509
|
|
49
|
-
requirement: &
|
|
49
|
+
requirement: &2154500940 !ruby/object:Gem::Requirement
|
|
50
50
|
none: false
|
|
51
51
|
requirements:
|
|
52
52
|
- - ! '>='
|
|
@@ -54,10 +54,10 @@ dependencies:
|
|
|
54
54
|
version: '0.8'
|
|
55
55
|
type: :runtime
|
|
56
56
|
prerelease: false
|
|
57
|
-
version_requirements: *
|
|
57
|
+
version_requirements: *2154500940
|
|
58
58
|
- !ruby/object:Gem::Dependency
|
|
59
59
|
name: rspec
|
|
60
|
-
requirement: &
|
|
60
|
+
requirement: &2154500520 !ruby/object:Gem::Requirement
|
|
61
61
|
none: false
|
|
62
62
|
requirements:
|
|
63
63
|
- - ! '>='
|
|
@@ -65,10 +65,10 @@ dependencies:
|
|
|
65
65
|
version: '0'
|
|
66
66
|
type: :development
|
|
67
67
|
prerelease: false
|
|
68
|
-
version_requirements: *
|
|
68
|
+
version_requirements: *2154500520
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rake
|
|
71
|
-
requirement: &
|
|
71
|
+
requirement: &2154500060 !ruby/object:Gem::Requirement
|
|
72
72
|
none: false
|
|
73
73
|
requirements:
|
|
74
74
|
- - ! '>='
|
|
@@ -76,10 +76,10 @@ dependencies:
|
|
|
76
76
|
version: '0'
|
|
77
77
|
type: :development
|
|
78
78
|
prerelease: false
|
|
79
|
-
version_requirements: *
|
|
79
|
+
version_requirements: *2154500060
|
|
80
80
|
- !ruby/object:Gem::Dependency
|
|
81
81
|
name: rack-test
|
|
82
|
-
requirement: &
|
|
82
|
+
requirement: &2154499640 !ruby/object:Gem::Requirement
|
|
83
83
|
none: false
|
|
84
84
|
requirements:
|
|
85
85
|
- - ! '>='
|
|
@@ -87,10 +87,10 @@ dependencies:
|
|
|
87
87
|
version: '0'
|
|
88
88
|
type: :development
|
|
89
89
|
prerelease: false
|
|
90
|
-
version_requirements: *
|
|
90
|
+
version_requirements: *2154499640
|
|
91
91
|
- !ruby/object:Gem::Dependency
|
|
92
92
|
name: simplecov
|
|
93
|
-
requirement: &
|
|
93
|
+
requirement: &2154499020 !ruby/object:Gem::Requirement
|
|
94
94
|
none: false
|
|
95
95
|
requirements:
|
|
96
96
|
- - ! '>='
|
|
@@ -98,7 +98,7 @@ dependencies:
|
|
|
98
98
|
version: '0'
|
|
99
99
|
type: :development
|
|
100
100
|
prerelease: false
|
|
101
|
-
version_requirements: *
|
|
101
|
+
version_requirements: *2154499020
|
|
102
102
|
description: Rack middleware that writes issued certificates to disk
|
|
103
103
|
email: sirsean@gmail.com
|
|
104
104
|
executables: []
|
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
153
|
version: '0'
|
|
154
154
|
segments:
|
|
155
155
|
- 0
|
|
156
|
-
hash:
|
|
156
|
+
hash: 4277739310657559338
|
|
157
157
|
requirements: []
|
|
158
158
|
rubyforge_project:
|
|
159
159
|
rubygems_version: 1.8.10
|