Skip to content

Commit 76143bd

Browse files
committed
WIP: HTTP server launching with HTTPS
1 parent 8835dae commit 76143bd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/msf/core/db_manager/http/http_db_manager_service.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ def start(opts)
1616

1717
require_environment!(parsed_options)
1818

19+
ssl_opts = {}
20+
ssl_opts[:private_key_file] = '/Users/jbarnett/rapid7/goliath/key.pem'
21+
ssl_opts[:cert_chain_file] = '/Users/jbarnett/rapid7/goliath/cert.pem'
22+
ssl_opts[:verify_peer] = false
23+
opts[:ssl] = true
24+
opts[:ssl_opts] = ssl_opts
25+
1926
init_db
2027
start_http_server(opts)
2128
end
@@ -33,6 +40,10 @@ def start_http_server(opts)
3340
}
3441
}
3542

43+
if opts[:ssl] && opts[:ssl] = true
44+
server.ssl = true
45+
server.ssl_options = opts[:ssl_opts]
46+
end
3647
server.threaded = true
3748
end
3849
end

0 commit comments

Comments
 (0)