-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add advapi32 as explicit link library #2363
Conversation
advapi32 is required by some of libcurl's functions: [`CryptReleaseContext`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380268(v=vs.85).aspx): ``` lib/curl_ntlm_core.c=352=static bool encrypt_des(const unsigned char *in, unsigned char *out, lib/curl_ntlm_core.c:384: CryptReleaseContext(hprov, 0); lib/curl_ntlm_core.c:395: CryptReleaseContext(hprov, 0); lib/curl_ntlm_core.c=555=CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, lib/curl_ntlm_core.c:616: CryptReleaseContext(hprov, 0); lib/md5.c=154=static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) lib/md5.c:163: CryptReleaseContext(ctx->hCryptProv, 0); lib/vtls/schannel.c=1671=static CURLcode Curl_schannel_random(struct Curl_easy *data UNUSED_PARAM, lib/vtls/schannel.c:1683: CryptReleaseContext(hCryptProv, 0UL); lib/vtls/schannel.c:1687: CryptReleaseContext(hCryptProv, 0UL); lib/vtls/schannel.c=1893=static void Curl_schannel_checksum(const unsigned char *input, lib/vtls/schannel.c:1939: CryptReleaseContext(hProv, 0); src/tool_metalink.c=385=static void win32_crypto_final(struct win32_crypto_hash *ctx, src/tool_metalink.c:396: CryptReleaseContext(ctx->hCryptProv, 0); ``` [`CryptGetHashParam`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379947(v=vs.85).aspx): ``` lib/curl_ntlm_core.c=555=CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, lib/curl_ntlm_core.c:613: CryptGetHashParam(hhash, HP_HASHVAL, ntbuffer, &length, 0); lib/md5.c=154=static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) lib/md5.c:157: CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0); lib/md5.c:159: CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0); lib/vtls/schannel.c=1893=static void Curl_schannel_checksum(const unsigned char *input, lib/vtls/schannel.c:1923: if(!CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE *)&cbHashSize, lib/vtls/schannel.c:1931: if(CryptGetHashParam(hHash, HP_HASHVAL, checksum, &dwChecksumLen, 0)) src/tool_metalink.c=385=static void win32_crypto_final(struct win32_crypto_hash *ctx, src/tool_metalink.c:390: CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0); src/tool_metalink.c:392: CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0); ``` As well as `CryptCreateHash`, `CryptHashData`, `CryptDestroyHash`, `CryptGenRandom`
This adds missing library, advapi32, to linking. Fixes ARM builds. The same patch is pending merge upstream: curl/curl#2363
This adds missing library, advapi32, to linking. Fixes ARM builds. The same patch is pending merge upstream: curl/curl#2363
I think this be if |
I think what @jay meant is to enable it in a https://github.com/openssl/openssl/blob/97a479c6f835ba7e1e5b03de4ff59bf829a6eadd/NOTES.WIN#L116-L118 I can promote it to |
Updated to |
@janisozaur just curious, why it's currently working on AppVeyor without those changes. |
Sure, target ARM. |
@janisozaur just for my information :) |
Sorry, but I don't know. OpenSSL seems to already pull in I'd be surprised if it wasn't used on x86, as the linked MSDN pages suggest it is supposed to linked, but it's Windows, so you can never know. |
@jay If you've no further questions, can I merge this? |
Yes but this will also need a squash and rebase and the commit message in our format, so for example (assuming I understand this issue right)
A separate section with the metadata like Make sure the author is listed as the author before you commit, see also https://github.com/curl/curl/wiki/push-access-guidelines#how-to-work-with-a-pr-branch The id is not needed in the subject line but not forbidden either afaik. Refer to existing commits already in the repo for more format examples |
I'm happy for this to be squashed and the proposed commit message looks good. |
@janisozaur landed on bea18c7. |
advapi32 is required by some of libcurl's functions:
CryptReleaseContext
:CryptGetHashParam
:As well as
CryptCreateHash
,CryptHashData
,CryptDestroyHash
,CryptGenRandom