Guest User

Untitled

a guest
Nov 21st, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #Generate private key for CA
  2. openssl genrsa -des3 -out aem.key 2048
  3.  
  4. #Generate certificate for CA
  5. openssl req -x509 -new -nodes -key aem.key -sha256 -days 3650 -out aem.pem
  6.  
  7. #Generate private key for Server
  8. openssl genrsa -out author-aem.key 2048
  9.  
  10. #Generate certificate request
  11. openssl req -new -key author-aem.key -out author-aem.csr
  12.  
  13. #Create certificate extension file
  14. echo "authorityKeyIdentifier=keyid,issuer" > author-aem.ext
  15. echo "basicConstraints=CA:FALSE" >> author-aem.ext
  16. echo "keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment" >> author-aem.ext
  17. echo "subjectAltName = @alt_names" >> author-aem.ext
  18. echo "" >> author-aem.ext
  19. echo "[alt_names]" >> author-aem.ext
  20. echo "DNS.1 = author.local" >> author-aem.ext
  21. echo "DNS.2 = www.author.local" >> author-aem.ext
  22.  
  23. #Create certificate signed with CA for Server
  24. openssl x509 -req -in author-aem.csr -CA aem.pem -CAkey aem.key -CAcreateserial -out author-aem.crt -days 3650 -sha256 -extfile author-aem.ext
  25.  
  26. #Convert private key to der format to use it in AEM
  27. openssl pkcs8 -topk8 -inform PEM -outform DER -in author-aem.key -out author-aem.key.der -nocrypt
Add Comment
Please, Sign In to add comment