00001 #ifndef __CRYPTO_X509CRL_H__ 00002 #define __CRYPTO_X509CRL_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d C r y p t o X 5 0 9 C r l . h h */ 00006 /* */ 00007 /* (c) 2005 G. Ganis , CERN */ 00008 /* */ 00009 /* This file is part of the XRootD software suite. */ 00010 /* */ 00011 /* XRootD is free software: you can redistribute it and/or modify it under */ 00012 /* the terms of the GNU Lesser General Public License as published by the */ 00013 /* Free Software Foundation, either version 3 of the License, or (at your */ 00014 /* option) any later version. */ 00015 /* */ 00016 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 00017 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 00018 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 00019 /* License for more details. */ 00020 /* */ 00021 /* You should have received a copy of the GNU Lesser General Public License */ 00022 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 00023 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 00024 /* */ 00025 /* The copyright holder's institutional names and contributor's names may not */ 00026 /* be used to endorse or promote products derived from this software without */ 00027 /* specific prior written permission of the institution or contributor. */ 00028 /* */ 00029 /******************************************************************************/ 00030 00031 /* ************************************************************************** */ 00032 /* */ 00033 /* Abstract interface for X509 CRLs . */ 00034 /* Allows to plug-in modules based on different crypto implementation */ 00035 /* (OpenSSL, Botan, ...) */ 00036 /* */ 00037 /* ************************************************************************** */ 00038 00039 #include "XrdCrypto/XrdCryptoX509.hh" 00040 00041 typedef void * XrdCryptoX509Crldata; 00042 00043 // ---------------------------------------------------------------------------// 00044 // 00045 // X509 CRL interface 00046 // Describes one CRL certificate 00047 // 00048 // ---------------------------------------------------------------------------// 00049 class XrdCryptoX509Crl { 00050 public: 00051 00052 XrdCryptoX509Crl() { } 00053 virtual ~XrdCryptoX509Crl() { } 00054 00055 // Status 00056 virtual bool IsValid(); 00057 virtual bool IsExpired(int when = 0); // Expired 00058 00059 // Access underlying data (in opaque form: used in chains) 00060 virtual XrdCryptoX509Crldata Opaque(); 00061 00062 // Dump information 00063 virtual void Dump(); 00064 virtual const char *ParentFile(); 00065 00066 // Validity interval 00067 virtual time_t LastUpdate(); // time when last updated 00068 virtual time_t NextUpdate(); // time foreseen for next update 00069 00070 // Issuer of top certificate 00071 virtual const char *Issuer(); 00072 virtual const char *IssuerHash(int); // hash 00073 const char *IssuerHash() { return IssuerHash(0); } // hash 00074 00075 // Chec certificate revocation 00076 virtual bool IsRevoked(int serialnumber, int when); 00077 virtual bool IsRevoked(const char *sernum, int when); 00078 00079 // Verify signature 00080 virtual bool Verify(XrdCryptoX509 *ref); 00081 00082 }; 00083 00084 #endif