Software /
code /
prosody
Comparison
prosodyctl @ 6405:61801dacc90b
prosodyctl: Use sha256 for certificate requests and self-signed certificates
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Sep 2014 00:10:29 +0200 |
parent | 6367:769a3577dd85 |
child | 6486:64146196b142 |
comparison
equal
deleted
inserted
replaced
6404:938cc782c14d | 6405:61801dacc90b |
---|---|
734 if ask_overwrite(req_filename) then | 734 if ask_overwrite(req_filename) then |
735 return nil, req_filename; | 735 return nil, req_filename; |
736 end | 736 end |
737 local _, key_filename = cert_commands.key({arg[1]}); | 737 local _, key_filename = cert_commands.key({arg[1]}); |
738 local _, conf_filename = cert_commands.config(arg); | 738 local _, conf_filename = cert_commands.config(arg); |
739 if openssl.req{new=true, key=key_filename, utf8=true, config=conf_filename, out=req_filename} then | 739 if openssl.req{new=true, key=key_filename, utf8=true, sha256=true, config=conf_filename, out=req_filename} then |
740 show_message("Certificate request written to ".. req_filename); | 740 show_message("Certificate request written to ".. req_filename); |
741 else | 741 else |
742 show_message("There was a problem, see OpenSSL output"); | 742 show_message("There was a problem, see OpenSSL output"); |
743 end | 743 end |
744 else | 744 else |
755 local _, key_filename = cert_commands.key({arg[1]}); | 755 local _, key_filename = cert_commands.key({arg[1]}); |
756 local _, conf_filename = cert_commands.config(arg); | 756 local _, conf_filename = cert_commands.config(arg); |
757 local ret; | 757 local ret; |
758 if key_filename and conf_filename and cert_filename | 758 if key_filename and conf_filename and cert_filename |
759 and openssl.req{new=true, x509=true, nodes=true, key=key_filename, | 759 and openssl.req{new=true, x509=true, nodes=true, key=key_filename, |
760 days=365, sha1=true, utf8=true, config=conf_filename, out=cert_filename} then | 760 days=365, sha256=true, utf8=true, config=conf_filename, out=cert_filename} then |
761 show_message("Certificate written to ".. cert_filename); | 761 show_message("Certificate written to ".. cert_filename); |
762 else | 762 else |
763 show_message("There was a problem, see OpenSSL output"); | 763 show_message("There was a problem, see OpenSSL output"); |
764 end | 764 end |
765 else | 765 else |