DEB packaging of Comarch Crypto Provider from ePUAP
Jacek Kowalski
2017-07-12 11f0bfe0b2c55127c8914e8a15f8c7d879a9ccdb
commit | author | age
11f0bf 1 #!/bin/bash
JK 2
3 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
4
5     INSTALLDIR="/usr/local/ComarchCryptoProvider"
6     
7     echo "Generating self-signed certificate for localhost..."
8     openssl genrsa -out ${INSTALLDIR}/certs/CCP-key-server.pem
9     openssl req -x509 -sha256 -days 1000   \
10         -config "${INSTALLDIR}/openssl.cnf" \
11         -subj "/CN=localhost/O=ComarchCryptoProvider" \
12         -key "${INSTALLDIR}/certs/CCP-key-server.pem" \
13         -out "${INSTALLDIR}/certs/CCP-cert-server.pem"
14     
15     echo "Trust this self-signed certificate..."
16     cp "${INSTALLDIR}/certs/CCP-cert-server.pem"     "/usr/local/share/ca-certificates/CCP-cert-server.crt"
17     
18     dpkg-trigger update-ca-certificates-fresh
19
20 fi
21
22 #DEBHELPER#