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 +4 -4
- data/lib/cfnvpn/renew_certificate.rb +6 -3
- data/lib/cfnvpn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca6d3909d559c6d338f7dc2852384adae1933b87fac5e2bcac9c44aefea8346e
|
4
|
+
data.tar.gz: 72322a94697e760b779ac103e20107af16536d09453862eb59c1faa9a175061f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
40
|
-
|
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 "
|
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
|
data/lib/cfnvpn/version.rb
CHANGED