XrdCryptosslFactory.hh

Go to the documentation of this file.
00001 // $Id: XrdCryptosslFactory.hh 28154 2009-04-08 12:40:52Z ganis $
00002 #ifndef __CRYPTO_SSLFACTORY_H__
00003 #define __CRYPTO_SSLFACTORY_H__
00004 /******************************************************************************/
00005 /*                                                                            */
00006 /*               X r d C r y p t o S s l F a c t o r y . h h                  */
00007 /*                                                                            */
00008 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University  */
00009 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00010 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00011 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00012 /******************************************************************************/
00013 
00014 /* ************************************************************************** */
00015 /*                                                                            */
00016 /* Implementation of the OpenSSL crypto factory                               */
00017 /*                                                                            */
00018 /* ************************************************************************** */
00019 
00020 #ifndef __CRYPTO_FACTORY_H__
00021 #include "XrdCrypto/XrdCryptoFactory.hh"
00022 #endif
00023 
00024 int DebugON = 1;
00025 
00026 // The ID must be a unique number
00027 #define XrdCryptosslFactoryID  1
00028 
00029 class XrdCryptosslFactory : public XrdCryptoFactory 
00030 {
00031 public:
00032    XrdCryptosslFactory();
00033    virtual ~XrdCryptosslFactory() { }
00034 
00035    // Set trace flags
00036    void SetTrace(kXR_int32 trace);
00037 
00038    // Hook to Key Derivation Function (PBKDF2)
00039    XrdCryptoKDFunLen_t KDFunLen(); // Default Length of buffer
00040    XrdCryptoKDFun_t KDFun();
00041 
00042    // Cipher constructors
00043    bool SupportedCipher(const char *t);
00044    XrdCryptoCipher *Cipher(const char *t, int l = 0);
00045    XrdCryptoCipher *Cipher(const char *t, int l, const char *k,
00046                                           int liv, const char *iv);
00047    XrdCryptoCipher *Cipher(XrdSutBucket *b);
00048    XrdCryptoCipher *Cipher(int bits, char *pub, int lpub, const char *t = 0);
00049    XrdCryptoCipher *Cipher(const XrdCryptoCipher &c);
00050 
00051    // MsgDigest constructors
00052    bool SupportedMsgDigest(const char *dgst);
00053    XrdCryptoMsgDigest *MsgDigest(const char *dgst);
00054 
00055    // RSA constructors
00056    XrdCryptoRSA *RSA(int bits = XrdCryptoDefRSABits, int exp = XrdCryptoDefRSAExp);
00057    XrdCryptoRSA *RSA(const char *pub, int lpub = 0);
00058    XrdCryptoRSA *RSA(const XrdCryptoRSA &r);
00059 
00060    // X509 constructors
00061    XrdCryptoX509 *X509(const char *cf, const char *kf = 0);
00062    XrdCryptoX509 *X509(XrdSutBucket *b);
00063 
00064    // X509 CRL constructor
00065    XrdCryptoX509Crl *X509Crl(const char *crlfile, int opt = 0);
00066    XrdCryptoX509Crl *X509Crl(XrdCryptoX509 *cacert);
00067 
00068    // X509 REQ constructors
00069    XrdCryptoX509Req *X509Req(XrdSutBucket *bck);
00070 
00071    // Hooks to handle X509 certificates
00072    XrdCryptoX509VerifyCert_t X509VerifyCert();
00073    XrdCryptoX509VerifyChain_t X509VerifyChain();
00074    XrdCryptoX509ParseFile_t X509ParseFile();
00075    XrdCryptoX509ParseBucket_t X509ParseBucket();
00076    XrdCryptoX509ExportChain_t X509ExportChain();
00077    XrdCryptoX509ChainToFile_t X509ChainToFile();
00078 };
00079 
00080 #endif

Generated on Tue Jul 5 14:46:33 2011 for ROOT_528-00b_version by  doxygen 1.5.1