xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCrypto
XrdCryptosslFactory.hh
Go to the documentation of this file.
1
#ifndef __CRYPTO_SSLFACTORY_H__
2
#define __CRYPTO_SSLFACTORY_H__
3
/******************************************************************************/
4
/* */
5
/* X r d C r y p t o S s l F a c t o r y . h h */
6
/* */
7
/* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* Produced by Gerri Ganis for CERN */
9
/* */
10
/* This file is part of the XRootD software suite. */
11
/* */
12
/* XRootD is free software: you can redistribute it and/or modify it under */
13
/* the terms of the GNU Lesser General Public License as published by the */
14
/* Free Software Foundation, either version 3 of the License, or (at your */
15
/* option) any later version. */
16
/* */
17
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20
/* License for more details. */
21
/* */
22
/* You should have received a copy of the GNU Lesser General Public License */
23
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25
/* */
26
/* The copyright holder's institutional names and contributor's names may not */
27
/* be used to endorse or promote products derived from this software without */
28
/* specific prior written permission of the institution or contributor. */
29
/******************************************************************************/
30
31
/* ************************************************************************** */
32
/* */
33
/* Implementation of the OpenSSL crypto factory */
34
/* */
35
/* ************************************************************************** */
36
37
#ifndef __CRYPTO_FACTORY_H__
38
#include "
XrdCrypto/XrdCryptoFactory.hh
"
39
#endif
40
41
#include "
XrdSys/XrdSysPthread.hh
"
42
43
int
DebugON
= 1;
44
45
// The ID must be a unique number
46
#define XrdCryptosslFactoryID 1
47
48
#define SSLFACTORY_MAX_CRYPTO_MUTEX 256
49
50
class
XrdCryptosslFactory
:
public
XrdCryptoFactory
51
{
52
public
:
53
XrdCryptosslFactory
();
54
virtual
~XrdCryptosslFactory
() { }
55
56
// Set trace flags
57
void
SetTrace
(
kXR_int32
trace);
58
59
// Hook to Key Derivation Function (PBKDF2)
60
XrdCryptoKDFunLen_t
KDFunLen
();
// Default Length of buffer
61
XrdCryptoKDFun_t
KDFun
();
62
63
// Cipher constructors
64
bool
SupportedCipher
(
const
char
*t);
65
XrdCryptoCipher
*
Cipher
(
const
char
*t,
int
l = 0);
66
XrdCryptoCipher
*
Cipher
(
const
char
*t,
int
l,
const
char
*k,
67
int
liv,
const
char
*iv);
68
XrdCryptoCipher
*
Cipher
(
XrdSutBucket
*b);
69
XrdCryptoCipher
*
Cipher
(
int
bits,
char
*pub,
int
lpub,
const
char
*t = 0);
70
XrdCryptoCipher
*
Cipher
(
const
XrdCryptoCipher
&c);
71
72
// MsgDigest constructors
73
bool
SupportedMsgDigest
(
const
char
*dgst);
74
XrdCryptoMsgDigest
*
MsgDigest
(
const
char
*dgst);
75
76
// RSA constructors
77
XrdCryptoRSA
*
RSA
(
int
bits =
XrdCryptoDefRSABits
,
int
exp =
XrdCryptoDefRSAExp
);
78
XrdCryptoRSA
*
RSA
(
const
char
*pub,
int
lpub = 0);
79
XrdCryptoRSA
*
RSA
(
const
XrdCryptoRSA
&r);
80
81
// X509 constructors
82
XrdCryptoX509
*
X509
(
const
char
*cf,
const
char
*kf = 0);
83
XrdCryptoX509
*
X509
(
XrdSutBucket
*b);
84
85
// X509 CRL constructor
86
XrdCryptoX509Crl
*
X509Crl
(
const
char
*crlfile,
int
opt = 0);
87
XrdCryptoX509Crl
*
X509Crl
(
XrdCryptoX509
*cacert);
88
89
// X509 REQ constructors
90
XrdCryptoX509Req
*
X509Req
(
XrdSutBucket
*bck);
91
92
// Hooks to handle X509 certificates
93
XrdCryptoX509VerifyCert_t
X509VerifyCert
();
94
XrdCryptoX509VerifyChain_t
X509VerifyChain
();
95
XrdCryptoX509ParseFile_t
X509ParseFile
();
96
XrdCryptoX509ParseBucket_t
X509ParseBucket
();
97
XrdCryptoX509ExportChain_t
X509ExportChain
();
98
XrdCryptoX509ChainToFile_t
X509ChainToFile
();
99
100
// Required SSL mutexes.
101
static
XrdSysMutex
*
CryptoMutexPool
[
SSLFACTORY_MAX_CRYPTO_MUTEX
];
102
103
};
104
105
#endif
Generated by
1.8.3.1