FreeBSD Bugzilla – Attachment 197860 Details for
Bug 228943
www/libwww: Fails to build with OpenSSL 1.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix OpenSSL 1.x build
libwww (text/plain), 7.45 KB, created by
Nathan
on 2018-10-07 07:08:32 UTC
(
hide
)
Description:
Fix OpenSSL 1.x build
Filename:
MIME Type:
Creator:
Nathan
Created:
2018-10-07 07:08:32 UTC
Size:
7.45 KB
patch
obsolete
>www/libwww: > >* Fix OpenSSL build >* Removed with-ssl flag, no longer needed > >PR: 228943 >Submitted by: Nathan <ndowens@yahoo.com> > >Index: www/libwww/Makefile >=================================================================== >--- www/libwww/Makefile (revision 481216) >+++ www/libwww/Makefile (working copy) >@@ -20,11 +20,11 @@ > > LIB_DEPENDS= libexpat.so:textproc/expat2 > >-USES= gmake libtool localbase perl5 ssl tar:tgz >+USES= autoreconf gmake libtool localbase perl5 pkgconfig ssl tar:tgz > USE_PERL5= build > USE_LDCONFIG= yes > GNU_CONFIGURE= yes >-CONFIGURE_ARGS= --enable-shared --with-zlib --with-ssl=${OPENSSLBASE} >+CONFIGURE_ARGS= --enable-shared --with-zlib > > post-install: > ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so >Index: www/libwww/files/patch-Library_src_SSL_HTSSL.c >=================================================================== >--- www/libwww/files/patch-Library_src_SSL_HTSSL.c (revision 481216) >+++ www/libwww/files/patch-Library_src_SSL_HTSSL.c (working copy) >@@ -1,19 +1,55 @@ >---- Library/src/SSL/HTSSL.c.orig 2018-07-04 23:30:19 UTC >+--- Library/src/SSL/HTSSL.c.orig 2018-10-07 06:52:26 UTC > +++ Library/src/SSL/HTSSL.c >-@@ -214,12 +214,16 @@ PUBLIC BOOL HTSSL_init (void) >+@@ -98,6 +98,7 @@ PRIVATE void apps_ssl_info_callback (SSL * s, int wher >+ PRIVATE int verify_callback (int ok, X509_STORE_CTX * ctx) >+ { >+ char buf[256]; >++ int ctx_error; >+ X509 * err_cert = X509_STORE_CTX_get_current_cert(ctx); >+ int err = X509_STORE_CTX_get_error(ctx); >+ int depth = X509_STORE_CTX_get_error_depth(ctx); >+@@ -115,24 +116,28 @@ PRIVATE int verify_callback (int ok, X509_STORE_CTX * >+ verify_error=X509_V_ERR_CERT_CHAIN_TOO_LONG; >+ } >+ } >+- switch (ctx->error) { >++ switch (ctx_error = X509_STORE_CTX_get_error(ctx)) { > >+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: >++#if OPENSSL_VERSION_NUMBER >= 0x10100000 >++ X509_NAME_oneline(X509_get_issuer_name(X509_STORE_CTX_get0_cert(ctx)), buf, 256); >++#else >+ X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256); >++#endif >+ HTTRACE(PROT_TRACE, "issuer= %s\n" _ buf); >+ break; >+ >+ case X509_V_ERR_CERT_NOT_YET_VALID: >+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: >+ HTTRACE(PROT_TRACE, "notBefore="); >+-// ASN1_TIME_print(bio_err,X509_get_notBefore(ctx->current_cert)); >++// ASN1_TIME_print(bio_err,X509_get_notBefore(X509_STORE_CTX_get0_cert(ctx))); >+ HTTRACE(PROT_TRACE, "\n"); >+ break; >+ >+ case X509_V_ERR_CERT_HAS_EXPIRED: >+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: >+ HTTRACE(PROT_TRACE, "notAfter="); >+-// ASN1_TIME_print(bio_err,X509_get_notAfter(ctx->current_cert)); >++// ASN1_TIME_print(bio_err,X509_get_notAfter(X509_STORE_CTX_get0_cert(ctx))); >+ HTTRACE(PROT_TRACE, "\n"); >+ break; >+ } >+@@ -214,12 +219,6 @@ PUBLIC BOOL HTSSL_init (void) >+ > /* select the protocol method */ > switch (ssl_prot_method) { >-+#ifndef OPENSSL_NO_SSL2 >- case HTSSL_V2: >- meth = SSLv2_client_method(); >- break; >-+#endif >-+#ifndef OPENSSL_NO_SSL3_METHOD >- case HTSSL_V3: >- meth = SSLv3_client_method(); >- break; >-+#endif >+- case HTSSL_V2: >+- meth = SSLv2_client_method(); >+- break; >+- case HTSSL_V3: >+- meth = SSLv3_client_method(); >+- break; > case HTSSL_V23: > meth = SSLv23_client_method(); > break; >Index: www/libwww/files/patch-configure >=================================================================== >--- www/libwww/files/patch-configure (revision 481216) >+++ www/libwww/files/patch-configure (nonexistent) >@@ -1,15 +0,0 @@ >---- configure.orig 2018-07-04 23:24:12 UTC >-+++ configure >-@@ -16416,8 +16416,11 @@ $as_echo "no" >&6; } >- if test "x$withval" = "xyes"; then >- withval=$ssllib >- SSLINC=$sslinc >-+ LIBS="$LIBS $withval" >-+ else >-+ SSLINC="-I$withval/include/openssl" >-+ LIBS="$LIBS -L$withval/lib -lssl -lcrypto" >- fi >-- LIBS="$LIBS $withval" >- cat confdefs.h - <<_ACEOF >conftest.$ac_ext >- /* end confdefs.h. */ >- > >Property changes on: www/libwww/files/patch-configure >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: www/libwww/files/patch-configure.ac >=================================================================== >--- www/libwww/files/patch-configure.ac (nonexistent) >+++ www/libwww/files/patch-configure.ac (working copy) >@@ -0,0 +1,91 @@ >+--- configure.ac.orig 2018-10-07 03:44:56 UTC >++++ configure.ac >+@@ -710,63 +710,33 @@ AC_ARG_WITH(extension, >+ ) >+ AC_SUBST(MYEXT) >+ >++PKG_CHECK_MODULES([OPENSSL], [openssl], [ >++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" >++ LIBS="$LIBS $OPENSSL_LIBS" >++], [AC_CHECK_LIB([ssl], [SSL_library_init], [ >++ LIBS="$LIBS -lssl -lcrypto" >++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" >++ ], [ >++ AC_CHECK_LIB([ssl], [SSL_library_init_ssl], [ >++ LIBS="$LIBS -lssl -lcrypto" >++ CFLAGS="$CFLAGS $OPENSSL_CFLAGS" >+ >++ ], [ >++ AC_MSG_ERROR([The OpenSSL library was not found]) >++ ]) >++ ]) >++]) >+ >+-dnl Checks for libwww and OpenSSL: >+-AC_MSG_CHECKING(whether we can find OpenSSL) >+-dnl find the ssl library dir (empirical) >+-if test -d '/usr/local/ssl/lib'; then >+- ssllib="-L/usr/local/ssl/lib -lssl -lcrypto" >+-else >+- ssllib="-L/usr/lib -lssl -lcrypto" >+-fi >+-dnl find the ssl include dir (empirical) >+-if test -d '/usr/local/ssl/include'; then >+- sslinc="-I/usr/local/ssl/include" >+-elif test -d '/usr/local/openssl/include'; then >+- sslinc="-I/usr/local/openssl/include" >+-elif test -d '/usr/local/include/openssl'; then >+- sslinc="-I/usr/local/include/openssl" >+-elif test -d '/usr/include/ssl'; then >+- sslinc="-I/usr/include/ssl" >+-elif test -d '/usr/include/openssl'; then >+- sslinc="-I/usr/include/openssl" >+-else >+- sslinc="" >+-fi >+-WWWSSL="" >+-SSLINC="" >+-LIBSSL="" >+-LWWWSSL="" >+-LIBWWWSSL="" >+-WWWSSLEX="" >+-AC_ARG_WITH(ssl, >+-[ --with-ssl[=PATH] Link with OpenSSL.], >+-[ case "$withval" in >+- no) >+- AC_MSG_RESULT(no) >+- ;; >+- *) >+- if test "x$withval" = "xyes"; then >+- withval=$ssllib >+- SSLINC=$sslinc >+- fi >+- LIBS="$LIBS $withval" >+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ SSL_library_init(); ]])],[],[ AC_MSG_ERROR(Could not find the $withval libraries. You must first install openSSL.) ]) >+- AC_MSG_RESULT(yes) >+- WWWSSL="libwwwssl.la" >+- LWWWSSL="-lwwwssl" >+- LIBWWWSSL='${top_builddir}/Library/src/SSL/libwwwssl.la' >+- WWWSSLEX='wwwssl$(EXEEXT)' >+- AC_DEFINE(HT_SSL, 1, [Define to enable ssl transport.]) >+- ;; >+- esac ], >+-[ AC_MSG_RESULT(no) ]) >+-AC_SUBST(WWWSSL) >+-AC_SUBST(SSLINC) >+-AC_SUBST(LWWWSSL) >+-AC_SUBST(LIBWWWSSL) >+-AC_SUBST(WWWSSLEX) >++ WWWSSL="libwwwssl.la" >++ LWWWSSL="-lwwwssl" >++ LIBWWWSSL='${top_builddir}/Library/src/SSL/libwwwssl.la' >++ WWWSSLEX='wwwssl$(EXEEXT)' >++ AC_DEFINE(HT_SSL, 1, [Define to enable ssl transport.]) >++ AC_SUBST(WWWSSL) >++ AC_SUBST(SSLINC) >++ AC_SUBST(LWWWSSL) >++ AC_SUBST(LIBWWWSSL) >++ AC_SUBST(WWWSSLEX) >+ >+ AC_MSG_CHECKING(whether to use internal signal handlers) >+ AC_ARG_ENABLE(signals, [ --enable-signals use internal libwww signal handler.], > >Property changes on: www/libwww/files/patch-configure.ac >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228943
: 197860