00001 #ifndef __CRYPTO_SSLFACTORY_H__
00002 #define __CRYPTO_SSLFACTORY_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef __CRYPTO_FACTORY_H__
00038 #include "XrdCrypto/XrdCryptoFactory.hh"
00039 #endif
00040
00041 #include "XrdSys/XrdSysPthread.hh"
00042
00043 int DebugON = 1;
00044
00045
00046 #define XrdCryptosslFactoryID 1
00047
00048 #define SSLFACTORY_MAX_CRYPTO_MUTEX 256
00049
00050 class XrdCryptosslFactory : public XrdCryptoFactory
00051 {
00052 public:
00053 XrdCryptosslFactory();
00054 virtual ~XrdCryptosslFactory() { }
00055
00056
00057 void SetTrace(kXR_int32 trace);
00058
00059
00060 XrdCryptoKDFunLen_t KDFunLen();
00061 XrdCryptoKDFun_t KDFun();
00062
00063
00064 bool SupportedCipher(const char *t);
00065 bool HasPaddingSupport();
00066 XrdCryptoCipher *Cipher(const char *t, int l = 0);
00067 XrdCryptoCipher *Cipher(const char *t, int l, const char *k,
00068 int liv, const char *iv);
00069 XrdCryptoCipher *Cipher(XrdSutBucket *b);
00070 XrdCryptoCipher *Cipher(int bits, char *pub, int lpub, const char *t = 0);
00071 XrdCryptoCipher *Cipher(bool padded, int bits, char *pub, int lpub, const char *t = 0);
00072 XrdCryptoCipher *Cipher(const XrdCryptoCipher &c);
00073
00074
00075 bool SupportedMsgDigest(const char *dgst);
00076 XrdCryptoMsgDigest *MsgDigest(const char *dgst);
00077
00078
00079 XrdCryptoRSA *RSA(int bits = XrdCryptoDefRSABits, int exp = XrdCryptoDefRSAExp);
00080 XrdCryptoRSA *RSA(const char *pub, int lpub = 0);
00081 XrdCryptoRSA *RSA(const XrdCryptoRSA &r);
00082
00083
00084 XrdCryptoX509 *X509(const char *cf, const char *kf = 0);
00085 XrdCryptoX509 *X509(XrdSutBucket *b);
00086
00087
00088 XrdCryptoX509Crl *X509Crl(const char *crlfile, int opt = 0);
00089 XrdCryptoX509Crl *X509Crl(XrdCryptoX509 *cacert);
00090
00091
00092 XrdCryptoX509Req *X509Req(XrdSutBucket *bck);
00093
00094
00095 XrdCryptoX509VerifyCert_t X509VerifyCert();
00096 XrdCryptoX509VerifyChain_t X509VerifyChain();
00097 XrdCryptoX509ParseFile_t X509ParseFile();
00098 XrdCryptoX509ParseStack_t X509ParseStack();
00099 XrdCryptoX509ParseBucket_t X509ParseBucket();
00100 XrdCryptoX509ExportChain_t X509ExportChain();
00101 XrdCryptoX509ChainToFile_t X509ChainToFile();
00102
00103
00104 XrdCryptoProxyCertInfo_t ProxyCertInfo();
00105 XrdCryptoSetPathLenConstraint_t SetPathLenConstraint();
00106 XrdCryptoX509CreateProxy_t X509CreateProxy();
00107 XrdCryptoX509CreateProxyReq_t X509CreateProxyReq();
00108 XrdCryptoX509SignProxyReq_t X509SignProxyReq();
00109 XrdCryptoX509CheckProxy3_t X509CheckProxy3();
00110 XrdCryptoX509GetVOMSAttr_t X509GetVOMSAttr();
00111
00112
00113 static XrdSysMutex* CryptoMutexPool[SSLFACTORY_MAX_CRYPTO_MUTEX];
00114
00115 };
00116
00117 #endif