Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. openssl genrsa -des3 -out "$1.key" 2048
  4. openssl req -new -key "$1.key" -out "$1.csr" -subj "/C=RU/ST=RU/L=Moscow/O=SPLAT/OU=IT/CN=$1/emailAddress=$1@splat.ru" -passin pass:1111 -passout pass:1111
  5. openssl x509 -req -days 3650 -in "$1.csr" -CA ./demoCA/cacert.pem -CAkey ./demoCA/private/cakey.pem -set_serial 01 -out "$1.crt"
  6. openssl pkcs12 -export -clcerts -in "$1.crt" -inkey "$1.key" -out "$1.p12" -passin pass:1111 -passout pass:1111
  7.  
  8. #openssl x509 -noout -text -in server.crt -purpose
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement