如何在构建libcurl时启用摘要

时间:2015-11-10 11:50:06

标签: c++ c linux curl libcurl

我构建libcurl并运行它,但是当服务器需要摘要式身份验证时它不起作用。

我检查了C代码,发现以下部分(在output_auth_headers函数中的http.c中)没有构建:

#ifndef CURL_DISABLE_CRYPTO_AUTH
  if(authstatus->picked == CURLAUTH_DIGEST) {
    auth="Digest";
    result = Curl_output_digest(conn,
                                proxy,
                                (const unsigned char *)request,
                                (const unsigned char *)path);
    if(result)
      return result;
  }
  else
#endif

我应该怎样做才能使这部分代码构建,然后让摘要运行?

1 个答案:

答案 0 :(得分:1)

配置时,请务必选择--enable-crypto-auth

像这样:

./buildconf && ./configure --enable-crypto-auth