diff options
author | Leif Johansson <leifj@sunet.se> | 2015-03-26 19:45:01 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2015-03-26 19:45:01 +0100 |
commit | d2dea9fe7ed5a358a1bc57d00aaecfff99a5fb03 (patch) | |
tree | 2a558542f7471a07135b86b67317dc5aeb01f048 /scripts/mkreq | |
parent | e51353aa07e1198948249d1fd3c0903370a7cc03 (diff) |
certification request for web-a1.sunet.se from ca.sunet.se:infra
Diffstat (limited to 'scripts/mkreq')
-rwxr-xr-x | scripts/mkreq | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/mkreq b/scripts/mkreq new file mode 100755 index 0000000..c73d598 --- /dev/null +++ b/scripts/mkreq @@ -0,0 +1,21 @@ +#!/bin/sh + +mkdir -p $1 +cat>/tmp/mkreq-$$.cf<<EOC +[ req ] +default_bits = 4096 +distinguished_name = req_distinguished_name +req_extensions = req_extensions +prompt = no + +[ req_distinguished_name ] +C = SE +O = SUNET +CN = $1 + +[ req_extensions ] +subjectAltName = DNS:$1 +EOC + +openssl req -config /tmp/mkreq-$$.cf -new -newkey rsa:4096 -sha1 -keyout $1/$1.key -nodes -out $1/$1.csr +rm /tmp/mkreq-$$.cf |