dongna2498 2015-03-10 07:18
浏览 46

HTTP基本身份验证与SSL / TLS(HTTPS)结合使用将用于验证用户身份

i need to send json request (RESTful) to a URL where the server authority send me the username & password and ask me to send the request to the server using "HTTP Basic Authentication combined with SSL/TLS (HTTPS) will be used to authenticate user".

when i send the request to that link using cURL then i get the error. "Error: call to URL failed with status 0, curl_error SSL certificate problem: self signed certificate, curl_errno 60"

My Web server version is: IIS7, PHP Version: 5.3.27.

Now, what is the process to complete the task. please help.

  • 写回答

1条回答 默认 最新

  • dongxinxin7809 2015-03-10 07:27
    关注

    This is not a problem with HTTP Basic Auth but with certificate You've generated for Your server, which is not signed.

    If it's You dev server You can switch off SSL verification

    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 
    

    In case it's production You have to sign Your certificate with proper CA.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog