xrootd
XrdCryptosslX509Req.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef __CRYPTO_SSLX509REQ_H__
3 #define __CRYPTO_SSLX509REQ_H__
4 /******************************************************************************/
5 /* */
6 /* X r d C r y p t o s s l X 5 0 9 R e q . h h */
7 /* */
8 /* */
9 /* (c) 2005 G. Ganis , CERN */
10 /* */
11 /******************************************************************************/
12 
13 /* ************************************************************************** */
14 /* */
15 /* OpenSSL implementation of XrdCryptoX509 */
16 /* */
17 /* ************************************************************************** */
18 
20 
21 #include <openssl/x509v3.h>
22 #include <openssl/bio.h>
23 
24 // ---------------------------------------------------------------------------//
25 //
26 // OpenSSL X509 request implementation
27 //
28 // ---------------------------------------------------------------------------//
30 {
31 
32 public:
34  XrdCryptosslX509Req(X509_REQ *creq);
35  virtual ~XrdCryptosslX509Req();
36 
37  // Access underlying data (in opaque form: used in chains)
39 
40  // Access certificate key
41  XrdCryptoRSA *PKI() { return pki; }
42 
43  // Export in form of bucket (for transfers)
45 
46  // Relevant Names
47  const char *Subject(); // get subject name
48 
49  // Relevant hashes
50  const char *SubjectHash(); // get hash of subject name
51 
52  // Retrieve a given extension if there (in opaque form)
53  XrdCryptoX509Reqdata GetExtension(const char *oid);
54 
55  // Verify signature
56  bool Verify();
57 
58 private:
59  X509_REQ *creq; // The certificate request object
60  XrdOucString subject; // subject;
61  XrdOucString subjecthash; // hash of subject;
62  XrdSutBucket *bucket; // Bucket for export operations
63  XrdCryptoRSA *pki; // PKI of the certificate
64 };
65 
66 #endif