Skip to content

Commit

Permalink
[Server] Make sure to clear OpenSSL error queue after authentication.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 3, 2021
1 parent 76d03f6 commit f74d453
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/XrdXrootd/XrdXrootdProtocol.cc
Expand Up @@ -41,6 +41,7 @@
#include "XrdSfs/XrdSfsInterface.hh"
#include "XrdSys/XrdSysAtomics.hh"
#include "XrdSys/XrdSysTimer.hh"
#include "XrdTls/XrdTls.hh"
#include "XrdXrootd/XrdXrootdAio.hh"
#include "XrdXrootd/XrdXrootdFile.hh"
#include "XrdXrootd/XrdXrootdFileLock.hh"
Expand Down Expand Up @@ -494,11 +495,14 @@ int XrdXrootdProtocol::Process2()
// Force authentication at this point, if need be
//
if (Status & XRD_NEED_AUTH)
{if (Request.header.requestid == kXR_auth) return do_Auth();
{int rc;
if (Request.header.requestid == kXR_auth) rc = do_Auth();
else {Response.Send(kXR_InvalidRequest,
"Invalid request; user not authenticated");
return -1;
rc = -1;
}
if (tlsCtx) XrdTls::ClearErrorQueue();
return rc;
}

// Construct request ID as the following functions are async eligible
Expand Down

0 comments on commit f74d453

Please sign in to comment.