Skip to content

Instantly share code, notes, and snippets.

@noname007
Last active May 17, 2017 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noname007/b358c44ea247a1db806d40d56fd7965e to your computer and use it in GitHub Desktop.
Save noname007/b358c44ea247a1db806d40d56fd7965e to your computer and use it in GitHub Desktop.
构建https证书
1030 cat /etc/pki/tls/openssl.cnf
# For the CA policy
[ policy_match ]
countryName = match
stateOrProvinceName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
1024 sudo openssl genrsa -out private/cakey.pem 2048
1025 sudo su
981 openssl req -new -x509 -key private/cakey.pem -out cacert.pem
985 openssl genrsa -out nginx.key 2048
986 openssl req -new -key nginx.key -out nginx.csr
988 openssl ca -in nginx.csr -out nginx.crt
991 vi /etc/pki/tls/openssl.cnf
992 touch index.txt
996 echo 00 > /etc/pki/CA/serial
997 openssl ca -in nginx.csr -out nginx.crt
@noname007
Copy link
Author

@noname007
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment