source: trunk/third/sendmail/contrib/link_hash.sh @ 19204

Revision 19204, 564 bytes checked in by zacheiss, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19203, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
RevLine 
[19203]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.1.1.1 2003-04-08 15:11:19 zacheiss Exp $
7##
8#
9# ln a certificate to its hash
10#
11SSL=openssl
12if test $# -ge 1
13then
14  for i in $@
15  do
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
26    fi
27  else
28    echo "$0: cannot open $C"
29    exit 2
30  fi
31  done
32else
33  echo "$0: missing name"
34  exit 1
35fi
36exit 0
Note: See TracBrowser for help on using the repository browser.