ruby_easy_rsa 0.2.0.pre.4 → 0.2.0.pre.5
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruby_easy_rsa/commands/build_ca.rb +2 -2
- data/lib/ruby_easy_rsa/commands/gen_req.rb +29 -0
- data/lib/ruby_easy_rsa/commands/mixins/algo_config.rb +20 -0
- data/lib/ruby_easy_rsa/commands.rb +1 -0
- data/lib/ruby_easy_rsa/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f12e493c4a02682cc661cdc9dea7a4993ac2670378300444e3b76128aac4ec5
|
4
|
+
data.tar.gz: 611060e3e889a370015d00790cd7a743fa9b7d076569e7bb6bbfaa793fc9f6e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a3ddf4fc58f0a11799a6089c44890b53fe8d0113f54961e3ef398068ab8aab86c1e9508f03b7c4942aa179cc9042f1f13c4f65a65ddb1a030d22f9a07c10fc0
|
7
|
+
data.tar.gz: 4cc309e96127ebb5b06755b775a70104e733fab4ed657526dde1f515333e89514ff5883cfd6e5b0bfa521715aca41b729e0ddb91cbe66b46c9ac7e39e682c17a
|
data/Gemfile.lock
CHANGED
@@ -3,21 +3,21 @@ 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
7
|
|
7
8
|
module RubyEasyRSA
|
8
9
|
module Commands
|
9
10
|
class BuildCA < Base
|
10
11
|
include Mixins::GlobalConfig
|
11
12
|
include Mixins::SSLConfig
|
13
|
+
include Mixins::AlgoConfig
|
12
14
|
|
13
15
|
def configure_command(builder, opts)
|
14
|
-
algorithm = opts[:algorithm]
|
15
16
|
batch = opts[:batch]
|
16
17
|
encrypt_key = opts[:encrypt_key].nil? ? true : opts[:encrypt_key]
|
17
18
|
sub_ca = opts[:sub_ca]
|
18
19
|
|
19
20
|
builder = super(builder, opts)
|
20
|
-
builder = builder.with_option('--use-algo', algorithm) if algorithm
|
21
21
|
builder = builder.with_flag('--batch') if batch
|
22
22
|
builder = builder.with_subcommand('build-ca')
|
23
23
|
builder = builder.with_argument('nopass') unless encrypt_key
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'lino'
|
2
|
+
|
3
|
+
require_relative 'base'
|
4
|
+
require_relative 'mixins/global_config'
|
5
|
+
require_relative 'mixins/ssl_config'
|
6
|
+
require_relative 'mixins/algo_config'
|
7
|
+
|
8
|
+
module RubyEasyRSA
|
9
|
+
module Commands
|
10
|
+
class GenReq < Base
|
11
|
+
include Mixins::GlobalConfig
|
12
|
+
include Mixins::SSLConfig
|
13
|
+
include Mixins::AlgoConfig
|
14
|
+
|
15
|
+
def configure_command(builder, opts)
|
16
|
+
batch = opts[:batch]
|
17
|
+
filename_base = opts[:filename_base]
|
18
|
+
encrypt_key = opts[:encrypt_key].nil? ? true : opts[:encrypt_key]
|
19
|
+
|
20
|
+
builder = super(builder, opts)
|
21
|
+
builder = builder.with_flag('--batch') if batch
|
22
|
+
builder = builder.with_subcommand('gen-req')
|
23
|
+
builder = builder.with_argument(filename_base)
|
24
|
+
builder = builder.with_argument('nopass') unless encrypt_key
|
25
|
+
builder
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module RubyEasyRSA
|
2
|
+
module Commands
|
3
|
+
module Mixins
|
4
|
+
module AlgoConfig
|
5
|
+
def configure_command(builder, opts)
|
6
|
+
algorithm = opts[:algorithm]
|
7
|
+
curve = opts[:curve]
|
8
|
+
ec_directory = opts[:ec_directory]
|
9
|
+
|
10
|
+
builder = super(builder, opts)
|
11
|
+
builder = builder.with_environment_variable(
|
12
|
+
'EASYRSA_EC_DIR', ec_directory) if ec_directory
|
13
|
+
builder = builder.with_option('--use-algo', algorithm) if algorithm
|
14
|
+
builder = builder.with_option('--curve', curve) if curve
|
15
|
+
builder
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.
|
4
|
+
version: 0.2.0.pre.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lino
|
@@ -160,7 +160,9 @@ files:
|
|
160
160
|
- lib/ruby_easy_rsa/commands/base.rb
|
161
161
|
- lib/ruby_easy_rsa/commands/build_ca.rb
|
162
162
|
- lib/ruby_easy_rsa/commands/gen_dh.rb
|
163
|
+
- lib/ruby_easy_rsa/commands/gen_req.rb
|
163
164
|
- lib/ruby_easy_rsa/commands/init_pki.rb
|
165
|
+
- lib/ruby_easy_rsa/commands/mixins/algo_config.rb
|
164
166
|
- lib/ruby_easy_rsa/commands/mixins/global_config.rb
|
165
167
|
- lib/ruby_easy_rsa/commands/mixins/ssl_config.rb
|
166
168
|
- lib/ruby_easy_rsa/version.rb
|