X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Message-ID: <5682CFF6.20801@gmx.de> Date: Tue, 29 Dec 2015 19:24:54 +0100 From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7 MIME-Version: 1.0 To: rt AT openssl DOT org, djgpp AT delorie DOT com Subject: [PATCH] Some DJGPP specific fixes and improvements for OpenSSL_1_0_1-stable and OpenSSL_1_0_2-stable. Content-Type: multipart/mixed; boundary="------------010304000903040409040204" X-Provags-ID: V03:K0:wrwDyT2051GYWygm4dMcAk6h3SCDPClSz2lc/otuZA2rKodhTpm nCjTLtRpt9dmB/UFiRIvybVXZLH4Q2GsSJIZh7/VUF9YMSP8IGmjN9xhbpYrPxfoHiNVp8y V0W4WDRTmozAjPhFIkChgqLqtWeJrKv641J9SuCSh8lPP0gYSz+oyglarxxEQOmpWE5auOA rHu0P2eum8uoD72BF6Pug== X-UI-Out-Filterresults: notjunk:1;V01:K0:ibhhQ+kDw5o=:2YQcFOW5vFUHafrwvwuO/R oKcIznEOWz+7wo6xU/WqbfaUNGX9+lVLNodGgoXjyAOO8SOkDbqSIX3zmVC62ZP1hOno5OrLX r/daUTTvTFR0L/iKfxFmw7bztrDZwWeteq8aR6fJK9IMbdSvBaa+8kkIOrwIO78g0UcPrwMqp DXOoBEHWpKbe8Pa44zP9Nv+BJV6RCne9M+R4JSlSjXJwgTzBWp3BRVZuHEhVqfyTuzRTG5Suc HSEJ82o0nUhDoaDp0I/bZHe/BkgEg8YYu6PafXmwRelg6m9iJN35xIZ1hxMyCC0vughRGFXP/ f0yhQcHg95ke3B8McStWKjDUAbdJ84yxpOVDfqOOmVwte61oHahxDjsBrOOaEIEBu9pPsWoWk l6ZhcCR9GBkGrg/NI8DXlTmmi2mBhnL/K2CcTQjNknKz27f7izgFvzLTt5q8XUpzMbbNjmKCk 5K/7vPr2WXcFFGK3JCdriPNUN/5x9JON0KQbpSWt57twBL4fYaNk+C4m5JzotJZCU9R9dAsGJ xYKgrfWLk0fNbURoY0DALhCKxocJqJBRd0yWTJeD9dezSI5DIOvQ3Ip8Jcj5pQk7z0FzDidZ+ dAp3K1H10B8Zi4SE305D8IhPb3n3pdOoHp9nVt4LSqS+plqTELLa03PizpBZQ1f89pSWZS/S5 +C3c0Dzy0EV6axvAb/n71UJuMUdcruSkqpoEqQQflENO+uLi7aAL5hU7AFmlxy/LSwSFRLCHi Mag6R0WPlNwH7HIEq8GmwXdXspzQMXDcyQcR7ZG6tDFag9zwa9dNHnkC6d8= Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------010304000903040409040204 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit I have been using the DJGPP port of OpenSSL for a couple of years and I would like to propose some fixes and improvements. No one of the proporsed changes have impact on any other port. I supply two patches, one for today's OpenSSL_1_0_1-stable and one for today's openssl-OpenSSL_1_0_2-stable. Patching the master branch is not so straight forward so it will follow later. Both patches will fix/improve the following issues: 1) In Configure: For some reason -DTERMIO is set but DJGPP has never offered TERMIO making the build fail. I have changed this to -DTERMIOS as is used to be. 2) In crypto/bio/bss_dgram.c: I have removed superflous macro definitions of sock_write, sock_read and sock_puts enclosed by WATT32. 3) In crypto/bio/bss_sock.c: Here the existing macro definitions for sock_write, sock_read and sock_puts are necessary and must be kept but they must be undefined before they can be defined. This is because newer versions of Watt-32 also redefine them. 4) In crypto/conf/conf_def.c: If this port is used on MS-DOS or FreeDOS it becomes necessary to check if the underlying file system supports long file names (aka LFN) or not. If it does not then file names with a leading dot like ".rnd" or ".ca_certs" are ilicit. In function def_load_bio, the macros IS_RANDFILE and IS_CERT_DIR are used to check if the file system offers LFN support so that the file names with leading dots are licit. If the tests fail then the new function dosify_filename is called and will substitute invalid characters in the file name by valid ones before using them. This check and the call of dosify_filename is enclosed by OPENSSL_SYS_MSDOS. 5) In e_os.h: In the DJGPP section the macros IS_RANDFILE and IS_CERT_DIR are defined. Also some auxiliar macros like HAS_LFN_SUPPORT and FILE_EXISTS are defined. Because neither MS-DOS nor FreeDOS provide 'egd' sockets, the DEVRANDOM_EGD macro is undefined. This shall inhibit the compilation of code that does not work on MS-DOS/FreeDOS. 6) In util/mklink.pl: Neither MS-DOS nor FreeDOS provide symlink support so copy files instead. I have checked the modified versions of OpenSSL_1_0_1-stable and OpenSSL_1_0_2-stable on linux and Cygwin. They are no issues. This is no surprise because the changes are either enclosed by the __DJGPP__ or OPENSSL_SYS_MSDOS macros. If more informaton is required please mail me. I have attached the patches as gzip'ed files. Regards, Juan M. Guerrero --------------010304000903040409040204 Content-Type: application/x-gzip; name="djgpp-OpenSSL_1_0_1-stable.patch.txt.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="djgpp-OpenSSL_1_0_1-stable.patch.txt.gz" H4sICPTaglYCA2RqZ3BwLU9wZW5TU0xfMV8wXzEtc3RhYmxlLnBhdGNoLnR4dADNGP1T4sjy Z/NX9Gb3LSAkQEBAPH2ioMcdggV47pa7byokA+Y2JLx8qJzn//56ZkJMIrq1VXtVL6Uk09Pd M/0x/TFapbqnVDVF2wf4LdQduNCdkNpwHlLPo54L8MufCFYX0fh4sXxQTXokSTu7cOo6c2sR erQNMKYrWzeoCUp32htf9EcwW8ffE7AcOD0bdM4nKqc0vPUqcMszC/99n5gLT1+qBtxcd6bT mvaV81u6dxTcme/aNKDgUZPOLccKLNcBdy7tzEPH4ANHX1K/Db5rfCP3nhXQkvj2qG6C7phi tAoDf+vabDa99JnrwbUeBEpNA03V1Go1yVzaeYU76F68TdRD4EJwSy0PVp51p6MEfJ+ILsDS jhgvQz+AGYXQ2RDOLY+D5i7yQ9w1GGiXWZK3vtAtJyWNgabgPwRxUJw8vojt6iZBOQtwM7rs DSeTAZl8npCLSXc0YYKe6rYt7Ziub83XZG7ZlG2Jbd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IsBFfzgaM7xDaDHHfA+JZcnCCQ3CxHFYNEc0hCWG Ap1Z6HuEEaawSUIyFhpJ71N/Mp3kRXgUBbZuGNT38wJWgjEZ/V5gW68UUuTZIxaxyK/04JYF lZgBuTwlvGO96HwqoFKqWpqRuHP4Sc8X4Zr5bfr7OayR+SP85OdLIgGJqOQ5Jh6qrI7F9Qt3 s6T1NuB/b+5n2tH1zEGaNYIO/oldPxX+IYVEjiIq5dSdm0gU6Ws3+P6tGw+GsIVn6szHUJB5 5x96umO6yy8PWl1OuW6yyHCY8+PvJriOczwaICCKm50YIHrW3DAG1ASgywFfXlYjyYfh1wX+ WcxgTwD6MaAhAIMY0BSAXq6QlSAuh7ISGFkJaFYCLytB8IMSkKwEZlYCKyuBl+OtvQhory2B zhFf33KTcxJrzo0+If0zlDcqfCusmay19kXbEeUPHpJ2ibVcEUIsd3aQbK829Q8voEBO3LjK STRE6XU+R1gpoiQWFm8E/S3at+yEtpxsUtPBURxvbsBIFj7/ejhNEERFKyfNVnHX/eFpL3ME zjpXgyn5dXSBzGQhGM82qVyevsjF3JwGxJcA5qzKLgGq+/W5Vm+kb2MzJCLHZ4D8XrbKr2Wr 8a3sB2wMDuFP13LyWCqV4BjLW5Z9WHMmcQRWV+HgQ3SnjOnA8gP/kGIpD48RMC/LJVkuHED1 6UBSWLXz4T8joP8FeemvfYyqjy/oK4CoxReoLNlHgBwWwblXSVltSHXjVmwQ8sfs5ccNAts5 NjysfZMPpLhPyLBi6P8Dx76WBEgbAAA= --------------010304000903040409040204 Content-Type: application/x-gzip; name="djgpp-OpenSSL_1_0_2-stable.patch.txt.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="djgpp-OpenSSL_1_0_2-stable.patch.txt.gz" H4sICP7aglYCA2RqZ3BwLU9wZW5TU0xfMV8wXzItc3RhYmxlLnBhdGNoLnR4dADNGP1T4sjy Z/NX9Gb3LSAkkPgB6ukTBT3uECzAc7fcfVP5mGBuQ8JLgsp5/u+vZybEJKJbW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