ruby_easy_rsa 0.2.0.pre.5 → 0.2.0.pre.6

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: 7f12e493c4a02682cc661cdc9dea7a4993ac2670378300444e3b76128aac4ec5
4
- data.tar.gz: 611060e3e889a370015d00790cd7a743fa9b7d076569e7bb6bbfaa793fc9f6e2
3
+ metadata.gz: 83be89f01f04e1303768f190cff9ad9b7547d7a6b02e3ea4bea4b7eec4045ac5
4
+ data.tar.gz: 6ffd6200e865ba3068a4ecc08dd2206a85c3c0b4a653ebcf4530c2c034313da2
5
5
  SHA512:
6
- metadata.gz: 2a3ddf4fc58f0a11799a6089c44890b53fe8d0113f54961e3ef398068ab8aab86c1e9508f03b7c4942aa179cc9042f1f13c4f65a65ddb1a030d22f9a07c10fc0
7
- data.tar.gz: 4cc309e96127ebb5b06755b775a70104e733fab4ed657526dde1f515333e89514ff5883cfd6e5b0bfa521715aca41b729e0ddb91cbe66b46c9ac7e39e682c17a
6
+ metadata.gz: 1cfe9fcbf78cdbb22509bf712d55027f90465143c93e476ce17970b997a748136b8a57297dfa86143b4320f887b6fca2bd871702f1cd71ce796ec35378554c3f
7
+ data.tar.gz: e8112afd40cbd9483480d359d81f189d8d02cdbebd70e6eea782e374fed0fdb8ae98edcc0b46c05ed347af35ad36b375ff348bbfaebbf403f6467b6d5693a02b
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
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.5)
4
+ ruby_easy_rsa (0.2.0.pre.6)
5
5
  lino (= 1.2.0.pre.2)
6
6
 
7
7
  GEM
@@ -3,25 +3,23 @@ require 'lino'
3
3
  require_relative 'base'
4
4
  require_relative 'mixins/global_config'
5
5
  require_relative 'mixins/ssl_config'
6
- require_relative 'mixins/algo_config'
6
+ require_relative 'mixins/algorithm_config'
7
+ require_relative 'mixins/encrypt_key_config'
7
8
 
8
9
  module RubyEasyRSA
9
10
  module Commands
10
11
  class BuildCA < Base
11
12
  include Mixins::GlobalConfig
12
13
  include Mixins::SSLConfig
13
- include Mixins::AlgoConfig
14
+ include Mixins::AlgorithmConfig
15
+ include Mixins::EncryptKeyConfig
14
16
 
15
17
  def configure_command(builder, opts)
16
- batch = opts[:batch]
17
- encrypt_key = opts[:encrypt_key].nil? ? true : opts[:encrypt_key]
18
18
  sub_ca = opts[:sub_ca]
19
19
 
20
- builder = super(builder, opts)
21
- builder = builder.with_flag('--batch') if batch
22
20
  builder = builder.with_subcommand('build-ca')
23
- builder = builder.with_argument('nopass') unless encrypt_key
24
21
  builder = builder.with_argument('subca') if sub_ca
22
+ builder = super(builder, opts)
25
23
  builder
26
24
  end
27
25
  end
