ruby_easy_rsa 0.2.0.pre.3 → 0.2.0.pre.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fb46c47e4437ef4b480c9f05bd8a57b76bd1bc45a3e060dc1f59610eee19abc
4
- data.tar.gz: aba262ed6b24d62956a5100f841be7bbd605fd592da91505387a7b863afbdce8
3
+ metadata.gz: dc21e04c539a710e735e6507efc4eb9d86aa577adc8a248b9e000e77aeec8190
4
+ data.tar.gz: fd64c3138071e15c4e81fb2182301cef27c26e06ddbd407b32f93a9163275ea6
5
5
  SHA512:
6
- metadata.gz: 0daf5f218ef954bf36b7c314de35f18926dd453ac8562d3833268cb5b45dc6b71a0856631ae39b70eca63d4a2c953b2ce96b17bf4040652780ef93c37fabf9f5
7
- data.tar.gz: 114185835783f0b0c3bb624d9ce774a835b1ec3e4a08e41235889dffcff49f334b0e525a4de9fb218506681dfce2f282358f6b2079923443f30ff9c69559eb3e
6
+ metadata.gz: b8222f95ff7d812a55ce2faf265ebb3524283b8f2868c8fff6ed1008d84236b6c8e717291f1aa3c89881baff8d228d7e4c8aa421956f9e1069e4f1cfa528aa02
7
+ data.tar.gz: b4e549e70b664312f4a87a1eb1c88dde834611421724ed2c9d2f8ea9699cb1115d582d95dbf4c9e2b470fbd7d088389be23f32b67c55891c7b9000ca59921449
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_easy_rsa (0.2.0.pre.3)
4
+ ruby_easy_rsa (0.2.0.pre.4)
5
5
  lino (= 1.2.0.pre.2)
6
6
 
7
7
  GEM
@@ -44,6 +44,7 @@ module RubyEasyRSA
44
44
  end
45
45
 
46
46
  def configure_command(builder, opts)
47
+ builder
47
48
  end
48
49
 
49
50
  def do_after(opts)
@@ -1,55 +1,24 @@
1
1
  require 'lino'
2
+
2
3
  require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/ssl_config'
3
6
 
4
7
  module RubyEasyRSA
5
8
  module Commands
6
9
  class BuildCA < Base
10
+ include Mixins::GlobalConfig
11
+ include Mixins::SSLConfig
12
+
7
13
  def configure_command(builder, opts)
8
- pki_directory = opts[:pki_directory]
9
14
  algorithm = opts[:algorithm]
10
- digest = opts[:digest]
11
- key_size_in_bits = opts[:key_size_in_bits]
12
- expires_in_days = opts[:expires_in_days]
13
- distinguished_name_mode = opts[:distinguished_name_mode]
14
- common_name = opts[:common_name]
15
- country = opts[:country]
16
- province = opts[:province]
17
- city = opts[:city]
18
- organisation = opts[:organisation]
19
- organisational_unit = opts[:organisational_unit]
20
- email = opts[:email]
21
15
  batch = opts[:batch]
22
16
  encrypt_key = opts[:encrypt_key].nil? ? true : opts[:encrypt_key]
23
17
  sub_ca = opts[:sub_ca]
24
18
 
25
- builder = builder.with_option(
26
- '--pki-dir', pki_directory) if pki_directory
27
- builder = builder.with_option(
28
- '--use-algo', algorithm) if algorithm
29
- builder = builder.with_option(
30
- '--digest', digest) if digest
31
- builder = builder.with_option(
32
- '--days', expires_in_days) if expires_in_days
33
- builder = builder.with_option(
34
- '--keysize', key_size_in_bits) if key_size_in_bits
35
- builder = builder.with_option(
36
- '--dn-mode', distinguished_name_mode) if distinguished_name_mode
37
- builder = builder.with_option(
38
- '--req-cn', common_name, quoting: '"') if common_name
39
- builder = builder.with_option(
40
- '--req-c', country, quoting: '"') if country
41
- builder = builder.with_option(
42
- '--req-st', province, quoting: '"') if province
43
- builder = builder.with_option(
44
- '--req-city', city, quoting: '"') if city
45
- builder = builder.with_option(
46
- '--req-org', organisation, quoting: '"') if organisation
47
- builder = builder.with_option(
48
- '--req-ou', organisational_unit, quoting: '"') if organisational_unit
49
- builder = builder.with_option(
50
- '--req-email', email) if email
51
- builder = builder.with_flag(
52
- '--batch') if batch
19
+ builder = super(builder, opts)
20
+ builder = builder.with_option('--use-algo', algorithm) if algorithm
21
+ builder = builder.with_flag('--batch') if batch
53
22
  builder = builder.with_subcommand('build-ca')
54
23
  builder = builder.with_argument('nopass') unless encrypt_key
55
24
  builder = builder.with_argument('subca') if sub_ca
@@ -0,0 +1,20 @@
1
+ require 'lino'
2
+
3
+ require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/ssl_config'
6
+
7
+ module RubyEasyRSA
8
+ module Commands
9
+ class GenDH < Base
10
+ include Mixins::GlobalConfig
11
+ include Mixins::SSLConfig
12
+
13
+ def configure_command(builder, opts)
14
+ builder = super(builder, opts)
15
+ builder = builder.with_subcommand('gen-dh')
16
+ builder
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ require 'lino'
2
+
3
+ require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/ssl_config'
6
+
7
+ module RubyEasyRSA
8
+ module Commands
9
+ class InitPKI < Base
10
+ include Mixins::GlobalConfig
11
+ include Mixins::SSLConfig
12
+
13
+ def configure_command(builder, opts)
14
+ builder = super(builder, opts)
15
+ builder.with_subcommand('init-pki')
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,25 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module GlobalConfig
5
+ def configure_command(builder, opts)
6
+ openssl_binary = opts[:openssl_binary]
7
+ ssl_configuration = opts[:ssl_configuration]
8
+ safe_configuration = opts[:safe_configuration]
9
+ vars = opts[:vars]
10
+
11
+ builder = super(builder, opts)
12
+ builder = builder.with_environment_variable(
13
+ 'EASYRSA_OPENSSL', openssl_binary) if openssl_binary
14
+ builder = builder.with_environment_variable(
15
+ 'EASYRSA_SSL_CONF', ssl_configuration) if ssl_configuration
16
+ builder = builder.with_environment_variable(
17
+ 'EASYRSA_SAFE_CONF', safe_configuration) if safe_configuration
18
+ builder = builder.with_option(
19
+ '--vars', vars) if vars
20
+ builder
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,49 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module SSLConfig
5
+ def configure_command(builder, opts)
6
+ pki_directory = opts[:pki_directory]
7
+ digest = opts[:digest]
8
+ key_size_in_bits = opts[:key_size_in_bits]
9
+ expires_in_days = opts[:expires_in_days]
10
+ distinguished_name_mode = opts[:distinguished_name_mode]
11
+ common_name = opts[:common_name]
12
+ country = opts[:country]
13
+ province = opts[:province]
14
+ city = opts[:city]
15
+ organisation = opts[:organisation]
16
+ organisational_unit = opts[:organisational_unit]
17
+ email = opts[:email]
18
+
19
+ builder = super(builder, opts)
20
+ builder = builder.with_option(
21
+ '--pki-dir', pki_directory) if pki_directory
22
+ builder = builder.with_option(
23
+ '--digest', digest) if digest
24
+ builder = builder.with_option(
25
+ '--days', expires_in_days) if expires_in_days
26
+ builder = builder.with_option(
27
+ '--keysize', key_size_in_bits) if key_size_in_bits
28
+ builder = builder.with_option(
29
+ '--dn-mode', distinguished_name_mode) if distinguished_name_mode
30
+ builder = builder.with_option(
31
+ '--req-cn', common_name, quoting: '"') if common_name
32
+ builder = builder.with_option(
33
+ '--req-c', country, quoting: '"') if country
34
+ builder = builder.with_option(
35
+ '--req-st', province, quoting: '"') if province
36
+ builder = builder.with_option(
37
+ '--req-city', city, quoting: '"') if city
38
+ builder = builder.with_option(
39
+ '--req-org', organisation, quoting: '"') if organisation
40
+ builder = builder.with_option(
41
+ '--req-ou', organisational_unit, quoting: '"') if organisational_unit
42
+ builder = builder.with_option(
43
+ '--req-email', email) if email
44
+ builder
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -1,5 +1,6 @@
1
- require_relative 'commands/initialise_pki'
1
+ require_relative 'commands/init_pki'
2
2
  require_relative 'commands/build_ca'
3
+ require_relative 'commands/gen_dh'
3
4
 
4
5
  module RubyEasyRSA
5
6
  module Commands
@@ -1,3 +1,3 @@
1
1
  module RubyEasyRSA
2
- VERSION = '0.2.0.pre.3'
2
+ VERSION = '0.2.0.pre.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_easy_rsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.3
4
+ version: 0.2.0.pre.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
@@ -159,7 +159,10 @@ files:
159
159
  - lib/ruby_easy_rsa/commands.rb
160
160
  - lib/ruby_easy_rsa/commands/base.rb
161
161
  - lib/ruby_easy_rsa/commands/build_ca.rb
162
- - lib/ruby_easy_rsa/commands/initialise_pki.rb
162
+ - lib/ruby_easy_rsa/commands/gen_dh.rb
163
+ - lib/ruby_easy_rsa/commands/init_pki.rb
164
+ - lib/ruby_easy_rsa/commands/mixins/global_config.rb
165
+ - lib/ruby_easy_rsa/commands/mixins/ssl_config.rb
163
166
  - lib/ruby_easy_rsa/version.rb
164
167
  - ruby_easy_rsa.gemspec
165
168
  - scripts/ci/common/configure-git.sh
@@ -1,15 +0,0 @@
1
- require 'lino'
2
- require_relative 'base'
3
-
4
- module RubyEasyRSA
5
- module Commands
6
- class InitialisePKI < Base
7
- def configure_command(builder, opts)
8
- pki_directory = opts[:pki_directory]
9
-
10
- builder = builder.with_option('--pki-dir', pki_directory) if pki_directory
11
- builder.with_subcommand('init-pki')
12
- end
13
- end
14
- end
15
- end