office-gobmx/external/neon/neon_fix_no_OPENSSL_Applink.patch
Mike Kaganski fe75ce648c Fix a crash in OpenSSL when checking updates in dbgutil build on Windows
... showing a message "OPENSSL_Uplink(00007FFF05F33000,08): no OPENSSL_Applink"
with this call stack:

libeay32.dll!OPENSSL_showfatal(const char * fmta, ...) Line 986
	at C:\lo\src\build\workdir\UnpackedTarball\openssl\crypto\cryptlib.c(986)
libeay32.dll!unimplemented() Line 23
	at C:\lo\src\build\workdir\UnpackedTarball\openssl\ms\uplink.c(23)
libeay32.dll!file_ctrl(bio_st * b, int cmd, long num, void * ptr) Line 334
	at C:\lo\src\build\workdir\UnpackedTarball\openssl\crypto\bio\bss_file.c(334)
libeay32.dll!BIO_ctrl(bio_st * b, int cmd, long larg, void * parg) Line 361
	at C:\lo\src\build\workdir\UnpackedTarball\openssl\crypto\bio\bio_lib.c(361)
[Inline Frame] libeay32.dll!X509_print_ex_fp(_iobuf *) Line 93
	at C:\lo\src\build\workdir\UnpackedTarball\openssl\crypto\asn1\t_x509.c(93)
libeay32.dll!X509_print_fp(_iobuf * fp, x509_st * x) Line 80
	at C:\lo\src\build\workdir\UnpackedTarball\openssl\crypto\asn1\t_x509.c(80)
neon.dll!make_chain(stack_st_X509 * chain) Line 446
	at C:\lo\src\build\workdir\UnpackedTarball\neon\src\ne_openssl.c(446)
neon.dll!ne__negotiate_ssl(ne_session_s * sess) Line 752
	at C:\lo\src\build\workdir\UnpackedTarball\neon\src\ne_openssl.c(752)
neon.dll!open_connection(ne_session_s * sess) Line 1706
	at C:\lo\src\build\workdir\UnpackedTarball\neon\src\ne_request.c(1706)
neon.dll!send_request(ne_request_s * req, const ne_buffer * request) Line 1011
	at C:\lo\src\build\workdir\UnpackedTarball\neon\src\ne_request.c(1011)
neon.dll!ne_begin_request(ne_request_s * req) Line 1245
	at C:\lo\src\build\workdir\UnpackedTarball\neon\src\ne_request.c(1245)
neon.dll!ne_request_dispatch(ne_request_s * req) Line 1456
	at C:\lo\src\build\workdir\UnpackedTarball\neon\src\ne_request.c(1456)
ucpdav1.dll!webdav_ucp::NeonSession::OPTIONS(const rtl::OUString & inPath, webdav_ucp::DAVOptions & rOptions, const webdav_ucp::DAVRequestEnvironment & rEnv) Line 918
	at C:\lo\src\core\ucb\source\ucp\webdav-neon\NeonSession.cxx(918)
ucpdav1.dll!webdav_ucp::DAVResourceAccess::OPTIONS(webdav_ucp::DAVOptions & rOptions, const com::sun::uno::Reference<com::sun::ucb::XCommandEnvironment> & xEnv) Line 187
	at C:\lo\src\core\ucb\source\ucp\webdav-neon\DAVResourceAccess.cxx(187)
ucpdav1.dll!webdav_ucp::Content::getResourceOptions(const com::sun::uno::Reference<com::sun::ucb::XCommandEnvironment> & xEnv, webdav_ucp::DAVOptions & rDAVOptions, const std::unique_ptr<webdav_ucp::DAVResourceAccess,std::default_delete<webdav_ucp::DAVResourceAccess>> & rResAccess, bool * networkAccessAllowed) Line 3934
	at C:\lo\src\core\ucb\source\ucp\webdav-neon\webdavcontent.cxx(3934)
