common cvs-import.sh,1.20,1.21
Jeremy Katz (katzj)
fedora-extras-commits at redhat.com
Wed May 16 20:30:17 UTC 2007
Author: katzj
Update of /cvs/pkgs/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6186
Modified Files:
cvs-import.sh
Log Message:
Add patch from Andreas Thienemann (andreas AT bawue DOT net) to check
for certificate validity
Index: cvs-import.sh
===================================================================
RCS file: /cvs/pkgs/common/cvs-import.sh,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- cvs-import.sh 2 Apr 2007 19:04:49 -0000 1.20
+++ cvs-import.sh 16 May 2007 20:29:46 -0000 1.21
@@ -22,6 +22,20 @@
echo " from https://admin.fedora.redhat.com/accounts/" >&2
exit 1
fi
+
+# Check that the ssl certificate is not already expired or expiring in the
+# next 10 minutes
+OPENSSL=$(which openssl 2>/dev/null)
+if [ -x ${OPENSSL} ]; then
+ ${OPENSSL} x509 -checkend 6000 -noout -in ${HOME}/.fedora.cert
+ if [ $? -ne 0 ]; then
+ echo "ERROR: Your Fedora client-side certificate expired." >&2
+ echo " You need to download a new client-side certificate" >&2
+ echo " from https://admin.fedora.redhat.com/accounts/" >&2
+ exit 1
+ fi
+fi
+
# use the CVSROOT from the checkout
CVSROOT=$(cat ${MYDIR}/CVS/Root)
More information about the fedora-extras-commits
mailing list