Changeset 324

Show
Ignore:
Timestamp:
08/12/08 08:32:52 (3 months ago)
Author:
ludovic.rousseau
Message:

protect variables with "" before checking the variable length

Patch from Huie-Ying Lee
http://www.opensc-project.org/pipermail/opensc-devel/2008-August/011239.html

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tools/make_hash_link.sh

    r233 r324  
    5353for file in *; do 
    5454  hash=`$OPENSSL x509 -inform pem -in $file -noout -hash 2> /dev/null` 
    55   if [ ! -z $hash ]; then 
     55  if [ ! -z "$hash" ]; then 
    5656    is_ca=`$OPENSSL x509 -inform pem -in $file -noout -text | grep 'CA:TRUE'` 
    57     if [ ! -z $is_ca ]; then 
     57    if [ ! -z "$is_ca" ]; then 
    5858      hash=$hash. 
    5959      mk_link 
     
    6262  fi 
    6363  hash=`$OPENSSL x509 -inform der -in $file -noout -hash 2> /dev/null` 
    64   if [ ! -z $hash ]; then 
     64  if [ ! -z "$hash" ]; then 
    6565    is_ca=`$OPENSSL x509 -inform der -in $file -noout -text | grep 'CA:TRUE'` 
    66     if [ ! -z $is_ca ]; then 
     66    if [ ! -z "$is_ca" ]; then 
    6767      hash=$hash. 
    6868      mk_link 
     
    7171  fi 
    7272  hash=`$OPENSSL crl -inform pem -in $file -noout -hash 2> /dev/null` 
    73   if [ ! -z $hash ]; then 
     73  if [ ! -z "$hash" ]; then 
    7474    hash=$hash.r 
    7575    mk_link 
     
    7777  fi 
    7878  hash=`$OPENSSL crl -inform der -in $file -noout -hash 2> /dev/null` 
    79   if [ ! -z $hash ]; then 
     79  if [ ! -z "$hash" ]; then 
    8080    hash=$hash.r 
    8181    mk_link