Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XtdHTTP: work around compilation issues in platforms with old versions of OpenSSL #351

Merged
merged 2 commits into from
Apr 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/XrdHttp/XrdHttpProtocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,21 @@ int XrdHttpProtocol::InitSecurity() {
OpenSSL_add_all_digests();

const SSL_METHOD *meth;

#ifdef TLS1_2_VERSION
meth = TLSv1_2_method();
eDest.Say(" Using TLS 1.2");
#elif TLS1_1_VERSION
eDest.Say(" Using deprecated TLS version 1.1.")
meth = TLSv1_1_method();
#elif TLS1_VERSION
eDest.Say(" Using deprecated TLS version 1.")
meth = TLSv1_method();
#else
eDest.Say(" warning: TLS is not available, falling back to SSL23 (deprecated).")
meth = SSLv23_method();
#endif

sslctx = SSL_CTX_new((SSL_METHOD *)meth);
//SSL_CTX_set_min_proto_version(sslctx, TLS1_2_VERSION);
SSL_CTX_set_session_cache_mode(sslctx, SSL_SESS_CACHE_SERVER);
Expand Down
8 changes: 4 additions & 4 deletions src/XrdHttp/xrootd-http.cf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@


if exec xrootd
xrd.protocol XrdHttp /usr/local/lib/libXrdHttp.so
xrd.protocol XrdHttp /usr/local/lib/libXrdHttp-4.so
fi

http.cert /etc/grid-security/hostcert.pem
http.key /etc/grid-security/hostkey.pem
http.cadir /etc/grid-security/certificates
http.secretkey CHANGEME
#http.secretkey CHANGEME
#http.gridmap /etc/grid-security/mapfile
#http.secxtractor /usr/lib64/libXrdHttpVOMS.so
#http.secxtractor /usr/lib64/libXrdHttpVOMS-4.so
#http.selfhttps2http yes

# As an example of preloading files, let's preload in memory
Expand All @@ -29,7 +29,7 @@ http.secretkey CHANGEME
# Usual basic xrd stuff
#
all.role server
all.manager pcitgt02.cern.ch:1213
all.manager pcitsdcfab.cern.ch:1213
all.export /
oss.localroot /tmp/xrdroot