xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCrypto
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__
21
#include "
XrdCrypto/XrdCryptoFactory.hh
"
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
33
class
XrdCryptosslFactory
:
public
XrdCryptoFactory
34
{
35
public
:
36
XrdCryptosslFactory
();
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
44
XrdCryptoKDFun_t
KDFun
();
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);
51
XrdCryptoCipher
*
Cipher
(
XrdSutBucket
*b);
52
XrdCryptoCipher
*
Cipher
(
int
bits,
char
*pub,
int
lpub,
const
char
*t = 0);
53
XrdCryptoCipher
*
Cipher
(
const
XrdCryptoCipher
&c);
54
55
// MsgDigest constructors
56
bool
SupportedMsgDigest
(
const
char
*dgst);
57
XrdCryptoMsgDigest
*
MsgDigest
(
const
char
*dgst);
58
59
// RSA constructors
60
XrdCryptoRSA
*
RSA
(
int
bits =
XrdCryptoDefRSABits
,
int
exp =
XrdCryptoDefRSAExp
);
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);
66
XrdCryptoX509
*
X509
(
XrdSutBucket
*b);
67
68
// X509 CRL constructor
69
XrdCryptoX509Crl
*
X509Crl
(
const
char
*crlfile,
int
opt = 0);
70
XrdCryptoX509Crl
*
X509Crl
(
XrdCryptoX509
*cacert);
71
72
// X509 REQ constructors
73
XrdCryptoX509Req
*
X509Req
(
XrdSutBucket
*bck);
74
75
// Hooks to handle X509 certificates
76
XrdCryptoX509VerifyCert_t
X509VerifyCert
();
77
XrdCryptoX509VerifyChain_t
X509VerifyChain
();
78
XrdCryptoX509ParseFile_t
X509ParseFile
();
79
XrdCryptoX509ParseBucket_t
X509ParseBucket
();
80
XrdCryptoX509ExportChain_t
X509ExportChain
();
81
XrdCryptoX509ChainToFile_t
X509ChainToFile
();
82
83
// Required SSL mutexes.
84
static
XrdSysMutex
*
CryptoMutexPool
[
SSLFACTORY_MAX_CRYPTO_MUTEX
];
85
86
};
87
88
#endif
Generated by
1.8.1.2