Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/http-server
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ function listen(port) {

if (!fs.existsSync(defaultCertPath)) {
log('Generating and using default cert and key files in: '.yellow + __dirname.cyan);
exec('openssl genrsa -out ' + defaultKeyPath + ' 4096', function(err) {
exec('openssl genrsa -out "' + defaultKeyPath + '" 4096', function(err) {
handleCreatingCertError(err);
err || exec('openssl req -new -key ' + defaultKeyPath + ' -out ' + defaultCSRPath +
' -subj "/C=US/ST=California/L=San Francisco/O=Local-Company' +
err || exec('openssl req -new -key "' + defaultKeyPath + '" -out "' + defaultCSRPath +
'" -subj "/C=US/ST=California/L=San Francisco/O=Local-Company' +
'/OU=dev/CN=localhost/[email protected]"', function(err) {

handleCreatingCertError(err);
err || exec('openssl x509 -req -days 1000 -in ' + defaultCSRPath + ' -signkey ' +
defaultKeyPath + ' -out ' + defaultCertPath, function(err) {
err || exec('openssl x509 -req -days 1000 -in "' + defaultCSRPath + '" -signkey "' +
defaultKeyPath + '" -out "' + defaultCertPath + '"', function(err) {

handleCreatingCertError(err);
err || createServer();
Expand Down