自建证书

   Country Name(国家): CN
    State or Province Name(省份):Guangdong
    Locality Name(城市):Shenzhen
    Organization Name(公司):Shen Zhen iBOXPAY Information Technology Co.,Ltd
    Organizational Unit Name(部门):ITOM
    Common Name(主机名):www.iboxpay.com
    Email Address(邮箱地址):keenwang@iboxpay.com

        Subject: C=CN, ST=Guangdong, L=Shenzhen, O=Shen Zhen iBOXPAY Information Technology Co,Ltd, OU=ITOM, CN=www.iboxpay.com/emailAddress=keenwang@iboxpay.com


ca自签证书
touch index.txt
echo 00 >serial

openssl genrsa -out private/cakey.pem 2048

openssl req -new -x509 -key private/cakey.pem -out cacert.pem
    Country Name(国家): CN
    State or Province Name(省份):Guangdong
    Locality Name(城市):Shenzhen
    Organization Name(公司):Shen Zhen iBOXPAY Information Technology Co,Ltd
    Organizational Unit Name(部门):ITOM
    Common Name(主机名):www.iboxpay.com
    Email Address(邮箱地址):keenwang@iboxpay.com

为web生成证书

openssl genrsa -out private/server.key 2048
openssl req -new -key  private/server.key -out server.csr(证书申请请求)
前面都一样,但是cn不一样,必须是server的名字

openssl ca  -in server.csr -out server.crt -days 3650