Index: nse_ssl_cert.cc
--- nse_ssl_cert.cc.orig
+++ nse_ssl_cert.cc
@@ -79,7 +79,7 @@
 #include <openssl/evp.h>
 #include <openssl/err.h>
 
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined LIBRESSL_VERSION_NUMBER
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
 /* Technically some of these things were added in 0x10100006
  * but that was pre-release. */
 #define HAVE_OPAQUE_STRUCTS 1
@@ -488,6 +488,9 @@ int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey
     lua_setfield(L, -2, "ec_curve_type");
   }
   else {
+#if defined(LIBRESSL_VERSION_NUMBER)
+    lua_pushstring(L, "explicit_prime");
+#else
     /* According to RFC 5480 section 2.1.1, explicit curves must not be used with
        X.509. This may change in the future, but for now it doesn't seem worth it
        to add in code to extract the extra parameters. */
@@ -502,6 +505,7 @@ int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey
       /* Something weird happened. */
       lua_pushstring(L, "UNKNOWN");
     }
+#endif
     lua_setfield(L, -2, "ec_curve_type");
   }
   lua_setfield(L, -2, "curve_params");
