r509-ca-http 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +18 -18
- data/doc/R509/CertificateAuthority/Http/Factory/CsrFactory.html +11 -11
- data/doc/R509/CertificateAuthority/Http/Factory/SpkiFactory.html +11 -11
- data/doc/R509/CertificateAuthority/Http/Factory.html +9 -9
- data/doc/R509/CertificateAuthority/Http/Server.html +9 -9
- data/doc/R509/CertificateAuthority/Http/SubjectParser.html +22 -22
- data/doc/R509/CertificateAuthority/Http/ValidityPeriodConverter.html +19 -19
- data/doc/R509/CertificateAuthority/Http.html +11 -11
- data/doc/R509/CertificateAuthority.html +6 -6
- data/doc/R509.html +5 -5
- data/doc/_index.html +21 -21
- data/doc/class_list.html +2 -2
- 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 +10 -20
- data/doc/top-level-namespace.html +5 -5
- data/lib/r509/certificateauthority/http/factory.rb +12 -12
- data/lib/r509/certificateauthority/http/server.rb +219 -223
- data/lib/r509/certificateauthority/http/subjectparser.rb +27 -27
- data/lib/r509/certificateauthority/http/validityperiodconverter.rb +14 -14
- data/lib/r509/certificateauthority/http/version.rb +4 -4
- data/lib/r509/certificateauthority/http/views/test_issue.erb +73 -73
- data/lib/r509/certificateauthority/http/views/test_revoke.erb +19 -19
- data/lib/r509/certificateauthority/http/views/test_unrevoke.erb +14 -14
- data/spec/fixtures/test_config.yaml +14 -15
- data/spec/http_spec.rb +235 -227
- data/spec/spec_helper.rb +1 -1
- data/spec/subject_parser_spec.rb +2 -2
- data/spec/validity_period_converter_spec.rb +2 -2
- metadata +20 -20
data/Rakefile
CHANGED
@@ -4,35 +4,35 @@ require "#{File.dirname(__FILE__)}/lib/r509/certificateauthority/http/version"
|
|
4
4
|
|
5
5
|
task :default => :spec
|
6
6
|
RSpec::Core::RakeTask.new(:spec) do
|
7
|
-
|
7
|
+
ENV['RACK_ENV'] = 'test'
|
8
8
|
end
|
9
9
|
|
10
10
|
desc 'Run all rspec tests with rcov (1.8 only)'
|
11
11
|
RSpec::Core::RakeTask.new(:rcov) do |t|
|
12
|
-
|
13
|
-
|
12
|
+
t.rcov_opts = %q[--exclude "spec,gems"]
|
13
|
+
t.rcov = true
|
14
14
|
end
|
15
15
|
|
16
16
|
namespace :gem do
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
desc 'Build the gem'
|
18
|
+
task :build do
|
19
|
+
puts `yard`
|
20
|
+
puts `gem build r509-ca-http.gemspec`
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
desc 'Install gem'
|
24
|
+
task :install do
|
25
|
+
puts `gem install r509-ca-http-#{R509::CertificateAuthority::HTTP::VERSION}.gem`
|
26
|
+
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
desc 'Uninstall gem'
|
29
|
+
task :uninstall do
|
30
|
+
puts `gem uninstall r509-ca-http`
|
31
|
+
end
|
32
32
|
end
|
33
33
|
|
34
34
|
desc 'Build yard documentation'
|
35
35
|
task :yard do
|
36
|
-
|
37
|
-
|
36
|
+
puts `yard`
|
37
|
+
`open doc/index.html`
|
38
38
|
end
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: R509::CertificateAuthority::
|
7
|
+
Class: R509::CertificateAuthority::HTTP::Factory::CSRFactory
|
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;
|
@@ -32,9 +32,9 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../../_index.html">Index (C)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../../HTTP.html" title="R509::CertificateAuthority::HTTP (module)">HTTP</a></span></span> » <span class='title'><span class='object_link'><a href="../Factory.html" title="R509::CertificateAuthority::HTTP::Factory (module)">Factory</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">CSRFactory</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Class: R509::CertificateAuthority::HTTP::Factory::CSRFactory
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next">R509::CertificateAuthority::
|
81
|
+
<li class="next">R509::CertificateAuthority::HTTP::Factory::CSRFactory</li>
|
82
82
|
|
83
83
|
</ul>
|
84
84
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -168,7 +168,7 @@
|
|
168
168
|
<pre class="code"><span class="info file"># File 'lib/r509/certificateauthority/http/factory.rb', line 4</span>
|
169
169
|
|
170
170
|
<span class='kw'>def</span> <span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
171
|
-
|
171
|
+
<span class='const'>R509</span><span class='op'>::</span><span class='const'>CSR</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
172
172
|
<span class='kw'>end</span></pre>
|
173
173
|
</td>
|
174
174
|
</tr>
|
@@ -180,9 +180,9 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on
|
183
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
|
-
0.8.
|
185
|
+
0.8.6.1 (ruby-1.9.3).
|
186
186
|
</div>
|
187
187
|
|
188
188
|
</body>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: R509::CertificateAuthority::
|
7
|
+
Class: R509::CertificateAuthority::HTTP::Factory::SPKIFactory
|
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;
|
@@ -32,9 +32,9 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../../_index.html">Index (S)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../../HTTP.html" title="R509::CertificateAuthority::HTTP (module)">HTTP</a></span></span> » <span class='title'><span class='object_link'><a href="../Factory.html" title="R509::CertificateAuthority::HTTP::Factory (module)">Factory</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">SPKIFactory</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Class: R509::CertificateAuthority::HTTP::Factory::SPKIFactory
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next">R509::CertificateAuthority::
|
81
|
+
<li class="next">R509::CertificateAuthority::HTTP::Factory::SPKIFactory</li>
|
82
82
|
|
83
83
|
</ul>
|
84
84
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -168,7 +168,7 @@
|
|
168
168
|
<pre class="code"><span class="info file"># File 'lib/r509/certificateauthority/http/factory.rb', line 10</span>
|
169
169
|
|
170
170
|
<span class='kw'>def</span> <span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
171
|
-
|
171
|
+
<span class='const'>R509</span><span class='op'>::</span><span class='const'>SPKI</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
172
172
|
<span class='kw'>end</span></pre>
|
173
173
|
</td>
|
174
174
|
</tr>
|
@@ -180,9 +180,9 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on
|
183
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
|
-
0.8.
|
185
|
+
0.8.6.1 (ruby-1.9.3).
|
186
186
|
</div>
|
187
187
|
|
188
188
|
</body>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: R509::CertificateAuthority::
|
7
|
+
Module: R509::CertificateAuthority::HTTP::Factory
|
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;
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../_index.html">Index (F)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../HTTP.html" title="R509::CertificateAuthority::HTTP (module)">HTTP</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">Factory</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Module: R509::CertificateAuthority::HTTP::Factory
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
|
92
92
|
|
93
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Factory/
|
93
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Factory/CSRFactory.html" title="R509::CertificateAuthority::HTTP::Factory::CSRFactory (class)">CSRFactory</a></span>, <span class='object_link'><a href="Factory/SPKIFactory.html" title="R509::CertificateAuthority::HTTP::Factory::SPKIFactory (class)">SPKIFactory</a></span>
|
94
94
|
|
95
95
|
|
96
96
|
</p>
|
@@ -106,9 +106,9 @@
|
|
106
106
|
</div>
|
107
107
|
|
108
108
|
<div id="footer">
|
109
|
-
Generated on
|
109
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
|
-
0.8.
|
111
|
+
0.8.6.1 (ruby-1.9.3).
|
112
112
|
</div>
|
113
113
|
|
114
114
|
</body>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: R509::CertificateAuthority::
|
7
|
+
Class: R509::CertificateAuthority::HTTP::Server
|
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;
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../_index.html">Index (S)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../HTTP.html" title="R509::CertificateAuthority::HTTP (module)">HTTP</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">Server</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Class: R509::CertificateAuthority::HTTP::Server
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -80,7 +80,7 @@
|
|
80
80
|
|
81
81
|
<li class="next">Sinatra::Base</li>
|
82
82
|
|
83
|
-
<li class="next">R509::CertificateAuthority::
|
83
|
+
<li class="next">R509::CertificateAuthority::HTTP::Server</li>
|
84
84
|
|
85
85
|
</ul>
|
86
86
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -124,9 +124,9 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on
|
127
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
|
-
0.8.
|
129
|
+
0.8.6.1 (ruby-1.9.3).
|
130
130
|
</div>
|
131
131
|
|
132
132
|
</body>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: R509::CertificateAuthority::
|
7
|
+
Class: R509::CertificateAuthority::HTTP::SubjectParser
|
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;
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../_index.html">Index (S)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../HTTP.html" title="R509::CertificateAuthority::HTTP (module)">HTTP</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">SubjectParser</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Class: R509::CertificateAuthority::HTTP::SubjectParser
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next">R509::CertificateAuthority::
|
81
|
+
<li class="next">R509::CertificateAuthority::HTTP::SubjectParser</li>
|
82
82
|
|
83
83
|
</ul>
|
84
84
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -202,19 +202,19 @@
|
|
202
202
|
<pre class="code"><span class="info file"># File 'lib/r509/certificateauthority/http/subjectparser.rb', line 5</span>
|
203
203
|
|
204
204
|
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_raw'>raw</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>subject</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
205
|
-
|
206
|
-
|
205
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_raw'>raw</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
206
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Must provide a query string</span><span class='tstring_end'>"</span></span>
|
207
|
+
<span class='kw'>end</span>
|
208
|
+
|
209
|
+
<span class='id identifier rubyid_subject'>subject</span> <span class='op'>=</span> <span class='const'>R509</span><span class='op'>::</span><span class='const'>Subject</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
210
|
+
<span class='id identifier rubyid_raw'>raw</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[&;] *</span><span class='regexp_end'>/n</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_pair'>pair</span><span class='op'>|</span>
|
211
|
+
<span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_pair'>pair</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='int'>2</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_data'>data</span><span class='op'>|</span> <span class='id identifier rubyid_unescape'>unescape</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
212
|
+
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>\[(.*)\]</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
213
|
+
<span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
214
|
+
<span class='id identifier rubyid_subject'>subject</span><span class='lbracket'>[</span><span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
207
215
|
<span class='kw'>end</span>
|
208
|
-
|
209
|
-
|
210
|
-
<span class='id identifier rubyid_raw'>raw</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[&;] *</span><span class='regexp_end'>/n</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_pair'>pair</span><span class='op'>|</span>
|
211
|
-
<span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_pair'>pair</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='int'>2</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_data'>data</span><span class='op'>|</span> <span class='id identifier rubyid_unescape'>unescape</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
212
|
-
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>\[(.*)\]</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
|
213
|
-
<span class='kw'>if</span> <span class='kw'>not</span> <span class='id identifier rubyid_match'>match</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
214
|
-
<span class='id identifier rubyid_subject'>subject</span><span class='lbracket'>[</span><span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
215
|
-
<span class='kw'>end</span>
|
216
|
-
<span class='rbrace'>}</span>
|
217
|
-
<span class='id identifier rubyid_subject'>subject</span>
|
216
|
+
<span class='rbrace'>}</span>
|
217
|
+
<span class='id identifier rubyid_subject'>subject</span>
|
218
218
|
<span class='kw'>end</span></pre>
|
219
219
|
</td>
|
220
220
|
</tr>
|
@@ -244,7 +244,7 @@
|
|
244
244
|
<pre class="code"><span class="info file"># File 'lib/r509/certificateauthority/http/subjectparser.rb', line 22</span>
|
245
245
|
|
246
246
|
<span class='kw'>def</span> <span class='id identifier rubyid_unescape'>unescape</span><span class='lparen'>(</span><span class='id identifier rubyid_s'>s</span><span class='comma'>,</span> <span class='id identifier rubyid_encoding'>encoding</span> <span class='op'>=</span> <span class='const'>Encoding</span><span class='op'>::</span><span class='const'>UTF_8</span><span class='rparen'>)</span>
|
247
|
-
|
247
|
+
<span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_decode_www_form_component'>decode_www_form_component</span><span class='lparen'>(</span><span class='id identifier rubyid_s'>s</span><span class='comma'>,</span> <span class='id identifier rubyid_encoding'>encoding</span><span class='rparen'>)</span>
|
248
248
|
<span class='kw'>end</span></pre>
|
249
249
|
</td>
|
250
250
|
</tr>
|
@@ -256,9 +256,9 @@
|
|
256
256
|
</div>
|
257
257
|
|
258
258
|
<div id="footer">
|
259
|
-
Generated on
|
259
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
260
260
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
261
|
-
0.8.
|
261
|
+
0.8.6.1 (ruby-1.9.3).
|
262
262
|
</div>
|
263
263
|
|
264
264
|
</body>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: R509::CertificateAuthority::
|
7
|
+
Class: R509::CertificateAuthority::HTTP::ValidityPeriodConverter
|
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;
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../_index.html">Index (V)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span> » <span class='title'><span class='object_link'><a href="../HTTP.html" title="R509::CertificateAuthority::HTTP (module)">HTTP</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">ValidityPeriodConverter</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Class: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Class: R509::CertificateAuthority::HTTP::ValidityPeriodConverter
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next">R509::CertificateAuthority::
|
81
|
+
<li class="next">R509::CertificateAuthority::HTTP::ValidityPeriodConverter</li>
|
82
82
|
|
83
83
|
</ul>
|
84
84
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -177,16 +177,16 @@
|
|
177
177
|
<pre class="code"><span class="info file"># File 'lib/r509/certificateauthority/http/validityperiodconverter.rb', line 3</span>
|
178
178
|
|
179
179
|
<span class='kw'>def</span> <span class='id identifier rubyid_convert'>convert</span><span class='lparen'>(</span><span class='id identifier rubyid_validity_period'>validity_period</span><span class='rparen'>)</span>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
180
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_validity_period'>validity_period</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
181
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Must provide validity period</span><span class='tstring_end'>"</span></span>
|
182
|
+
<span class='kw'>end</span>
|
183
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_validity_period'>validity_period</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'><=</span> <span class='int'>0</span>
|
184
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Validity period must be positive</span><span class='tstring_end'>"</span></span>
|
185
|
+
<span class='kw'>end</span>
|
186
|
+
<span class='lbrace'>{</span>
|
187
|
+
<span class='symbol'>:not_before</span> <span class='op'>=></span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>-</span> <span class='int'>6</span> <span class='op'>*</span> <span class='int'>60</span> <span class='op'>*</span> <span class='int'>60</span><span class='comma'>,</span>
|
188
|
+
<span class='symbol'>:not_after</span> <span class='op'>=></span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>+</span> <span class='id identifier rubyid_validity_period'>validity_period</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span>
|
189
|
+
<span class='rbrace'>}</span>
|
190
190
|
<span class='kw'>end</span></pre>
|
191
191
|
</td>
|
192
192
|
</tr>
|
@@ -198,9 +198,9 @@
|
|
198
198
|
</div>
|
199
199
|
|
200
200
|
<div id="footer">
|
201
|
-
Generated on
|
201
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
202
202
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
203
|
-
0.8.
|
203
|
+
0.8.6.1 (ruby-1.9.3).
|
204
204
|
</div>
|
205
205
|
|
206
206
|
</body>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: R509::CertificateAuthority::
|
7
|
+
Module: R509::CertificateAuthority::HTTP
|
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;
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<a href="../../_index.html">Index (H)</a> »
|
35
35
|
<span class='title'><span class='object_link'><a href="../../R509.html" title="R509 (module)">R509</a></span></span> » <span class='title'><span class='object_link'><a href="../CertificateAuthority.html" title="R509::CertificateAuthority (module)">CertificateAuthority</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">HTTP</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: R509::CertificateAuthority::
|
66
|
+
<div id="content"><h1>Module: R509::CertificateAuthority::HTTP
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -90,11 +90,11 @@
|
|
90
90
|
<p class="children">
|
91
91
|
|
92
92
|
|
93
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="
|
93
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="HTTP/Factory.html" title="R509::CertificateAuthority::HTTP::Factory (module)">Factory</a></span>
|
94
94
|
|
95
95
|
|
96
96
|
|
97
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="
|
97
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="HTTP/Server.html" title="R509::CertificateAuthority::HTTP::Server (class)">Server</a></span>, <span class='object_link'><a href="HTTP/SubjectParser.html" title="R509::CertificateAuthority::HTTP::SubjectParser (class)">SubjectParser</a></span>, <span class='object_link'><a href="HTTP/ValidityPeriodConverter.html" title="R509::CertificateAuthority::HTTP::ValidityPeriodConverter (class)">ValidityPeriodConverter</a></span>
|
98
98
|
|
99
99
|
|
100
100
|
</p>
|
@@ -106,7 +106,7 @@
|
|
106
106
|
<dt id="VERSION-constant" class="">VERSION =
|
107
107
|
|
108
108
|
</dt>
|
109
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.
|
109
|
+
<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>
|
110
110
|
|
111
111
|
</dl>
|
112
112
|
|
@@ -122,9 +122,9 @@
|
|
122
122
|
</div>
|
123
123
|
|
124
124
|
<div id="footer">
|
125
|
-
Generated on
|
125
|
+
Generated on Tue Apr 16 13:52:50 2013 by
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
127
|
-
0.8.
|
127
|
+
0.8.6.1 (ruby-1.9.3).
|
128
128
|
</div>
|
129
129
|
|
130
130
|
</body>
|