Giorgi Aptsiauri
Giorgi Aptsiauri

Reputation: 355

Compiled libcurl and OpenSSL separately, is it the same as compiling libcurl with OpenSSL?

So, I have compiled the following:

libcurl: x86/debug, x86/release, x64/debug, x64/release

OpenSSL: x86/debug, x86/release, x64/debug, x64/release

Now, I have setup visual studio for all those configs with both libcurl and OpenSSL included.

I have seen people mention compiling libcurl with OpenSSL. Is it the same as what I did?

BTW, if I run this:

#define CURL_STATICLIB
#include <stdio.h>
#include <curl/curl.h>
#include <iostream>

int main(void)
{
    curl_version_info_data* vinfo = curl_version_info(CURLVERSION_NOW);
    if (vinfo->features & CURL_VERSION_SSL)
        std::cout << "yes" << std::endl;
    else
        std::cout << "no" << std::endl;
    return 0;
}

Output:

yes

Does this mean my setup is good, if I want to use libcurl with SSL support?

Also, if order matters, I compiled libcurl first and then OpenSSL.

Platform: Windows

Toolchain: VC++

Upvotes: 1

Views: 352

Answers (1)

rustyx
rustyx

Reputation: 85481

You shouldn't need OpenSSL at all when building libcurl on Windows.

libcurl by default uses Schannel (WinCNG, Windows native crypto) when built on Windows.

If CURL_VERSION_SSL is reporting true then SSL support is enabled correctly.

Upvotes: 1

Related Questions