MFC: An off-by-one malloc size was corrupting the installer's memory,
[dragonfly.git] / contrib / sendmail-8.14 / contrib / link_hash.sh
blob843c920d62c28cb99101204161921a73898e01c6
1 #!/bin/sh
2 ##
3 ## Copyright (c) 2000 Sendmail, Inc. and its suppliers.
4 ## All rights reserved.
5 ##
6 ## $Id: link_hash.sh,v 1.2 2000/04/25 00:12:28 ca Exp $
7 ##
9 # ln a certificate to its hash
11 SSL=openssl
12 if test $# -ge 1
13 then
14 for i in $@
16 C=$i.pem
17 test -f $C || C=$i
18 if test -f $C
19 then
20 H=`$SSL x509 -noout -hash < $C`.0
21 if test -h $H -o -f $H
22 then
23 echo link $H to $C exists
24 else
25 ln -s $C $H
27 else
28 echo "$0: cannot open $C"
29 exit 2
31 done
32 else
33 echo "$0: missing name"
34 exit 1
36 exit 0