Skip to content
Permalink
Browse files

serve: add support for ECC certificates (#7768)

Merge pull request 7768
  • Loading branch information...
vszakats authored and jekyllbot committed Aug 22, 2019
1 parent c55eaf7 commit 650dcc637a4b80317a038ca0d4e17d44d1515f1f
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/jekyll/commands/serve.rb
@@ -307,7 +307,15 @@ def enable_ssl(opts)
require "webrick/https"

opts[:SSLCertificate] = OpenSSL::X509::Certificate.new(read_file(src, cert))
opts[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(read_file(src, key))
begin
opts[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(read_file(src, key))
rescue StandardError
if defined?(OpenSSL::PKey::EC)
opts[:SSLPrivateKey] = OpenSSL::PKey::EC.new(read_file(src, key))
else
raise
end
end
opts[:SSLEnable] = true
end

0 comments on commit 650dcc6

Please sign in to comment.
You can’t perform that action at this time.