c:\OpenSSL-Win64\bin>openssl req -new -key server.key -out server.csr Can't open C:\Program Files\Common Files\SSL/openssl.cnf for reading, No such file or directory 6440:error:02001003:system library:fopen:No such process:crypto\bio\bss_file.c:74:fopen('C:\Program Files\Common Files\SSL/openssl.cnf','r') 6440:error:2006D080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c:81: Enter pass phrase for server.key: unable to find 'distinguished_name' in config problems making Certificate Request 6440:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:crypto\conf\conf_lib.c:272:
D:\ssl>openssl genrsa -out server.key 4096 Generating RSA private key, 4096 bit long modulus ..............................................................................................................................................................................................................++ .................................................................................................++ e is 65537 (0x010001)
D:\ssl>openssl req -new -key server.key -out server.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:SC Locality Name (eg, city) []:ChengDu Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (e.g. server FQDN or YOUR name) []:troyyang Email Address []:yangzhoumemail@163.com
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
D:\ssl>x509 -req -days 730 -in server.csr -signkey server.key -out server.crt 'x509' is not recognized as an internal or external command, operable program or batch file.
D:\ssl>openssl x509 -req -days 730 -in server.csr -signkey server.key -out server.crt Signature ok subject=C = CN, ST = SC, L = ChengDu, O = Internet Widgits Pty Ltd, CN = troyyang, emailAddress = yangzhoumemail@163.com Getting Private key