summaryrefslogtreecommitdiff
path: root/libressl/doit.sh
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-08-12 22:34:43 -0600
committerEduardo Chappa <chappa@washington.edu>2018-08-12 22:34:43 -0600
commit9449b23bbca71471a64f914b4bc7ec7d810e587f (patch)
tree12e119c0e389546892ae4bc4df82980cda4d6ffe /libressl/doit.sh
parentabcd5fe37b31b2e13907893f70a9e411dcf5e295 (diff)
downloadalpine-9449b23bbca71471a64f914b4bc7ec7d810e587f.tar.xz
* Several changes to the compilation of Alpine in Windows to use
LibreSSL in connecting to external servers. This complements the changes to support S/MIME. In particular, we add support for validation of certificates by using C:\\libressl\ssl\certs as the place to save CA certificates. In order to help users, some certificates are distributed. TODO: Kerberos port, w2k.
Diffstat (limited to 'libressl/doit.sh')
-rwxr-xr-xlibressl/doit.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/libressl/doit.sh b/libressl/doit.sh
new file mode 100755
index 00000000..7ab81471
--- /dev/null
+++ b/libressl/doit.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+ME=`whoami`
+HERE=`pwd`
+LOF="$HERE/ListOfCerts.txt"
+rm -f $LOF
+if test ! -d certs ; then
+ mkdir certs
+fi
+
+SSLDIR=`openssl version -d | awk '{ printf $2 }' | sed 's/"//g'`
+CERTDIR="$SSLDIR/certs"
+cd $CERTDIR
+ls -1 *pem > $LOF
+
+while read LINE ; do
+ echo $LINE
+ HASH=`openssl x509 -subject_hash -in $CERTDIR/$LINE -noout`
+ cp $CERTDIR/$LINE $HERE/certs/$HASH.0; chmod 600 $HERE/certs/$HASH.0
+ cp $CERTDIR/$LINE $HERE/certs ; chmod 600 $HERE/certs/$LINE
+done < $LOF
+rm -f $LOF
+