IXWebSocket wss c++ client cannot connect to Node.js wss server using an ip address
Viktor Dukhovni
openssl-users at dukhovni.org
Mon Feb 20 18:54:10 UTC 2023
On Mon, Feb 20, 2023 at 01:31:07PM -0500, Pierre-Luc Boily wrote:
> My compiler doesn't like the following defines :
> "X509_CHECK_FLAG_NEVER_CHECK_SUBJECT" and
> "X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS". When I add the include file
> "x509v3.h", the compiler now complains about line 181 in x509v3.h, which is
> probably because he doesn't know what is "X509_NAME".
>
> My compiler version is visual studio 2017 and I use OpenSSL (compiled under
> visual studio 2017 as well)
>
> Should I ask this question under the dev mailing list instead?
The below works for me:
$ /usr/local/bin/openssl version
OpenSSL 1.1.1t 7 Feb 2023
$ cat foo.c
#include <stdio.h>
#include <openssl/x509v3.h>
int main(int argc, char *argv[])
{
unsigned int flags =
X509_CHECK_FLAG_NEVER_CHECK_SUBJECT |
X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS;
printf("%s: 0x%x\n", argv[0], flags);
return 0;
}
$ cc -I/usr/local/include -o foo foo.c
$ ./foo
./foo: 0x24
To use these macros, it suffices to include the requisite header. If
your compiler is unhappy, that's between you and your compiler. The
<openssl/x509v3.h> header includes the headers it needs.
Perhaps your problem is some variant of:
https://github.com/curl/curl/issues/5669
[ One of the top search hits for:
https://www.google.com/search?q=windows+openssl+visual+studio+x509v3.h ]
--
Viktor.
More information about the openssl-users
mailing list