xrootd
Loading...
Searching...
No Matches
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__
39#endif
40
42
43int DebugON = 1;
44
45// The ID must be a unique number
46#define XrdCryptosslFactoryID 1
47
49{
50public:
53
54 // Set trace flags
55 void SetTrace(kXR_int32 trace);
56
57 // Hook to Key Derivation Function (PBKDF2)
58 XrdCryptoKDFunLen_t KDFunLen(); // Default Length of buffer
60
61 // Cipher constructors
62 bool SupportedCipher(const char *t);
64 XrdCryptoCipher *Cipher(const char *t, int l = 0);
65 XrdCryptoCipher *Cipher(const char *t, int l, const char *k,
66 int liv, const char *iv);
68 XrdCryptoCipher *Cipher(int bits, char *pub, int lpub, const char *t = 0);
69 XrdCryptoCipher *Cipher(bool padded, int bits, char *pub, int lpub, const char *t = 0);
71
72 // MsgDigest constructors
73 bool SupportedMsgDigest(const char *dgst);
74 XrdCryptoMsgDigest *MsgDigest(const char *dgst);
75
76 // RSA constructors
78 XrdCryptoRSA *RSA(const char *pub, int lpub = 0);
80
81 // X509 constructors
82 XrdCryptoX509 *X509(const char *cf, const char *kf = 0);
84
85 // X509 CRL constructor
86 XrdCryptoX509Crl *X509Crl(const char *crlfile, int opt = 0);
88
89 // X509 REQ constructors
91
92 // Hooks to handle X509 certificates
100
101 // Hooks to handle X509 proxy certificates
109
110};
111
112#endif
int kXR_int32
Definition XPtypes.hh:89
int(* XrdCryptoKDFunLen_t)()
Definition XrdCryptoAux.hh:59
#define XrdCryptoDefRSAExp
Definition XrdCryptoAux.hh:54
int(* XrdCryptoKDFun_t)(const char *pass, int plen, const char *salt, int slen, char *key, int klen)
Definition XrdCryptoAux.hh:60
#define XrdCryptoDefRSABits
Definition XrdCryptoAux.hh:53
int(* XrdCryptoX509ChainToFile_t)(XrdCryptoX509Chain *, const char *)
Definition XrdCryptoFactory.hh:78
int(* XrdCryptoX509CreateProxy_t)(const char *, const char *, XrdProxyOpt_t *, XrdCryptogsiX509Chain *, XrdCryptoRSA **, const char *)
Definition XrdCryptoFactory.hh:107
int(* XrdCryptoX509SignProxyReq_t)(XrdCryptoX509 *, XrdCryptoRSA *, XrdCryptoX509Req *, XrdCryptoX509 **)
Definition XrdCryptoFactory.hh:113
bool(* XrdCryptoX509VerifyChain_t)(XrdCryptoX509Chain *chain, int &errcode)
Definition XrdCryptoFactory.hh:72
XrdSutBucket *(* XrdCryptoX509ExportChain_t)(XrdCryptoX509Chain *, bool)
Definition XrdCryptoFactory.hh:75
int(* XrdCryptoX509ParseBucket_t)(XrdSutBucket *, XrdCryptoX509Chain *)
Definition XrdCryptoFactory.hh:89
bool(* XrdCryptoX509VerifyCert_t)(XrdCryptoX509 *c, XrdCryptoX509 *r)
Definition XrdCryptoFactory.hh:70
int(* XrdCryptoX509GetVOMSAttr_t)(XrdCryptoX509 *, XrdOucString &)
Definition XrdCryptoFactory.hh:119
void(* XrdCryptoSetPathLenConstraint_t)(void *, int)
Definition XrdCryptoFactory.hh:98
int(* XrdCryptoX509ParseStack_t)(XrdTlsPeerCerts *pc, XrdCryptoX509Chain *c)
Definition XrdCryptoFactory.hh:85
int(* XrdCryptoX509ParseFile_t)(const char *fname, XrdCryptoX509Chain *, const char *)
Definition XrdCryptoFactory.hh:81
int(* XrdCryptoX509CreateProxyReq_t)(XrdCryptoX509 *, XrdCryptoX509Req **, XrdCryptoRSA **)
Definition XrdCryptoFactory.hh:110
bool(* XrdCryptoProxyCertInfo_t)(const void *, int &, bool *)
Definition XrdCryptoFactory.hh:96
int(* XrdCryptoX509CheckProxy3_t)(XrdCryptoX509 *, XrdOucString &)
Definition XrdCryptoFactory.hh:116
int DebugON
Definition XrdCryptosslFactory.hh:43
Definition XrdCryptoCipher.hh:48
Definition XrdCryptoFactory.hh:122
Definition XrdCryptoMsgDigest.hh:47
Definition XrdCryptoRSA.hh:51
Definition XrdCryptoX509Crl.hh:49
Definition XrdCryptoX509Req.hh:50
Definition XrdCryptoX509.hh:51
Definition XrdCryptosslFactory.hh:49
void SetTrace(kXR_int32 trace)
XrdCryptoX509CreateProxy_t X509CreateProxy()
XrdCryptoX509CreateProxyReq_t X509CreateProxyReq()
XrdCryptoSetPathLenConstraint_t SetPathLenConstraint()
XrdCryptoRSA * RSA(const XrdCryptoRSA &r)
XrdCryptoX509ChainToFile_t X509ChainToFile()
XrdCryptoX509 * X509(XrdSutBucket *b)
XrdCryptoCipher * Cipher(XrdSutBucket *b)
bool SupportedMsgDigest(const char *dgst)
XrdCryptoX509ParseFile_t X509ParseFile()
XrdCryptoX509VerifyCert_t X509VerifyCert()
XrdCryptoX509SignProxyReq_t X509SignProxyReq()
XrdCryptoX509ExportChain_t X509ExportChain()
XrdCryptoCipher * Cipher(int bits, char *pub, int lpub, const char *t=0)
XrdCryptoMsgDigest * MsgDigest(const char *dgst)
XrdCryptoX509GetVOMSAttr_t X509GetVOMSAttr()
XrdCryptoX509VerifyChain_t X509VerifyChain()
bool SupportedCipher(const char *t)
XrdCryptoKDFun_t KDFun()
XrdCryptoX509ParseStack_t X509ParseStack()
virtual ~XrdCryptosslFactory()
Definition XrdCryptosslFactory.hh:52
XrdCryptoX509ParseBucket_t X509ParseBucket()
XrdCryptoKDFunLen_t KDFunLen()
XrdCryptoX509Req * X509Req(XrdSutBucket *bck)
XrdCryptoCipher * Cipher(const char *t, int l, const char *k, int liv, const char *iv)
XrdCryptoX509CheckProxy3_t X509CheckProxy3()
XrdCryptoX509 * X509(const char *cf, const char *kf=0)
XrdCryptoX509Crl * X509Crl(const char *crlfile, int opt=0)
XrdCryptoCipher * Cipher(const char *t, int l=0)
XrdCryptoProxyCertInfo_t ProxyCertInfo()
XrdCryptoX509Crl * X509Crl(XrdCryptoX509 *cacert)
XrdCryptoCipher * Cipher(const XrdCryptoCipher &c)
XrdCryptoCipher * Cipher(bool padded, int bits, char *pub, int lpub, const char *t=0)
XrdCryptoRSA * RSA(const char *pub, int lpub=0)
XrdCryptoRSA * RSA(int bits=XrdCryptoDefRSABits, int exp=XrdCryptoDefRSAExp)
Definition XrdSutBucket.hh:44