* New version 2.24
[alpine.git] / libressl / doit.sh
blobeee96db49c9d2d1ae992a4e5d0c47748d3c1ed9d
1 #!/bin/sh
2 ME=`whoami`
3 HERE=`pwd`
4 LOF="$HERE/ListOfCerts.txt"
5 rm -f $LOF
6 if test ! -d certs ; then
7 mkdir certs
8 fi
10 SSLDIR=`openssl version -d | awk '{ printf $2 }' | sed 's/"//g'`
11 CERTDIR="$SSLDIR/certs"
12 cd $CERTDIR
13 ls -1 *pem > $LOF
15 while read LINE ; do
16 echo $LINE
17 HASH=`openssl x509 -subject_hash -in $CERTDIR/$LINE -noout`
18 cp $CERTDIR/$LINE $HERE/certs/$HASH.0; chmod 600 $HERE/certs/$HASH.0
19 cp $CERTDIR/$LINE $HERE/certs ; chmod 600 $HERE/certs/$LINE
20 done < $LOF
21 rm -f $LOF