@@ -0,0 +1,35 @@
1
+ require 'lino'
2
+
3
+ require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/algorithm_config'
6
+ require_relative 'mixins/ssl_config'
7
+ require_relative 'mixins/sub_ca_config'
8
+ require_relative 'mixins/copy_extensions_config'
9
+ require_relative 'mixins/extra_extensions_config'
10
+ require_relative 'mixins/netscape_extensions_config'
11
+ require_relative 'mixins/encrypt_key_config'
12
+
13
+ module RubyEasyRSA
14
+ module Commands
15
+ class BuildClientFull < Base
16
+ include Mixins::GlobalConfig
17
+ include Mixins::AlgorithmConfig
18
+ include Mixins::SSLConfig
19
+ include Mixins::SubCAConfig
20
+ include Mixins::CopyExtensionsConfig
21
+ include Mixins::ExtraExtensionsConfig
22
+ include Mixins::NetscapeExtensionsConfig
23
+ include Mixins::EncryptKeyConfig
24
+
25
+ def configure_command(builder, opts)
26
+ filename_base = opts[:filename_base]
27
+
28
+ builder = builder.with_subcommand('build-client-full')
29
+ builder = builder.with_argument(filename_base)
30
+ builder = super(builder, opts)
31
+ builder
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,35 @@
1
+ require 'lino'
2
+
3
+ require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/algorithm_config'
6
+ require_relative 'mixins/ssl_config'
7
+ require_relative 'mixins/sub_ca_config'
8
+ require_relative 'mixins/copy_extensions_config'
9
+ require_relative 'mixins/extra_extensions_config'
10
+ require_relative 'mixins/netscape_extensions_config'
11
+ require_relative 'mixins/encrypt_key_config'
12
+
13
+ module RubyEasyRSA
14
+ module Commands
15
+ class BuildServerFull < Base
16
+ include Mixins::GlobalConfig
17
+ include Mixins::AlgorithmConfig
18
+ include Mixins::SSLConfig
19
+ include Mixins::SubCAConfig
20
+ include Mixins::CopyExtensionsConfig
21
+ include Mixins::ExtraExtensionsConfig
22
+ include Mixins::NetscapeExtensionsConfig
23
+ include Mixins::EncryptKeyConfig
24
+
25
+ def configure_command(builder, opts)
26
+ filename_base = opts[:filename_base]
27
+
28
+ builder = builder.with_subcommand('build-server-full')
29
+ builder = builder.with_argument(filename_base)
30
+ builder = super(builder, opts)
31
+ builder
32
+ end
33
+ end
34
+ end
35
+ end
@@ -2,26 +2,26 @@ require 'lino'
2
2
 
3
3
  require_relative 'base'
4
4
  require_relative 'mixins/global_config'
5
+ require_relative 'mixins/algorithm_config'
5
6
  require_relative 'mixins/ssl_config'
6
- require_relative 'mixins/algo_config'
7
+ require_relative 'mixins/extra_extensions_config'
8
+ require_relative 'mixins/encrypt_key_config'
7
9
 
8
10
  module RubyEasyRSA
9
11
  module Commands
10
12
  class GenReq < Base
11
13
  include Mixins::GlobalConfig
14
+ include Mixins::AlgorithmConfig
12
15
  include Mixins::SSLConfig
13
- include Mixins::AlgoConfig
16
+ include Mixins::ExtraExtensionsConfig
17
+ include Mixins::EncryptKeyConfig
14
18
 
15
19
  def configure_command(builder, opts)
16
- batch = opts[:batch]
17
20
  filename_base = opts[:filename_base]
18
- encrypt_key = opts[:encrypt_key].nil? ? true : opts[:encrypt_key]
19
21
 
20
- builder = super(builder, opts)
21
- builder = builder.with_flag('--batch') if batch
22
22
  builder = builder.with_subcommand('gen-req')
23
23
  builder = builder.with_argument(filename_base)
24
- builder = builder.with_argument('nopass') unless encrypt_key
24
+ builder = super(builder, opts)
25
25
  builder
26
26
  end
27
27
  end
@@ -1,7 +1,7 @@
1
1
  module RubyEasyRSA
2
2
  module Commands
3
3
  module Mixins
4
- module AlgoConfig
4
+ module AlgorithmConfig
5
5
  def configure_command(builder, opts)
6
6
  algorithm = opts[:algorithm]
7
7
  curve = opts[:curve]
