Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

SSLVerifyCallback.h

00001 /* Copyright (c) 2003 EU DataGrid. */
00002 /* For license conditions see http://www.eu-datagrid.org/license.html */
00003 
00004 #ifndef GLITE_SSLVERIFYCALLBACK_H
00005 #define GLITE_SSLVERIFYCALLBACK_H
00006 #define OPENSSL_NO_KRB5
00007 
00008 // OpenSSL types
00009 typedef struct X509_crl_st X509_CRL;
00010 typedef struct ssl_ctx_st SSL_CTX;
00011 typedef struct x509_st X509;
00012 typedef struct x509_store_ctx_st X509_STORE_CTX;
00013 
00014 namespace glite
00015 {
00016     namespace rgma
00017     {
00022         class SSLVerifyCallback
00023         {
00024 
00030             public:
00031 
00037                 static int main(int preverifyOk, X509_STORE_CTX *X509Context);
00038 
00039             private:
00040                 // Helper functions for certificateVerifyCallback
00041 
00042                 /*
00043                  * Return true if extra checks on proxy certificate pass, false if certificate
00044                  * not valid.
00045                  */
00046                 static bool proxyCertificateOk(X509* certificate,
00047                     X509_STORE_CTX *X509Context);
00048 
00049                 /*
00050                  * Return true if the certificate has not been revoked.
00051                  */
00052                 static bool CRLCheckOk(X509* certificate,
00053                     X509_STORE_CTX *X509StoreContext);
00054 
00055                 // CRLCheckOk uses the following helper functions:
00056 
00057                 /*
00058                  * Return true if the specified CRL looks OK.
00059                  */
00060                 static bool CRLValid(X509* certificate,
00061                     X509_CRL* crl,
00062                     X509_STORE_CTX *X509StoreContext);
00063                 /*
00064                  * Return true if the certificate is not listed on the CRL.
00065                  */
00066                 static bool CertificateNotRevoked(X509* certificate,
00067                     X509_CRL* crl,
00068                     X509_STORE_CTX *X509StoreContext);
00069 
00070                 /*
00071                  * Return true if the signing policy on the certificate is OK for RGMA's
00072                  * purposes.
00073                  */
00074                 static bool signingPolicyCheckOk(X509* certificate,
00075                     X509_STORE_CTX *X509StoreContext);
00076 
00077             private:
00078                 //static const class APILogging& cat;
00079 
00080         };
00081     }
00082 }
00083 #endif                                            // GLITE_SSLVERIFYCALLBACK_H

Generated on Thu May 11 19:23:43 2006 for glite-rgma-api-cpp by doxygen 1.3.5