Index: pkgdata/pkg_data_src.gpt.in
===================================================================
RCS file: /home/globdev/CVS/globus-packages/gsi/cert_utils/source/pkgdata/pkg_data_src.gpt.in,v
retrieving revision 1.48.6.7
diff -u -r1.48.6.7 pkg_data_src.gpt.in
--- pkgdata/pkg_data_src.gpt.in	3 Dec 2007 17:12:22 -0000	1.48.6.7
+++ pkgdata/pkg_data_src.gpt.in	1 Oct 2008 13:17:13 -0000
@@ -3,7 +3,7 @@
 
 <gpt_package_metadata Name="globus_gsi_cert_utils" Format_Version="0.01">
 
-    <Aging_Version Major="2" Minor="11" Age="1"/>
+    <Aging_Version Major="2" Minor="12" Age="1"/>
     <Description> Globus GSI Cert Utils Library</Description>
     <Functional_Group >Security</Functional_Group>
     <Version_Stability Release="Experimental" Dirt="@DIRT_TIMESTAMP@-@DIRT_BRANCH_ID@"/>
Index: programs/grid-cert-info.in
===================================================================
RCS file: /home/globdev/CVS/globus-packages/gsi/cert_utils/source/programs/grid-cert-info.in,v
retrieving revision 1.9.4.1
diff -u -r1.9.4.1 grid-cert-info.in
--- programs/grid-cert-info.in	3 Dec 2007 17:12:23 -0000	1.9.4.1
+++ programs/grid-cert-info.in	1 Oct 2008 13:17:13 -0000
@@ -89,6 +89,27 @@
     fi
 }
 
+certificate_format()
+{
+    testfile="$1"
+    _format=''
+
+    if test "$testfile" = ""; then
+        :
+    elif echo "$certfile" | grep '\.p12$' > /dev/null 2>&1 ; then
+        _format=pkcs12
+    elif echo "$certfile" | grep '\.pem$' > /dev/null 2>&1 ; then
+        _format=x509
+    elif grep -- '-----BEGIN' "$testfile" > /dev/null 2>&1 ; then
+        _format="x509"
+    else
+        :
+    fi
+
+    echo $_format
+}
+
+
 globus_source $libexecdir/globus-args-parser-header $@
 
 
@@ -141,16 +162,10 @@
     shift
 done
 
-if test "$certfile" = ""; then
+cert_format=`certificate_format "$certfile"`
+if test "$cert_format" = ""; then
     echo "Error: Cannot locate certificate" 1>&2
     exit 1;
-elif echo "$certfile" | grep '\.p12' > /dev/null 2>&1 ; then
-    cert_format=pkcs12
-elif echo "$certfile" | grep '\.pem' > /dev/null 2>&1 ; then
-    cert_format=x509
-else
-    echo "Error: certificate file \"$certfile\" is not .pem or .p12" 1>&2
-    exit 1;
 fi
 
 if [ "X$toprint" = "X" ]; then

