network-facade 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/network-facade-ssl-pool +30 -0
- data/lib/network-facade/config.rb +2 -2
- metadata +4 -3
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
require 'network-facade/cert'
|
3
|
+
|
4
|
+
CA = {
|
5
|
+
:country => 'FR',
|
6
|
+
:hostname => 'demo',
|
7
|
+
:domainname => 'example.com'
|
8
|
+
}
|
9
|
+
|
10
|
+
if not File.exists?("ca.cert") or not File.exists?("ca.key")
|
11
|
+
cert = NetworkFacade::SSL.create_ca(CA)
|
12
|
+
File.open('ca.key', 'w') { |fd| fd.puts cert[:key] }
|
13
|
+
File.open('ca.cert', 'w') { |fd| fd.puts cert[:cert].to_pem }
|
14
|
+
end
|
15
|
+
|
16
|
+
OPTS = {
|
17
|
+
:country => CA[:country],
|
18
|
+
:hostname => CA[:hostname],
|
19
|
+
:domainname => CA[:domainname],
|
20
|
+
:ca_cert => 'ca.cert',
|
21
|
+
:ca_key => 'ca.key'
|
22
|
+
}
|
23
|
+
|
24
|
+
1.upto(ARGV.first.to_i) do |n|
|
25
|
+
if not File.exists?("#{n}.cert") or not File.exists?("#{n}.key")
|
26
|
+
cert = NetworkFacade::SSL.create_cert(OPTS)
|
27
|
+
File.open("#{n}.key", 'w') { |fd| fd.puts cert[:key] }
|
28
|
+
File.open("#{n}.cert", 'w') { |fd| fd.puts cert[:cert].to_pem }
|
29
|
+
end
|
30
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module NetworkFacade
|
2
2
|
NAME = 'Network-Facade'
|
3
|
-
VERSION = '0.
|
3
|
+
VERSION = '0.4'
|
4
4
|
COPYRIGHT = 'Copyright (C) 2007 Florent Solt'
|
5
|
-
DESC = 'Object-oriented
|
5
|
+
DESC = 'Object-oriented network facade'
|
6
6
|
AUTHOR = 'Florent Solt'
|
7
7
|
EMAIL = 'florent@solt.biz'
|
8
8
|
HOMEPAGE = 'http://network-facade.rubyforge.org'
|
metadata
CHANGED
@@ -3,9 +3,9 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: network-facade
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "0.
|
7
|
-
date: 2007-05-
|
8
|
-
summary: Object-oriented
|
6
|
+
version: "0.4"
|
7
|
+
date: 2007-05-09 00:00:00 +02:00
|
8
|
+
summary: Object-oriented network facade
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: florent@solt.biz
|
@@ -46,6 +46,7 @@ extra_rdoc_files: []
|
|
46
46
|
|
47
47
|
executables:
|
48
48
|
- network-facade-ssl
|
49
|
+
- network-facade-ssl-pool
|
49
50
|
extensions: []
|
50
51
|
|
51
52
|
requirements: []
|