$OpenBSD: patch-src_ssl_bio_cc,v 1.1 2015/02/06 16:30:17 sthen Exp $
--- src/ssl/bio.cc.orig	Fri Feb  6 15:36:07 2015
+++ src/ssl/bio.cc	Fri Feb  6 15:47:15 2015
@@ -151,7 +151,10 @@ Ssl::Bio::stateChanged(const SSL *ssl, int where, int 
 bool
 Ssl::ClientBio::isClientHello(int state)
 {
-    return (state == SSL2_ST_GET_CLIENT_HELLO_A ||
+    return (
+#ifdef SSL2_ST_GET_CLIENT_HELLO_A
+            state == SSL2_ST_GET_CLIENT_HELLO_A ||
+#endif
             state == SSL3_ST_SR_CLNT_HELLO_A ||
             state == SSL23_ST_SR_CLNT_HELLO_A ||
             state == SSL23_ST_SR_CLNT_HELLO_B ||
@@ -325,7 +328,11 @@ adjustSSL(SSL *ssl, Ssl::Bio::sslFeatures &features)
 
     // If the client supports compression but our context does not support
     // we can not adjust.
+#ifdef OPENSSL_NO_COMP
+    if (features.compressMethod) {
+#else
     if (features.compressMethod && ssl->ctx->comp_methods == NULL) {
+#endif
         debugs(83, 5, "Client Hello Data supports compression, but we do not!");
         return false;
     }
@@ -669,9 +676,11 @@ Ssl::Bio::sslFeatures::get(const SSL *ssl)
     debugs(83, 7, "SNI server name: " << serverName);
 #endif
 
+#ifndef OPENSSL_NO_COMP
     if (ssl->session->compress_meth)
         compressMethod = ssl->session->compress_meth;
     else if (sslVersion >= 3) //if it is 3 or newer version then compression is disabled
+#endif
         compressMethod = 0;
     debugs(83, 7, "SSL compression: " << compressMethod);
 
