1. Create a CA server
For more information, please refer to my other article: http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_linux_011_ca.html
1.1 Creating the necessary directories and files
mkdir CSR CRL Newcerts Touch echo>serial
1.2 Modifying the default configuration
[[email protected] ca]# vim/etc/pki/tls/openssl.cnf #编辑以下行, set default country, province, city, organization name, department name countryname_default = Cnstateorprovincename_default = Henanlocalityname_default = zhengzhouorganizationname_default = Zkytorganizationalunitname_default = Tech
1.3 Generating self-signed certificates
[Email protected] ca]# (umask077; OpenSSL genrsa-out Private/cakey.pem2048) generating RSA private key,2048BitLongModulus ..... ..... ..... ..... ..... ... .. ...........-.....-.......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ....... ....... ...........................+++...+++e is65537(0x10001) [[email protected] ca]# OpenSSL req-new-x509-key Private/cakey.pem-out Cacert.pem-days3650You is about to being asked to enter information that'll be Incorporatedinto your certificate request. What's about-to-enter is called a distinguished Name or a DN. There is quite a few fields but can leave some blankfor some fields there would be a default value,if you enter'.'The field would be a left blank.-----Country Name (2Letter Code) [Cn]:state or province name (full name) [henan]:locality name (eg, city) [zhengzhou]:organization name (eg, company) [Zkyt ]:organizational Unit name (eg, section) [Tech]:common name (eg, your name or your server's hostname) []:ca.linuxpanda.comEmail Address []:
HTTP to HTTPS via OpenSSL