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.
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Module: R509
8
8
 
9
- &mdash; Documentation by YARD 0.8.3
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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 Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
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
  Module: R509::Middleware
8
8
 
9
- &mdash; Documentation by YARD 0.8.3
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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 Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
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
- &mdash; Documentation by YARD 0.8.3
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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'>&quot;</span><span class='tstring_content'>0.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>
116
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.2.1</span><span class='tstring_end'>&quot;</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</pre>
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'>=&gt;</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'>&quot;</span><span class='tstring_content'>certwriter</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>path</span><span class='tstring_end'>&quot;</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'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cert'>cert</span><span class='period'>.</span><span class='id identifier rubyid_subject_component'>subject_component</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>CN</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</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'>&quot;</span><span class='tstring_content'>ca</span><span class='tstring_end'>&quot;</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_serial'>serial</span><span class='rbrace'>}</span><span class='tstring_content'>.pem</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span>
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'>&quot;</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'>&quot;</span><span class='tstring_content'>ca</span><span class='tstring_end'>&quot;</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'>&quot;</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'>&quot;</span><span class='tstring_content'>*</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'>STAR</span><span class='tstring_end'>&quot;</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'>&quot;</span><span class='tstring_content'>ASCII</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='symbol'>:invalid</span> <span class='op'>=&gt;</span> <span class='symbol'>:replace</span><span class='comma'>,</span> <span class='symbol'>:undef</span> <span class='op'>=&gt;</span> <span class='symbol'>:replace</span><span class='comma'>,</span> <span class='symbol'>:replace</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:universal_newline</span> <span class='op'>=&gt;</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'>&quot;</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'>&quot;</span></span>
@@ -315,6 +318,9 @@
315
318
  <span class='kw'>rescue</span> <span class='op'>=&gt;</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'>&quot;</span><span class='tstring_content'>Writing failed</span><span class='tstring_end'>&quot;</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 Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
341
+ 0.8.6.1 (ruby-1.9.3).
336
342
  </div>
337
343
 
338
344
  </body>
@@ -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.3
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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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.3</h1>
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 Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
136
+ 0.8.6.1 (ruby-1.9.3).
137
137
  </div>
138
138
 
139
139
  </body>
@@ -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> &lt; Object<small class='search_info'>R509::Middleware</small></li></ul></ul>
49
49
 
50
50
  </ul>
@@ -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; }
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.3
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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: &quot;/absolute/path/to/wherever/you/want/the/certs&quot;
82
82
  }
83
83
  </code></pre>
@@ -86,9 +86,9 @@
86
86
  </div></div>
87
87
 
88
88
  <div id="footer">
89
- Generated on Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
91
+ 0.8.6.1 (ruby-1.9.3).
92
92
  </div>
93
93
 
94
94
  </body>
@@ -46,7 +46,7 @@
46
46
  <ul id="full_list" class="file">
47
47
 
48
48
 
49
- <li class="r1"><a href="index.html" title="README">README</a></li>
49
+ <li class="r1"><span class="object_link"><a href="index.html" title="README">README</a></a></li>
50
50
 
51
51
 
52
52
  </ul>
@@ -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.3</title>
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() {
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.3
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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: &quot;/absolute/path/to/wherever/you/want/the/certs&quot;
82
82
  }
83
83
  </code></pre>
@@ -86,9 +86,9 @@
86
86
  </div></div>
87
87
 
88
88
  <div id="footer">
89
- Generated on Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
91
+ 0.8.6.1 (ruby-1.9.3).
92
92
  </div>
93
93
 
94
94
  </body>
@@ -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) {
@@ -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
- &mdash; Documentation by YARD 0.8.3
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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 Thu Nov 8 14:25:36 2012 by
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.3 (ruby-1.9.3).
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.subject_component("CN")}_#{params["ca"]}_#{cert.serial}.pem").
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
 
@@ -1,7 +1,7 @@
1
1
  module R509
2
2
  module Middleware
3
3
  class Certwriter
4
- VERSION="0.2"
4
+ VERSION="0.2.1"
5
5
  end
6
6
  end
7
7
  end
@@ -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.sh_testy_211653423715.pem"
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).twice
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).twice
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.com_testy_211653407360.pem"
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.sh_testy_57953710177023404420300898930034339170.pem"
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.com_testy_1347710705410875939179018156461170725106572413147.pem"
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: '0.2'
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: 2012-11-08 00:00:00.000000000 Z
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: &2157093060 !ruby/object:Gem::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: *2157093060
24
+ version_requirements: *2154502280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rack
27
- requirement: &2157074200 !ruby/object:Gem::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: *2157074200
35
+ version_requirements: *2154501860
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dependo
38
- requirement: &2157073320 !ruby/object:Gem::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: *2157073320
46
+ version_requirements: *2154501440
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: r509
49
- requirement: &2157072640 !ruby/object:Gem::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: *2157072640
57
+ version_requirements: *2154500940
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &2157071100 !ruby/object:Gem::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: *2157071100
68
+ version_requirements: *2154500520
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &2157069780 !ruby/object:Gem::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: *2157069780
79
+ version_requirements: *2154500060
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rack-test
82
- requirement: &2157069000 !ruby/object:Gem::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: *2157069000
90
+ version_requirements: *2154499640
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: simplecov
93
- requirement: &2157067040 !ruby/object:Gem::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: *2157067040
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: 674164029867741014
156
+ hash: 4277739310657559338
157
157
  requirements: []
158
158
  rubyforge_project:
159
159
  rubygems_version: 1.8.10