Skip to content

Commit

Permalink
Merge pull request #1 from ilho-tiger/fix/generate_self_signed_on_win…
Browse files Browse the repository at this point in the history
…dows

fix: generate_self_signed/3 on Windows
  • Loading branch information
mworrell authored May 18, 2020
2 parents 31555ce + ad1487f commit ef96937
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zotonic_ssl_certs.erl
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ generate_self_signed(CertFile, PemFile, Options) ->
Command = "openssl req -x509 -nodes"
++ " -days 3650"
++ " -sha256"
++ " -subj '/CN=" ++ hostname(Options)
++ " -subj \"/CN=" ++ hostname(Options)
++"/O=" ++ servername(Options)
++"'"
++"\""
++ " -newkey rsa:"++?BITS++" "
++ " -keyout " ++ z_filelib:os_filename(KeyFile)
++ " -out " ++ z_filelib:os_filename(CertFile),
++ " -keyout \"" ++ string:strip(z_filelib:os_filename(KeyFile), both, $') ++ "\""
++ " -out \"" ++ string:strip(z_filelib:os_filename(CertFile), both, $') ++ "\"",
% error_logger:info_msg("SSL: ~p", [Command]),
Result = os:cmd(Command),
% error_logger:info_msg("SSL: ~p", [Result]),
Expand Down

0 comments on commit ef96937

Please sign in to comment.