Loading...
Searching...
No Matches
XrdCryptosslFactory.hh
Go to the documentation of this file.
#ifndef __CRYPTO_SSLFACTORY_H__
#define __CRYPTO_SSLFACTORY_H__
/******************************************************************************/
/* */
/* X r d C r y p t o S s l F a c t o r y . h h */
/* */
/* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
/* Produced by Gerri Ganis for CERN */
/* */
/* This file is part of the XRootD software suite. */
/* */
/* XRootD is free software: you can redistribute it and/or modify it under */
/* the terms of the GNU Lesser General Public License as published by the */
/* Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
/* */
/* The copyright holder's institutional names and contributor's names may not */
/* be used to endorse or promote products derived from this software without */
/* specific prior written permission of the institution or contributor. */
/******************************************************************************/
/* ************************************************************************** */
/* */
/* Implementation of the OpenSSL crypto factory */
/* */
/* ************************************************************************** */
#ifndef __CRYPTO_FACTORY_H__
#include "XrdCrypto/XrdCryptoFactory.hh"
#endif
#include "XrdSys/XrdSysPthread.hh"
int DebugON = 1;
// The ID must be a unique number
#define XrdCryptosslFactoryID 1
class XrdCryptosslFactory : public XrdCryptoFactory
{
public:
XrdCryptosslFactory();
virtual ~XrdCryptosslFactory() { }
// Set trace flags
void SetTrace(kXR_int32 trace);
// Hook to Key Derivation Function (PBKDF2)
XrdCryptoKDFunLen_t KDFunLen(); // Default Length of buffer
XrdCryptoKDFun_t KDFun();
// Cipher constructors
bool SupportedCipher(const char *t);
bool HasPaddingSupport();
XrdCryptoCipher *Cipher(const char *t, int l = 0);
XrdCryptoCipher *Cipher(const char *t, int l, const char *k,
int liv, const char *iv);
XrdCryptoCipher *Cipher(XrdSutBucket *b);
XrdCryptoCipher *Cipher(int bits, char *pub, int lpub, const char *t = 0);
XrdCryptoCipher *Cipher(bool padded, int bits, char *pub, int lpub, const char *t = 0);
XrdCryptoCipher *Cipher(const XrdCryptoCipher &c);
// MsgDigest constructors
bool SupportedMsgDigest(const char *dgst);
XrdCryptoMsgDigest *MsgDigest(const char *dgst);
// RSA constructors
XrdCryptoRSA *RSA(int bits = XrdCryptoDefRSABits, int exp = XrdCryptoDefRSAExp);
XrdCryptoRSA *RSA(const char *pub, int lpub = 0);
XrdCryptoRSA *RSA(const XrdCryptoRSA &r);
// X509 constructors
XrdCryptoX509 *X509(const char *cf, const char *kf = 0);
XrdCryptoX509 *X509(XrdSutBucket *b);
// X509 CRL constructor
XrdCryptoX509Crl *X509Crl(const char *crlfile, int opt = 0);
XrdCryptoX509Crl *X509Crl(XrdCryptoX509 *cacert);
// X509 REQ constructors
XrdCryptoX509Req *X509Req(XrdSutBucket *bck);
// Hooks to handle X509 certificates
XrdCryptoX509VerifyCert_t X509VerifyCert();
XrdCryptoX509VerifyChain_t X509VerifyChain();
XrdCryptoX509ParseFile_t X509ParseFile();
XrdCryptoX509ParseStack_t X509ParseStack();
XrdCryptoX509ParseBucket_t X509ParseBucket();
XrdCryptoX509ExportChain_t X509ExportChain();
XrdCryptoX509ChainToFile_t X509ChainToFile();
// Hooks to handle X509 proxy certificates
XrdCryptoProxyCertInfo_t ProxyCertInfo();
XrdCryptoSetPathLenConstraint_t SetPathLenConstraint();
XrdCryptoX509CreateProxy_t X509CreateProxy();
XrdCryptoX509CreateProxyReq_t X509CreateProxyReq();
XrdCryptoX509SignProxyReq_t X509SignProxyReq();
XrdCryptoX509CheckProxy3_t X509CheckProxy3();
XrdCryptoX509GetVOMSAttr_t X509GetVOMSAttr();
};
#endif
kXR_int32
int kXR_int32
Definition XPtypes.hh:89
XrdCryptoKDFunLen_t
int(* XrdCryptoKDFunLen_t)()
Definition XrdCryptoAux.hh:59
XrdCryptoDefRSAExp
#define XrdCryptoDefRSAExp
Definition XrdCryptoAux.hh:54
XrdCryptoKDFun_t
int(* XrdCryptoKDFun_t)(const char *pass, int plen, const char *salt, int slen, char *key, int klen)
Definition XrdCryptoAux.hh:60
XrdCryptoDefRSABits
#define XrdCryptoDefRSABits
Definition XrdCryptoAux.hh:53
XrdCryptoFactory.hh
XrdCryptoX509ChainToFile_t
int(* XrdCryptoX509ChainToFile_t)(XrdCryptoX509Chain *, const char *)
Definition XrdCryptoFactory.hh:78
XrdCryptoX509CreateProxy_t
int(* XrdCryptoX509CreateProxy_t)(const char *, const char *, XrdProxyOpt_t *, XrdCryptogsiX509Chain *, XrdCryptoRSA **, const char *)
Definition XrdCryptoFactory.hh:107
XrdCryptoX509SignProxyReq_t
int(* XrdCryptoX509SignProxyReq_t)(XrdCryptoX509 *, XrdCryptoRSA *, XrdCryptoX509Req *, XrdCryptoX509 **)
Definition XrdCryptoFactory.hh:113
XrdCryptoX509VerifyChain_t
bool(* XrdCryptoX509VerifyChain_t)(XrdCryptoX509Chain *chain, int &errcode)
Definition XrdCryptoFactory.hh:72
XrdCryptoX509ExportChain_t
XrdSutBucket *(* XrdCryptoX509ExportChain_t)(XrdCryptoX509Chain *, bool)
Definition XrdCryptoFactory.hh:75
XrdCryptoX509ParseBucket_t
int(* XrdCryptoX509ParseBucket_t)(XrdSutBucket *, XrdCryptoX509Chain *)
Definition XrdCryptoFactory.hh:89
XrdCryptoX509VerifyCert_t
bool(* XrdCryptoX509VerifyCert_t)(XrdCryptoX509 *c, XrdCryptoX509 *r)
Definition XrdCryptoFactory.hh:70
XrdCryptoX509GetVOMSAttr_t
int(* XrdCryptoX509GetVOMSAttr_t)(XrdCryptoX509 *, XrdOucString &)
Definition XrdCryptoFactory.hh:119
XrdCryptoSetPathLenConstraint_t
void(* XrdCryptoSetPathLenConstraint_t)(void *, int)
Definition XrdCryptoFactory.hh:98
XrdCryptoX509ParseStack_t
int(* XrdCryptoX509ParseStack_t)(XrdTlsPeerCerts *pc, XrdCryptoX509Chain *c)
Definition XrdCryptoFactory.hh:85
XrdCryptoX509ParseFile_t
int(* XrdCryptoX509ParseFile_t)(const char *fname, XrdCryptoX509Chain *, const char *)
Definition XrdCryptoFactory.hh:81
XrdCryptoX509CreateProxyReq_t
int(* XrdCryptoX509CreateProxyReq_t)(XrdCryptoX509 *, XrdCryptoX509Req **, XrdCryptoRSA **)
Definition XrdCryptoFactory.hh:110
XrdCryptoProxyCertInfo_t
bool(* XrdCryptoProxyCertInfo_t)(const void *, int &, bool *)
Definition XrdCryptoFactory.hh:96
XrdCryptoX509CheckProxy3_t
int(* XrdCryptoX509CheckProxy3_t)(XrdCryptoX509 *, XrdOucString &)
Definition XrdCryptoFactory.hh:116
DebugON
int DebugON
Definition XrdCryptosslFactory.hh:43
XrdSysPthread.hh
XrdCryptoCipher
Definition XrdCryptoCipher.hh:48
XrdCryptoFactory::XrdCryptoFactory
XrdCryptoFactory(const char *n="Unknown", int id=-1)
Definition XrdCryptoFactory.cc:55
XrdCryptoMsgDigest
Definition XrdCryptoMsgDigest.hh:47
XrdCryptoRSA
Definition XrdCryptoRSA.hh:51
XrdCryptoX509Crl
Definition XrdCryptoX509Crl.hh:49
XrdCryptoX509Req
Definition XrdCryptoX509Req.hh:50
XrdCryptoX509
Definition XrdCryptoX509.hh:51
XrdCryptosslFactory::SetTrace
void SetTrace(kXR_int32 trace)
Definition XrdCryptosslFactory.cc:91
XrdCryptosslFactory::X509CreateProxy
XrdCryptoX509CreateProxy_t X509CreateProxy()
Definition XrdCryptosslFactory.cc:467
XrdCryptosslFactory::X509CreateProxyReq
XrdCryptoX509CreateProxyReq_t X509CreateProxyReq()
Definition XrdCryptosslFactory.cc:475
XrdCryptosslFactory::SetPathLenConstraint
XrdCryptoSetPathLenConstraint_t SetPathLenConstraint()
Definition XrdCryptosslFactory.cc:459
XrdCryptosslFactory::HasPaddingSupport
bool HasPaddingSupport()
Definition XrdCryptosslFactory.cc:140
XrdCryptosslFactory::X509ChainToFile
XrdCryptoX509ChainToFile_t X509ChainToFile()
Definition XrdCryptosslFactory.cc:415
XrdCryptosslFactory::SupportedMsgDigest
bool SupportedMsgDigest(const char *dgst)
Definition XrdCryptosslFactory.cc:245
XrdCryptosslFactory::X509ParseFile
XrdCryptoX509ParseFile_t X509ParseFile()
Definition XrdCryptosslFactory.cc:424
XrdCryptosslFactory::X509VerifyCert
XrdCryptoX509VerifyCert_t X509VerifyCert()
Definition XrdCryptosslFactory.cc:388
XrdCryptosslFactory::X509SignProxyReq
XrdCryptoX509SignProxyReq_t X509SignProxyReq()
Definition XrdCryptosslFactory.cc:483
XrdCryptosslFactory::X509ExportChain
XrdCryptoX509ExportChain_t X509ExportChain()
Definition XrdCryptosslFactory.cc:406
XrdCryptosslFactory::MsgDigest
XrdCryptoMsgDigest * MsgDigest(const char *dgst)
Definition XrdCryptosslFactory.cc:253
XrdCryptosslFactory::X509GetVOMSAttr
XrdCryptoX509GetVOMSAttr_t X509GetVOMSAttr()
Definition XrdCryptosslFactory.cc:499
XrdCryptosslFactory::XrdCryptosslFactory
XrdCryptosslFactory()
Definition XrdCryptosslFactory.cc:63
XrdCryptosslFactory::X509VerifyChain
XrdCryptoX509VerifyChain_t X509VerifyChain()
Definition XrdCryptosslFactory.cc:397
XrdCryptosslFactory::SupportedCipher
bool SupportedCipher(const char *t)
Definition XrdCryptosslFactory.cc:132
XrdCryptosslFactory::KDFun
XrdCryptoKDFun_t KDFun()
Definition XrdCryptosslFactory.cc:124
XrdCryptosslFactory::X509ParseStack
XrdCryptoX509ParseStack_t X509ParseStack()
Definition XrdCryptosslFactory.cc:433
XrdCryptosslFactory::~XrdCryptosslFactory
virtual ~XrdCryptosslFactory()
Definition XrdCryptosslFactory.hh:52
XrdCryptosslFactory::X509ParseBucket
XrdCryptoX509ParseBucket_t X509ParseBucket()
Definition XrdCryptosslFactory.cc:442
XrdCryptosslFactory::KDFunLen
XrdCryptoKDFunLen_t KDFunLen()
Definition XrdCryptosslFactory.cc:116
XrdCryptosslFactory::X509Req
XrdCryptoX509Req * X509Req(XrdSutBucket *bck)
Definition XrdCryptosslFactory.cc:373
XrdCryptosslFactory::X509CheckProxy3
XrdCryptoX509CheckProxy3_t X509CheckProxy3()
Definition XrdCryptosslFactory.cc:491
XrdCryptosslFactory::X509
XrdCryptoX509 * X509(const char *cf, const char *kf=0)
Definition XrdCryptosslFactory.cc:313
XrdCryptosslFactory::X509Crl
XrdCryptoX509Crl * X509Crl(const char *crlfile, int opt=0)
Definition XrdCryptosslFactory.cc:343
XrdCryptosslFactory::Cipher
XrdCryptoCipher * Cipher(const char *t, int l=0)
Definition XrdCryptosslFactory.cc:151
XrdCryptosslFactory::ProxyCertInfo
XrdCryptoProxyCertInfo_t ProxyCertInfo()
Definition XrdCryptosslFactory.cc:451
XrdCryptosslFactory::RSA
XrdCryptoRSA * RSA(int bits=XrdCryptoDefRSABits, int exp=XrdCryptoDefRSAExp)
Definition XrdCryptosslFactory.cc:268
XrdSutBucket
Definition XrdSutBucket.hh:44