Re: OpenSSL conflicts with wincrypt.h - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: OpenSSL conflicts with wincrypt.h
Date
Msg-id CAC+AXB19LnMDPA+KDiGjf=fYHgbRj2G4ays_ZfSBg7f43dR-vQ@mail.gmail.com
Whole thread Raw
In response to Re: OpenSSL conflicts with wincrypt.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: OpenSSL conflicts with wincrypt.h
List pgsql-hackers

On Fri, Feb 11, 2022 at 4:36 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Juan José Santamaría Flecha <juanjo.santamaria@gmail.com> writes:
> There is a comment in 'src/backend/libpq/be-secure-openssl.c' addressing
> this issue, but I have to explicitly undefine X509_NAME. Please find
> attached a patch for so.

Um ... why?  Shouldn't the #undef in the OpenSSL headers take care
of the problem?

After <openssl/ossl_typ.h> has been included, any inclusion of <wincrypt.h> will be troublesome. There is already something similar in 'contrib/sslinfo/sslinfo.c'. This shouldn't be a  problem while defining WIN32_LEAN_AND_MEAN, but kerberos is directly including <wincrypt.h> in <win-mac.h>.

Regards,

Juan José Santamaría Flecha

pgsql-hackers by date:

Previous
From: Filipe Rosset
Date:
Subject: Re: How did queensnake corrupt zic.o?
Next
From: Jeevan Ladhe
Date:
Subject: Re: refactoring basebackup.c