Skip to content

Commit e52b002

Browse files
committed
Fail the build if ALPN is not available
1 parent f149eea commit e52b002

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rsocket/transports/tcp/TcpConnectionFactory.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ class ConnectCallback : public folly::AsyncSocket::ConnectCallback {
4343
DCHECK(evb);
4444

4545
if (sslContext) {
46+
#if !FOLLY_OPENSSL_HAS_ALPN
47+
// setAdvertisedNextProtocols() is unavailable
48+
#error ALPN is required for rsockets. \
49+
Your version of OpenSSL is likely too old.
50+
#else
4651
VLOG(3) << "Starting SSL socket";
4752
sslContext->setAdvertisedNextProtocols({"rs"});
53+
#endif
4854
socket_.reset(new folly::AsyncSSLSocket(sslContext, evb));
4955
} else {
5056
VLOG(3) << "Starting socket";

0 commit comments

Comments
 (0)