diff --git a/src/cred/DelegCred.cpp b/src/cred/DelegCred.cpp
index e0f593205e7d18ffdd9d7c1a55b047f7e3b9871d..ca7bac6b750b6ca2bf93d6b7973c652e749cbe5d 100644
--- a/src/cred/DelegCred.cpp
+++ b/src/cred/DelegCred.cpp
@@ -189,7 +189,7 @@ bool DelegCred::isValidProxy(const std::string& filename, std::string& message)
             return false;
         }
 
-     else if(minValidityTime() >= (unsigned long)voms_lifetime)
+     else if( (voms_lifetime > 0) && (minValidityTime() >= (unsigned long)voms_lifetime))
         {
             message = " VO extensions for certificate ";
             message += filename;