Skip to content

Commit

Permalink
[XrdTlsContext] Changed the bit set for the activation of the Refresh…
Browse files Browse the repository at this point in the history
… thread
  • Loading branch information
ccaffy authored and simonmichal committed Oct 4, 2022
1 parent 71a749c commit 995d686
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/XrdHttp/XrdHttpProtocol.cc
Expand Up @@ -1685,7 +1685,7 @@ bool XrdHttpProtocol::InitTLS() {

std::string eMsg;
uint64_t opts = XrdTlsContext::servr | XrdTlsContext::logVF |
XrdTlsContext::artON | XrdTlsContext::scRefr;
XrdTlsContext::artON | XrdTlsContext::rfCRL;

// Create a new TLS context
//
Expand Down
14 changes: 7 additions & 7 deletions src/XrdTls/XrdTlsContext.cc
Expand Up @@ -726,7 +726,7 @@ XrdTlsContext::XrdTlsContext(const char *cert, const char *key,

// All went well, start the CRL refresh thread and keep the context.
//
if(opts & scRefr) {
if(opts & rfCRL) {
SetCrlRefresh();
}
ctx_tracker.Keep();
Expand Down Expand Up @@ -767,12 +767,12 @@ XrdTlsContext *XrdTlsContext::Clone(bool full,bool startCRLRefresh)
// Cloning simply means getting a object with the old parameters.
//
uint64_t myOpts = my.opts;
if(startCRLRefresh){
myOpts |= XrdTlsContext::scRefr;
} else {
myOpts &= ~XrdTlsContext::scRefr;
}
XrdTlsContext *xtc = new XrdTlsContext(cert, pkey, caD, caF, myOpts,nullptr);
if(startCRLRefresh){
myOpts |= XrdTlsContext::rfCRL;
} else {
myOpts &= ~XrdTlsContext::rfCRL;
}
XrdTlsContext *xtc = new XrdTlsContext(cert, pkey, caD, caF, myOpts);

// Verify that the context was built
//
Expand Down
2 changes: 1 addition & 1 deletion src/XrdTls/XrdTlsContext.hh
Expand Up @@ -130,7 +130,6 @@ static const int scNone = 0x00000000; //!< Do not change any option settings
static const int scOff = 0x00010000; //!< Turn off cache
static const int scSrvr = 0x00020000; //!< Turn on cache server mode (default)
static const int scClnt = 0x00040000; //!< Turn on cache client mode
static const int scRefr = 0x20000000; //!< Turn on the CRL refresh thread
static const int scKeep = 0x40000000; //!< Info: TLS-controlled flush disabled
static const int scIdErr= 0x80000000; //!< Info: Id not set, is too long
static const int scFMax = 0x00007fff; //!< Maximum flush interval in seconds
Expand Down Expand Up @@ -231,6 +230,7 @@ static const uint64_t logVF = 0x0000000800000000; //!< Log verify failures
static const uint64_t servr = 0x0000000400000000; //!< This is a server context
static const uint64_t dnsok = 0x0000000200000000; //!< Trust DNS for host name
static const uint64_t nopxy = 0x0000000100000000; //!< Do not allow proxy certs
static const uint64_t rfCRL = 0x0000004000000000; //!< Turn on the CRL refresh thread
static const uint64_t crlON = 0x0000008000000000; //!< Enables crl checking
static const uint64_t crlFC = 0x000000C000000000; //!< Full crl chain checking
static const uint64_t crlRF = 0x000000003fff0000; //!< Init crl refresh in Min
Expand Down

0 comments on commit 995d686

Please sign in to comment.