Forum

how to generate the https certification file

godguy
7 October 2008, 10:55
hi:
i use hiawatha execute file "mkcert" to generate the https certification file then user can use this certification file to access website by https.
when i use mkcert to generate the file. we must input some parameters one by one. how can i do it use an single cli, for example:
"mkcert AU godguy@163.com"

in the old way. we must input some parameters like that:
Generating RSA private key, 2048 bit long modulus
..........+++
......+++
e is 65537 (0x10001)
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]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:

can you help me?

:D
Hugo Leisink
7 October 2008, 11:07
What 'mkcert' does is call OpenSSL with the right parameters. So, if you want to create a certificate with just a single command, OpenSSL has to be able to handle the command line parameters. In the past, I've also been looking for this, but haven't found anything. So, I guess OpenSSL is not able to create a certificate with a single command.

I guess the only way to do it is to write your own tool which uses the libssl API to create a certificate base on the parameters.
godguy
9 October 2008, 11:38
o, thanks!
This topic has been closed.