mainGnuTLS - Support: sr #107560, libextra/openssl.h conflicts with...

 
 

sr #107560: libextra/openssl.h conflicts with wincrypt.h

Submitter:  -*- <_74148>
Submitted:  Sun 26 Dec 2010 02:40:25 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Confirmed
Privacy:  Public Assigned to:  jas
Open/Closed:  Closed Operating System:  Microsoft Windows
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 30 Dec 2010 12:46:38 PM UTC, comment #1: 

Renaming the variable is not an option -- this is for the OpenSSL emulation, and if we rename it, we are not emulating OpenSSL properly.

You want to build with --disable-openssl-compatibility to avoid building the OpenSSL emulation stuff at all.

I'll think about the gnutls_int.h workaround, so I'm leaving the report open.

/Simon

Simon Josefsson <jas>
Group administrator
Sun 26 Dec 2010 02:40:25 AM UTC, original submission:  

wincrypt.h from w32api MinGW package contains this line:
#define X509_NAME_VALUE ((LPCSTR) 6)

This conflicts with the definition from openssl.h:
  typedef gnutls_x509_dn X509_NAME;

and results in compile-time errors:
gnutls-2.10.4/libextra/gnutls_openssl.c:862:1: error: expected identifier or '(' before 'LPCSTR'
gnutls-2.10.4/libextra/gnutls_openssl.c:862:1: error: expected ')' before numeric constant
gnutls-2.10.4/libextra/gnutls_openssl.c:875:1: error: expected identifier or '(' before 'LPCSTR'
gnutls-2.10.4/libextra/gnutls_openssl.c:875:1: error: expected ')' before numeric constant

How to fix:
since wincrypt.h is included as a result of inclusion of sys/socket.h from gnutls_int.h, the obvious fix is to add this to gnutls_int.h, after #include <sys/socket.h>:

#if defined(X509_NAME) && defined(_WINCRYPT_H_)
#  undef X509_NAME
#endif

Another way to fix this is to use a different name, such as GNUTLS_X509_NAME

-*- <_74148>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nmav (Updated the item)
  • -email is unavailable- added by jas (Posted a comment)
  • -email is unavailable- added by _74148 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-05-07 nmav Open/ClosedOpen Closed
    2010-12-30 jas StatusNone Confirmed
        Assigned toNone jas

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code