summaryrefslogtreecommitdiff
path: root/testing/hosts/winnetou/etc/openssl/generate-hash-and-url
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-02-23 10:34:14 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-02-23 10:34:14 +0000
commited7d79f96177044949744da10f4431c1d6242241 (patch)
tree3aabaa55ed3b5291daef891cfee9befb5235e2b8 /testing/hosts/winnetou/etc/openssl/generate-hash-and-url
parent7410d3c6d6a9a1cd7aa55083c938946af6ff9498 (diff)
downloadvyos-strongswan-ed7d79f96177044949744da10f4431c1d6242241.tar.gz
vyos-strongswan-ed7d79f96177044949744da10f4431c1d6242241.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.3.6)
Diffstat (limited to 'testing/hosts/winnetou/etc/openssl/generate-hash-and-url')
-rwxr-xr-xtesting/hosts/winnetou/etc/openssl/generate-hash-and-url13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/hosts/winnetou/etc/openssl/generate-hash-and-url b/testing/hosts/winnetou/etc/openssl/generate-hash-and-url
new file mode 100755
index 000000000..08208ed65
--- /dev/null
+++ b/testing/hosts/winnetou/etc/openssl/generate-hash-and-url
@@ -0,0 +1,13 @@
+#! /bin/bash
+#
+# generates the SHA-1 hash required by the RFC 4306
+# HASH_AND_URL certificate fetching scheme
+#
+
+for cert in $@
+do
+ openssl x509 -in $cert -outform der -out cert.der
+ hash=`sha1sum cert.der | awk '{ print $1 }'`
+ cp cert.der "$hash"
+done
+rm cert.der