]>
gitweb.pimeys.fr Git - config-20-100.git/blob - .zsh/rc/extra/20_ssl_tools
3 ssl_hashes
=( sha512 sha256 sha1 md5
)
5 for sh
in ${ssl_hashes}; do
9 printf 'usage: %s <file>\n' "ssh-cert-${sh}"
12 openssl x509
-noout -fingerprint -${sh} -in $1
16 ssl-cert-fingerprints
() {
20 printf 'usage: ssl-cert-fingerprints <file>\n'
23 for i
in ${ssl_hashes}
31 printf 'usage: ssl-cert-info <file>\n'
34 openssl x509
-noout -text -in $1
35 ssl-cert-fingerprints
$1
38 # I hate lacking backward compatibility, so provide an alternative therefore
39 if ! check_com
-c apache2-ssl-certificate
; then
41 apache2-ssl-certificate
() {
43 print
'Debian does not ship apache2-ssl-certificate anymore (see #398520). :('
44 print
'You might want to take a look at Debian the package ssl-cert as well.'
45 print
'To generate a certificate for use with apache2 follow the instructions:'
49 export RANDFILE=/dev/random
50 mkdir /etc/apache2/ssl/
51 openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem
52 chmod 600 /etc/apache2/ssl/apache.pem
54 Run "grml-tips ssl-certificate" if you need further instructions.