maintain/SSL: generate_certificate_request.sh

File generate_certificate_request.sh, 644 bytes (added by slavazanko, 12 years ago)
Line 
1#!/bin/bash
2
3DOMAIN_NAME="www.midnight-commander.org"
4
5expect -c '
6set timeout -1
7spawn openssl req -new -key midnight-commander.org.key -out midnight-commander.org.csr
8match_max 100000
9expect "Country Name"
10send -- "MC\r"
11expect "State or Province Name"
12send -- "'${DOMAIN_NAME}'\r"
13expect "Locality Name"
14send -- "'${DOMAIN_NAME}'\r"
15expect "Organization Name"
16send -- "'${DOMAIN_NAME}'\r"
17expect "Organizational Unit Name"
18send -- "'${DOMAIN_NAME}'\r"
19expect "Common Name"
20send -- "'${DOMAIN_NAME}'\r"
21expect "Email Address"
22send -- "\r"
23expect "A challenge password"
24send -- "\r"
25expect "An optional company name"
26send -- "\r"
27expect eof
28'