xrootd
XrdCryptosslFactory.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef __CRYPTO_SSLFACTORY_H__
3 #define __CRYPTO_SSLFACTORY_H__
4 /******************************************************************************/
5 /* */
6 /* X r d C r y p t o S s l F a c t o r y . h h */
7 /* */
8 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
9 /* All Rights Reserved. See XrdInfo.cc for complete License Terms */
10 /* Produced by Andrew Hanushevsky for Stanford University under contract */
11 /* DE-AC03-76-SFO0515 with the Department of Energy */
12 /******************************************************************************/
13 
14 /* ************************************************************************** */
15 /* */
16 /* Implementation of the OpenSSL crypto factory */
17 /* */
18 /* ************************************************************************** */
19 
20 #ifndef __CRYPTO_FACTORY_H__
22 #endif
23 
24 #include "XrdSys/XrdSysPthread.hh"
25 
26 int DebugON = 1;
27 
28 // The ID must be a unique number
29 #define XrdCryptosslFactoryID 1
30 
31 #define SSLFACTORY_MAX_CRYPTO_MUTEX 256
32 
34 {
35 public:
37  virtual ~XrdCryptosslFactory() { }
38 
39  // Set trace flags
40  void SetTrace(kXR_int32 trace);
41 
42  // Hook to Key Derivation Function (PBKDF2)
43  XrdCryptoKDFunLen_t KDFunLen(); // Default Length of buffer
45 
46  // Cipher constructors
47  bool SupportedCipher(const char *t);
48  XrdCryptoCipher *Cipher(const char *t, int l = 0);
49  XrdCryptoCipher *Cipher(const char *t, int l, const char *k,
50  int liv, const char *iv);
52  XrdCryptoCipher *Cipher(int bits, char *pub, int lpub, const char *t = 0);
54 
55  // MsgDigest constructors
56  bool SupportedMsgDigest(const char *dgst);
57  XrdCryptoMsgDigest *MsgDigest(const char *dgst);
58 
59  // RSA constructors
61  XrdCryptoRSA *RSA(const char *pub, int lpub = 0);
62  XrdCryptoRSA *RSA(const XrdCryptoRSA &r);
63 
64  // X509 constructors
65  XrdCryptoX509 *X509(const char *cf, const char *kf = 0);
67 
68  // X509 CRL constructor
69  XrdCryptoX509Crl *X509Crl(const char *crlfile, int opt = 0);
71 
72  // X509 REQ constructors
74 
75  // Hooks to handle X509 certificates
82 
83  // Required SSL mutexes.
85 
86 };
87 
88 #endif