[openssl-dev] [openssl.org #4208] [PATCH] Some DJGPP specific fixes and improvements for OpenSSL_1_0_1-stable and OpenSSL_1_0_2-stable.

Juan Manuel Guerrero via RT rt at openssl.org
Tue Dec 29 19:43:06 UTC 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: djgpp-OpenSSL_1_0_1-stable.patch.txt.gz
Type: application/x-gzip
Size: 2615 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20151229/d282a537/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: djgpp-OpenSSL_1_0_2-stable.patch.txt.gz
Type: application/x-gzip
Size: 2615 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20151229/d282a537/attachment-0003.bin>
-------------- next part --------------
_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod


More information about the openssl-dev mailing list