refreshed carolCert-ocsp.pem
[strongswan.git] / testing / hosts / winnetou / etc / openssl / generate-hash-and-url
1 #! /bin/bash
2 #
3 # generates the SHA-1 hash required by the RFC 4306 
4 # HASH_AND_URL certificate fetching scheme
5 #
6
7 for cert in $@
8 do
9   openssl x509 -in $cert -outform der -out cert.der
10   hash=`sha1sum cert.der | awk '{ print $1 }'`
11   cp cert.der "$hash"
12 done
13 rm cert.der