Re: IXWebSocket wss c++ client cannot connect to Node.js wss server using an ip address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux