00001
00002
00003
00004 #ifndef GLITE_SSLVERIFYCALLBACK_H
00005 #define GLITE_SSLVERIFYCALLBACK_H
00006 #define OPENSSL_NO_KRB5
00007
00008
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
00041
00042
00043
00044
00045
00046 static bool proxyCertificateOk(X509* certificate,
00047 X509_STORE_CTX *X509Context);
00048
00049
00050
00051
00052 static bool CRLCheckOk(X509* certificate,
00053 X509_STORE_CTX *X509StoreContext);
00054
00055
00056
00057
00058
00059
00060 static bool CRLValid(X509* certificate,
00061 X509_CRL* crl,
00062 X509_STORE_CTX *X509StoreContext);
00063
00064
00065
00066 static bool CertificateNotRevoked(X509* certificate,
00067 X509_CRL* crl,
00068 X509_STORE_CTX *X509StoreContext);
00069
00070
00071
00072
00073
00074 static bool signingPolicyCheckOk(X509* certificate,
00075 X509_STORE_CTX *X509StoreContext);
00076
00077 private:
00078
00079
00080 };
00081 }
00082 }
00083 #endif // GLITE_SSLVERIFYCALLBACK_H