Commit 5c9a490 1 parent 16daf46 commit 5c9a490 Copy full SHA for 5c9a490
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,13 @@ namespace :cuttlefish do
88
88
end
89
89
90
90
# Little "proof of concept" of generating an SSL certificate
91
- task create_ssl_certificate : :environment do
91
+ desc "Create SSL certificate (proof of concept)"
92
+ task :create_ssl_certificate , [ :domain ] => :environment do |_t , args |
92
93
require "openssl"
93
94
95
+ domain = args [ :domain ]
96
+ puts "Generating certificate for #{ domain } ..."
97
+
94
98
directory = "/etc/cuttlefish-ssl/keys"
95
99
filename = File . join ( directory , "key.pem" )
96
100
private_key = OpenSSL ::PKey ::RSA . new (
@@ -114,7 +118,6 @@ namespace :cuttlefish do
114
118
File . write ( filename , private_key . export )
115
119
end
116
120
117
- domain = "f553-2403-5806-d1d-0-eabd-d4ca-101c-d367.ngrok.io"
118
121
order = client . new_order ( identifiers : [ domain ] )
119
122
authorization = order . authorizations . first
120
123
challenge = authorization . http
You can’t perform that action at this time.
0 commit comments