folly
folly copied to clipboard
Does folly support boringssl?
FOLLY_OPENSSL_PREREQ is not defined if ssl is boringssl.
But it is used in SSLContext.h.
So that I think FOLLY could not work with boringssl, Am I right?
support, but you need to adapt the code yourself.
diff --git a/folly/io/async/AsyncSSLSocket.cpp b/folly/io/async/AsyncSSLSocket.cpp index ec76ffee4..506e771d6 100644 --- a/folly/io/async/AsyncSSLSocket.cpp +++ b/folly/io/async/AsyncSSLSocket.cpp @@ -628,11 +628,17 @@ bool AsyncSSLSocket::isServerNameMatch() const { return false; }
+#ifndef BOR_SSL SSL_SESSION* ss = SSL_get_session(ssl_.get()); if (!ss) { return false; }
+#else
- const SSL* ss = ssl_.get();
- if (!ss) {
- return false;
- } +#endif auto tlsextHostname = SSL_SESSION_get0_hostname(ss); return (tlsextHostname && !tlsextHostname_.compare(tlsextHostname)); }
Why not add a settings in CMakeList.txt to indicate using openssl or boringssl?
Different bosringssl versions are different, and the adaptive code is different. I guess he only adapted a certain version.