Fix another build problem with LibreSSL.
* buckets/ssl_buckets.c
(ssl_decrypt): Check for required macros directly instead of blindly
assuming they are available as of a particular version of OpenSSL.
git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1775241 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/buckets/ssl_buckets.c b/buckets/ssl_buckets.c
index d29a594..a8e5bef 100644
--- a/buckets/ssl_buckets.c
+++ b/buckets/ssl_buckets.c
@@ -1110,11 +1110,13 @@
/* Once we got through the initial handshake, we should have received
the ALPN information if there is such information. */
ctx->handshake_finished = SSL_is_init_finished(ctx->ssl)
-#ifndef USE_LEGACY_OPENSSL
+#ifdef TLS_ST_OK
|| (SSL_get_state(ctx->ssl) == TLS_ST_OK);
-#else
+#elif defined(SSL_CB_HANDSHAKE_DONE)
|| (SSL_state(ctx->ssl)
& SSL_CB_HANDSHAKE_DONE);
+#else
+#error "neither TLS_ST_OK nor SSL_CB_HANDSHAKE_DONE is available"
#endif
/* Call the protocol callback as soon as possible as this triggers