blob: c73d598ff9da35f128203712fe483bdf3d6f91f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|