Skip to content

Commit

Permalink
[Server] Do not apply TLS requirements to bridged connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 authored and simonmichal committed Jun 21, 2019
1 parent fae8e8e commit 40ff431
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/XrdXrootd/XrdXrootdXeq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ int XrdXrootdProtocol::do_Bind()
//
SI->Bump(SI->miscCnt);

// Check if binds need to occur on a TLS connection
// Check if binds need to occur on a TLS connection.
//
if ((doTLS & Req_TLSData) && !Link->hasTLS())
if ((doTLS & Req_TLSData) && !Link->hasTLS() && !Link->hasBridge())
return Response.Send(kXR_TLSRequired, "bind requires TLS");

// Find the link we are to bind to
Expand Down Expand Up @@ -783,7 +783,7 @@ int XrdXrootdProtocol::do_Getfile()

// Check if getfiles need to occur on a TLS connection
//
if ((doTLS & Req_TLSTPC) && !Link->hasTLS())
if ((doTLS & Req_TLSTPC) && !Link->hasTLS() && !Link->hasBridge())
return Response.Send(kXR_TLSRequired, "getfile requires TLS");

return Response.Send(kXR_Unsupported, "getfile request is not supported");
Expand Down Expand Up @@ -866,7 +866,7 @@ int XrdXrootdProtocol::do_Login()

// Check if login need to occur on a TLS connection
//
if ((doTLS & Req_TLSLogin) && !Link->hasTLS())
if ((doTLS & Req_TLSLogin) && !Link->hasTLS() && !Link->hasBridge())
return Response.Send(kXR_TLSRequired, "login requires TLS");

// Unmarshall the data
Expand Down Expand Up @@ -1400,7 +1400,8 @@ int XrdXrootdProtocol::do_Open()

// If TPC opens require TLS but this is not a TLS connection, prohibit TPC
//
if ((doTLS && Req_TLSTPC) && !Link->hasTLS()) openopts|= SFS_O_NOTPC;
if ((doTLS && Req_TLSTPC) && !Link->hasTLS() && !Link->hasBridge())
openopts|= SFS_O_NOTPC;

// Open the file
//
Expand Down Expand Up @@ -1811,7 +1812,7 @@ int XrdXrootdProtocol::do_Putfile()

// Check if putfiles need to occur on a TLS connection
//
if ((doTLS & Req_TLSTPC) && !Link->hasTLS())
if ((doTLS & Req_TLSTPC) && !Link->hasTLS() && !Link->hasBridge())
return Response.Send(kXR_TLSRequired, "putfile requires TLS");

return Response.Send(kXR_Unsupported, "putfile request is not supported");
Expand Down

0 comments on commit 40ff431

Please sign in to comment.