Avatar of tonelm54
tonelm54
 asked on

Generate Self Signed Certificate

Ive been generating self-signed certificates by using the following command:-
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

And then answer a series of questions:-
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 (e.g. server FQDN or YOUR name) []:
Email Address []:

Which works great, however I want to avoid having to type in  the answers. So my question is:-
Is it possible to enter these questions in the command line, or pass a file in with the answers?

What Im trying to do is build my own hosting admin page, and allow users to generate their own self certified SSL certificates on my ubuntu server, then add the certificates to the vHost configurations of apache.
SSL / HTTPSApache Web Server

Avatar of undefined
Last Comment
Mark Bullock

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mark Bullock

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes