XrdCryptosslX509Store.cc

Go to the documentation of this file.
00001 // $Id: XrdCryptosslX509Store.cc 30949 2009-11-02 16:37:58Z ganis $
00002 
00003 const char *XrdCryptosslX509StoreCVSID = "$Id: XrdCryptosslX509Store.cc 30949 2009-11-02 16:37:58Z ganis $";
00004 /******************************************************************************/
00005 /*                                                                            */
00006 /*               X r d C r y p t o s s l X 5 0 9 S t o r e . c c              */
00007 /*                                                                            */
00008 /* (c) 2005 G. Ganis , CERN                                                   */
00009 /*                                                                            */
00010 /******************************************************************************/
00011 
00012 
00013 /* ************************************************************************** */
00014 /*                                                                            */
00015 /* OpenSSL implementation of XrdCryptoX509Store                               */
00016 /*                                                                            */
00017 /* ************************************************************************** */
00018 
00019 #include <XrdCrypto/XrdCryptosslX509Store.hh>
00020 
00021 
00022 //_____________________________________________________________________________
00023 XrdCryptosslX509Store::XrdCryptosslX509Store(XrdCryptoX509 *xca) :
00024                        XrdCryptoX509Store()
00025 {
00026    // Constructor
00027 
00028    chain = 0;
00029    store = X509_STORE_new();
00030    if (store) {
00031       // Init with CA certificate
00032       X509_STORE_set_verify_cb_func(store,0);
00033       // add CA certificate
00034       X509_STORE_add_cert(store,xca->cert);
00035       // Init chain
00036       if (!(chain = sk_X509_new_null())) {
00037          // Cleanup, if init failure
00038          X509_STORE_free(store);
00039          store = 0;
00040       }
00041    }
00042 }
00043 
00044 //_____________________________________________________________________________
00045 bool XrdCryptosslX509Store::IsValid()
00046 {
00047    // Test validity
00048 
00049    return (store && chain);
00050 }
00051 
00052 //_____________________________________________________________________________
00053 void XrdCryptoX509Store::Dump()
00054 {
00055    // Dump content
00056    ABSTRACTMETHOD("XrdCryptoX509Store::Dump");
00057 }
00058 
00059 //_____________________________________________________________________________
00060 int XrdCryptoX509Store::Import(XrdSutBucket *bck)
00061 {
00062    // Import certificates contained in bucket bck, if any
00063 
00064    ABSTRACTMETHOD("XrdCryptoX509Store::Add");
00065    return -1;
00066 }
00067 
00068 //_____________________________________________________________________________
00069 bool XrdCryptoX509Store::Verify()
00070 {
00071    // Verify certicate chain stored
00072    ABSTRACTMETHOD("XrdCryptoX509Store::Verify");
00073    return -1;
00074 }

Generated on Tue Jul 5 14:46:34 2011 for ROOT_528-00b_version by  doxygen 1.5.1