Method: Site.create_certificate
- Defined in:
- lib/brisk/server/site.rb
.create_certificate(url) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/brisk/server/site.rb', line 17 def self.create_certificate(url) key_path = certificates_path + "/#{url}.key" csr_path = certificates_path + "/#{url}.csr" crt_path = certificates_path + "/#{url}.crt" create_private_key(key_path) create_signing_request(url, key_path, csr_path) system "openssl x509 -req -days 365 -in #{csr_path} -signkey #{key_path} -out #{crt_path}" trust_certificate(crt_path) end |