ucpdav1.dll!webdav_ucp::Content::open(const com::sun::ucb::OpenCommandArgument3 & rArg, const com::sun::uno::Reference<com::sun::ucb::XCommandEnvironment> & xEnv) Line 2227
	at C:\lo\src\core\ucb\source\ucp\webdav-neon\webdavcontent.cxx(2227)
ucpdav1.dll!webdav_ucp::Content::execute(const com::sun::ucb::Command & aCommand, long __formal, const com::sun::uno::Reference<com::sun::ucb::XCommandEnvironment> & Environment) Line 553
	at C:\lo\src\core\ucb\source\ucp\webdav-neon\webdavcontent.cxx(553)
updatefeedlo.dll!`anonymous namespace'::UpdateInformationProvider::load(const rtl::OUString & rURL) Line 493
	at C:\lo\src\core\extensions\source\update\feed\updatefeed.cxx(493)
updatefeedlo.dll!`anonymous namespace'::UpdateInformationProvider::getUpdateInformationEnumeration(const com::sun::uno::Sequence<rtl::OUString> & repositories, const rtl::OUString & extensionId) Line 591
	at C:\lo\src\core\extensions\source\update\feed\updatefeed.cxx(591)
updchklo.dll!checkForUpdates(UpdateInfo & o_rUpdateInfo, const com::sun::uno::Reference<com::sun::uno::XComponentContext> & rxContext, const com::sun::uno::Reference<com::sun::task::XInteractionHandler> & rxInteractionHandler, const com::sun::uno::Reference<com::sun::deployment::XUpdateInformationProvider> & rUpdateInfoProvider, const rtl::OUString & rOS, const rtl::OUString & rArch, const com::sun::uno::Sequence<rtl::OUString> & rRepositoryList, const rtl::OUString & rGitID, const rtl::OUString & rInstallSetID) Line 129
	at C:\lo\src\core\extensions\source\update\check\updateprotocol.cxx(129)
updchklo.dll!checkForUpdates(UpdateInfo & o_rUpdateInfo, const com::sun::uno::Reference<com::sun::uno::XComponentContext> & rxContext, const com::sun::uno::Reference<com::sun::task::XInteractionHandler> & rxInteractionHandler, const com::sun::uno::Reference<com::sun::deployment::XUpdateInformationProvider> & rUpdateInfoProvider) Line 97
	at C:\lo\src\core\extensions\source\update\check\updateprotocol.cxx(97)
updchklo.dll!`anonymous namespace'::UpdateCheckThread::runCheck(bool & rbExtensionsChecked) Line 393
	at C:\lo\src\core\extensions\source\update\check\updatecheck.cxx(393)
updchklo.dll!`anonymous namespace'::UpdateCheckThread::run() Line 501
	at C:\lo\src\core\extensions\source\update\check\updatecheck.cxx(501)
updchklo.dll!threadFunc(void * param) Line 186
	at C:\lo\src\core\include\osl\thread.hxx(186)
sal3.dll!oslWorkerWrapperFunction(void * pData) Line 62
	at C:\lo\src\core\sal\osl\w32\thread.cxx(62)
ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97
	at minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(97)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

The problem is missing OPENSSL_Applink function in soffice.bin
(see workdir/UnpackedTarball/openssl/ms/uplink.c), because
openssl/applink.c is not included. That started after commit
5c89198f69, which enabled debug
output from Neon in dbgutil builds.

Just comment out the call to the OpenSSL function that uses file
pointer API from the Neon debug code on Windows.

Change-Id: Id0188990e9122ee9fd2b3b6b7292bbeb1d206515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88412
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2020-02-12 05:44:19 +01:00

11 lines
353 B
Diff

--- src/ne_openssl.c
+++ src/ne_openssl.c
@@ -440,7 +440,7 @@
#ifdef NE_DEBUGGING
if (ne_debug_mask & NE_DBG_SSL) {
fprintf(ne_debug_stream, "Cert #%d:\n", n);
- X509_print_fp(ne_debug_stream, cert->subject);
+ // X509_print_fp(ne_debug_stream, cert->subject);
}
#endif
if (top == NULL) {