@@ -0,0 +1,15 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module CopyExtensionsConfig
5
+ def configure_command(builder, opts)
6
+ copy_extensions = opts[:copy_extensions]
7
+
8
+ builder = super(builder, opts)
9
+ builder = builder.with_flag('--copy-ext') if copy_extensions
10
+ builder
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module EncryptKeyConfig
5
+ def configure_command(builder, opts)
6
+ encrypt_key = opts[:encrypt_key].nil? ? true : opts[:encrypt_key]
7
+
8
+ builder = super(builder, opts)
9
+ builder = builder.with_argument('nopass') unless encrypt_key
10
+ builder
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module ExtraExtensionsConfig
5
+ def configure_command(builder, opts)
6
+ extra_extensions = opts[:extra_extensions]
7
+ subject_alternative_name = opts[:subject_alternative_name]
8
+
9
+ builder = super(builder, opts)
10
+ builder = builder.with_environment_variable(
11
+ 'EASYRSA_EXTRA_EXT', extra_extensions) if extra_extensions
12
+ builder = builder.with_option(
13
+ '--subject-alt-name', subject_alternative_name, quoting: '"'
14
+ ) if subject_alternative_name
15
+ builder
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -3,20 +3,29 @@ module RubyEasyRSA
3
3
  module Mixins
4
4
  module GlobalConfig
5
5
  def configure_command(builder, opts)
6
+ extensions_directory = opts[:extensions_directory]
6
7
  openssl_binary = opts[:openssl_binary]
7
8
  ssl_configuration = opts[:ssl_configuration]
8
9
  safe_configuration = opts[:safe_configuration]
9
10
  vars = opts[:vars]
11
+ batch = opts[:batch]
12
+ pki_directory = opts[:pki_directory]
10
13
 
11
14
  builder = super(builder, opts)
12
15
  builder = builder.with_environment_variable(
13
16
  'EASYRSA_OPENSSL', openssl_binary) if openssl_binary
17
+ builder = builder.with_environment_variable(
18
+ 'EASYRSA_EXT_DIR', extensions_directory) if extensions_directory
14
19
  builder = builder.with_environment_variable(
15
20
  'EASYRSA_SSL_CONF', ssl_configuration) if ssl_configuration
16
21
  builder = builder.with_environment_variable(
17
22
  'EASYRSA_SAFE_CONF', safe_configuration) if safe_configuration
18
23
  builder = builder.with_option(
19
24
  '--vars', vars) if vars
25
+ builder = builder.with_flag(
26
+ '--batch') if batch
27
+ builder = builder.with_option(
28
+ '--pki-dir', pki_directory) if pki_directory
20
29
  builder
21
30
  end
22
31
  end
@@ -0,0 +1,21 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module NetscapeExtensionsConfig
5
+ def configure_command(builder, opts)
6
+ netscape_extensions_support = opts[:netscape_extensions_support]
7
+ netscape_extensions_comment = opts[:netscape_extensions_comment]
8
+
9
+ builder = super(builder, opts)
10
+ builder = builder.with_option(
11
+ '--ns-cert', netscape_extensions_support ? 'yes' : 'no'
12
+ ) unless netscape_extensions_support.nil?
13
+ builder = builder.with_option(
14
+ '--ns-comment', netscape_extensions_comment, quoting: '"'
15
+ ) if netscape_extensions_comment
16
+ builder
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -3,7 +3,6 @@ module RubyEasyRSA
3
3
  module Mixins
4
4
  module SSLConfig
5
5
  def configure_command(builder, opts)
6
- pki_directory = opts[:pki_directory]
7
6
  digest = opts[:digest]
8
7
  key_size_in_bits = opts[:key_size_in_bits]
9
8
  expires_in_days = opts[:expires_in_days]
@@ -17,8 +16,6 @@ module RubyEasyRSA
17
16
  email = opts[:email]
18
17
 
19
18
  builder = super(builder, opts)
20
- builder = builder.with_option(
21
- '--pki-dir', pki_directory) if pki_directory
22
19
  builder = builder.with_option(
23
20
  '--digest', digest) if digest
