cfn-vpn 0.5.0.1 → 0.5.0.2

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: de3c2f9a982c9bf8839d76776c94d1763411d712a10846830b26350d51bb6ec0
4
- data.tar.gz: b30dc39010bc1f67d3a3c070087c25cfd7b9d0201b1ee6be5390c28988a10d64
3
+ metadata.gz: ca6d3909d559c6d338f7dc2852384adae1933b87fac5e2bcac9c44aefea8346e
4
+ data.tar.gz: 72322a94697e760b779ac103e20107af16536d09453862eb59c1faa9a175061f
5
5
  SHA512:
6
- metadata.gz: 4db85589a2ac42680a662cc2d5fc10e903da31dc059b200c65373e637a4c6b17f78662ec186e7bfe74840ee081d7576083ab21544827cdfa29ef80570c13e0be
7
- data.tar.gz: 9f0b4111dcd0d253b5c34738cd538cc709ecfa5ed77f75f6d947bfd93e70b3b48c0a2595dfa9a4cef7f090c197d9edb80be81855343f3f8994ab6b44e361373c
6
+ metadata.gz: e84e913fae2c4e04670c9b3dea94f4154770557b8da6cc3ac82a26aa3d1b723e30dd523a3bb65387ecb21c7b9e2b4d98fd1c9ec901b3e3f6aaf691c429ec43e4
7
+ data.tar.gz: 311eb8388373d7e869b70a4ec5e018fd829edf9ada41e300b3ae7c19ac0ba360e134ee1fd58b5a626871b79c6060e193b2e1823cefa794e5c5ea3a8e8a8d371e
@@ -36,8 +36,9 @@ module CfnVpn
36
36
 
37
37
  def create_build_directory
38
38
  @build_dir = "#{CfnVpn.cfnvpn_path}/#{@name}"
39
- Log.logger.debug "creating directory #{@build_dir}"
40
- FileUtils.mkdir_p(@build_dir)
39
+ @cert_dir = "#{@build_dir}/certificates"
40
+ Log.logger.debug "creating directory #{@cert_dir}"
41
+ FileUtils.mkdir_p(@cert_dir)
41
42
  end
42
43
 
43
44
  def initialize_config
@@ -60,12 +61,14 @@ module CfnVpn
60
61
 
61
62
  # create certificates
62
63
  def generate_server_certificates
64
+ s3 = CfnVpn::S3.new(@options['region'],@options['bucket'],@name)
65
+ s3.get_object("#{@cert_dir}/ca.tar.gz")
63
66
  cert = CfnVpn::Certificates.new(@build_dir,@name,@options['easyrsa_local'])
64
67
  if @options['rebuild']
65
68
  Log.logger.info "rebuilding certificates using openvpn easy-rsa"
66
69
  cert.rebuild(@options['server_cn'],@client_cn,@options['certificate_expiry'])
67
70
  else
68
- Log.logger.info "rebuilding certificates using openvpn easy-rsa"
71
+ Log.logger.info "renewing certificates using openvpn easy-rsa"
69
72
  cert.renew(@options['server_cn'],@client_cn,@options['certificate_expiry'])
70
73
  end
71
74
  end
@@ -1,4 +1,4 @@
1
1
  module CfnVpn
2
- VERSION = "0.5.0.1".freeze
2
+ VERSION = "0.5.0.2".freeze
3
3
  CHANGE_SET_VERSION = VERSION.gsub('.', '-').freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-vpn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.1
4
+ version: 0.5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guslington