From e25f45d2dad79cb4e2f9fe8d12484cf0b81df320 Mon Sep 17 00:00:00 2001
From: TJ Saunders <tj@castaglia.org>
Date: Tue, 16 Jan 2018 04:55:23 -0800
Subject: [PATCH] Bug #4335: mod_auth_otp fails to build with OpenSSL 1.1.x.

---
 contrib/mod_auth_otp/crypto.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/contrib/mod_auth_otp/crypto.c b/contrib/mod_auth_otp/crypto.c
index c479d56d4..076a26693 100644
--- a/contrib/mod_auth_otp/crypto.c
+++ b/contrib/mod_auth_otp/crypto.c
@@ -1,6 +1,6 @@
 /*
  * ProFTPD - mod_auth_otp OpenSSL interface
- * Copyright (c) 2015-2017 TJ Saunders
+ * Copyright (c) 2015-2018 TJ Saunders
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -50,10 +50,7 @@ void auth_otp_crypto_free(int flags) {
     ERR_free_strings();
 
 #if OPENSSL_VERSION_NUMBER >= 0x10000001L
-# if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
-     !defined(HAVE_LIBRESSL)
-    ERR_remove_thread_state();
-# else
+# if OPENSSL_VERSION_NUMBER >= 0x10100000L
     /* The ERR_remove_state(0) usage is deprecated due to thread ID
      * differences among platforms; see the OpenSSL-1.0.0c CHANGES file
      * for details.  So for new enough OpenSSL installations, use the
