good
This commit is contained in:
20
sign-certificate.sh
Normal file
20
sign-certificate.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
csr-file="$1"
|
||||
config-file="$2"
|
||||
file-name="$3"
|
||||
|
||||
file-name=$(basename ${file-name} .csr)
|
||||
|
||||
ca-cer-path="/etc/ssl/CA/ca.crt"
|
||||
ca-key-path="/etc/ssl/CA/ca.key"
|
||||
|
||||
signed-cert-path="/var/www/html/certs/${file-name}.crt"
|
||||
|
||||
passphrase="azerty"
|
||||
|
||||
echo " * Start"
|
||||
|
||||
openssl x509 -req -in "${csr-file}" -CA "${ca-cer-path}" -CAkey "${ca-key-path}" -out "${signed-cert-path}" -days 365 -extfile "${config-file}" -extensions v3_req -passin "${passphrase}"
|
||||
|
||||
echo " * End ${signed-cert-path}"
|
||||
Reference in New Issue
Block a user