Browse Source

Merge pull request #6603 from neheb/email

emailrelay: Update to 2.0
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
7a15ee19fa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 25 deletions
  1. +13
    -12
      mail/emailrelay/Makefile
  2. +43
    -0
      mail/emailrelay/patches/010-openssl-1.1.patch
  3. +0
    -13
      mail/emailrelay/patches/010-ssl3-fix.patch

+ 13
- 12
mail/emailrelay/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=emailrelay PKG_NAME:=emailrelay
PKG_VERSION:=1.9
PKG_RELEASE:=5
PKG_VERSION:=2.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION) PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
PKG_HASH:=869a3e2d053237d7f63784acc25e748af2dbf2d9b9c5c48e4a5269d4e4b5bda0
PKG_HASH:=0b3a98edfdc8deaf2b3d14e2d2a7fa8402f6703d83ac7458653994124de6a587
PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com> PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@ -74,22 +74,24 @@ endef
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--with-pam=no \
--enable-testing=no
CONFIGURE_VARS += \
CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
--without-doxygen \
--without-man2html \
--without-mbedtls \
--without-pam \
--disable-bsd \
--disable-gui \
--disable-mac \
--disable-testing \
--disable-windows
ifeq ($(CONFIG_EMAILRELAY_SSL),y) ifeq ($(CONFIG_EMAILRELAY_SSL),y)
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--with-openssl --with-openssl
else else
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--with-openssl=no
--without-openssl
endif endif
ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y) ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--enable-debug=yes --enable-debug=yes
@ -105,7 +107,6 @@ define Package/emailrelay/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/ $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/


+ 43
- 0
mail/emailrelay/patches/010-openssl-1.1.patch View File

@ -0,0 +1,43 @@
diff --git a/src/gssl/gssl_openssl.cpp b/src/gssl/gssl_openssl.cpp
index 0e9b73b..49927db 100644
--- a/src/gssl/gssl_openssl.cpp
+++ b/src/gssl/gssl_openssl.cpp
@@ -52,10 +52,14 @@ GSsl::OpenSSL::LibraryImp::LibraryImp( G::StringArray & library_config , Library
m_verbose(verbose) ,
m_config(library_config)
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_load_error_strings() ;
SSL_library_init() ;
- int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ;
OpenSSL_add_all_digests() ;
+#else
+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL) ;
+#endif
+ int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ;
// allocate a slot for a pointer from SSL to ProtocolImp
m_index = SSL_get_ex_new_index( 0 , nullptr , nullptr , nullptr , nullptr ) ;
@@ -73,15 +77,21 @@ GSsl::OpenSSL::LibraryImp::~LibraryImp()
void GSsl::OpenSSL::LibraryImp::cleanup()
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
// ffs...
ERR_free_strings() ;
RAND_cleanup() ;
- CRYPTO_cleanup_all_ex_data();
+ CRYPTO_cleanup_all_ex_data() ;
+#endif
}
std::string GSsl::OpenSSL::LibraryImp::sid()
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
return G::Str::printable( SSLeay_version(SSLEAY_VERSION) ) ;
+#else
+ return G::Str::printable( OpenSSL_version(OPENSSL_VERSION) ) ;
+#endif
}
std::string GSsl::OpenSSL::LibraryImp::id() const

+ 0
- 13
mail/emailrelay/patches/010-ssl3-fix.patch View File

@ -1,13 +0,0 @@
--- a/src/gssl/gssl_openssl.cpp
+++ b/src/gssl/gssl_openssl.cpp
@@ -292,8 +292,10 @@ GSsl::Context::Context( const std::strin
{
if( (flags&3U) == 2U )
m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
+#ifdef SSL3_SUPPORT
else if( (flags&3U) == 3U )
m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ;
+#endif
else
m_ssl_ctx = SSL_CTX_new(TLSv1_method()) ;

Loading…
Cancel
Save