Skip to content

Commit

Permalink
script for creating not-self-signed cert
Browse files Browse the repository at this point in the history
  • Loading branch information
conorpp committed Feb 10, 2017
1 parent d25edd1 commit f7d254d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/gencert/ca/ca_sign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

[[ "$#" != 4 ]] && echo "usage: $0 <private-key> <CA-cert> <signing-key> <output-cert>" && exit 1

# generate a "signing request"
openssl req -new -key "$1" -out "$1".csr

# CA sign the request
openssl x509 -req -in "$1".csr -CA "$2" -CAkey "$3" -out "$4" -set_serial 0


openssl x509 -in "$4" -outform der -out "$4".der

0 comments on commit f7d254d

Please sign in to comment.