24
21
  builder = builder.with_option(
@@ -0,0 +1,16 @@
1
+ module RubyEasyRSA
2
+ module Commands
3
+ module Mixins
4
+ module SubCAConfig
5
+ def configure_command(builder, opts)
6
+ sub_ca_length = opts[:sub_ca_length]
7
+
8
+ builder = super(builder, opts)
9
+ builder = builder.with_option(
10
+ '--subca-len', sub_ca_length) if sub_ca_length
11
+ builder
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,35 @@
1
+ require 'lino'
2
+
3
+ require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/algorithm_config'
6
+ require_relative 'mixins/ssl_config'
7
+ require_relative 'mixins/sub_ca_config'
8
+ require_relative 'mixins/copy_extensions_config'
9
+ require_relative 'mixins/extra_extensions_config'
10
+ require_relative 'mixins/netscape_extensions_config'
11
+
12
+ module RubyEasyRSA
13
+ module Commands
14
+ class SignReq < Base
15
+ include Mixins::GlobalConfig
16
+ include Mixins::AlgorithmConfig
17
+ include Mixins::SSLConfig
18
+ include Mixins::SubCAConfig
19
+ include Mixins::CopyExtensionsConfig
20
+ include Mixins::ExtraExtensionsConfig
21
+ include Mixins::NetscapeExtensionsConfig
22
+
23
+ def configure_command(builder, opts)
24
+ type = opts[:type]
25
+ filename_base = opts[:filename_base]
26
+
27
+ builder = super(builder, opts)
28
+ builder = builder.with_subcommand('sign-req')
29
+ builder = builder.with_argument(type)
30
+ builder = builder.with_argument(filename_base)
31
+ builder
32
+ end
33
+ end
34
+ end
35
+ end
@@ -2,6 +2,9 @@ require_relative 'commands/init_pki'
2
2
  require_relative 'commands/build_ca'
3
3
  require_relative 'commands/gen_dh'
4
4
  require_relative 'commands/gen_req'
5
+ require_relative 'commands/sign_req'
6
+ require_relative 'commands/build_client_full'
7
+ require_relative 'commands/build_server_full'
5
8
 
6
9
  module RubyEasyRSA
7
10
  module Commands
@@ -1,3 +1,3 @@
1
1
  module RubyEasyRSA
2
- VERSION = '0.2.0.pre.5'
2
+ VERSION = '0.2.0.pre.6'
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.5
4
+ version: 0.2.0.pre.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
@@ -138,6 +138,7 @@ files:
138
138
  - ".git-crypt/keys/default/0/AAE932B730C2BA697FFDFAE05DA390873E38358B.gpg"
139
139
  - ".gitattributes"
140
140
  - ".gitignore"
141
+ - ".rspec"
141
142
  - ".ruby-version"
142
143
  - CODE_OF_CONDUCT.md
143
144
  - Gemfile
@@ -159,12 +160,20 @@ files:
159
160
  - lib/ruby_easy_rsa/commands.rb
160
161
  - lib/ruby_easy_rsa/commands/base.rb
161
162
  - lib/ruby_easy_rsa/commands/build_ca.rb
163
+ - lib/ruby_easy_rsa/commands/build_client_full.rb
164
+ - lib/ruby_easy_rsa/commands/build_server_full.rb
162
165
  - lib/ruby_easy_rsa/commands/gen_dh.rb
163
166
  - lib/ruby_easy_rsa/commands/gen_req.rb
164
167
  - lib/ruby_easy_rsa/commands/init_pki.rb
165
- - lib/ruby_easy_rsa/commands/mixins/algo_config.rb
168
+ - lib/ruby_easy_rsa/commands/mixins/algorithm_config.rb
169
+ - lib/ruby_easy_rsa/commands/mixins/copy_extensions_config.rb
170
+ - lib/ruby_easy_rsa/commands/mixins/encrypt_key_config.rb
171
+ - lib/ruby_easy_rsa/commands/mixins/extra_extensions_config.rb
166
172
  - lib/ruby_easy_rsa/commands/mixins/global_config.rb
173
+ - lib/ruby_easy_rsa/commands/mixins/netscape_extensions_config.rb
167
174
  - lib/ruby_easy_rsa/commands/mixins/ssl_config.rb
175
+ - lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
176
+ - lib/ruby_easy_rsa/commands/sign_req.rb
168
177
  - lib/ruby_easy_rsa/version.rb
169
178
  - ruby_easy_rsa.gemspec
170
179
  - scripts/ci/common/configure-git.sh