pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <bdo id='K8Xe1'></bdo><ul id='K8Xe1'></ul>

      <small id='K8Xe1'></small><noframes id='K8Xe1'>

    1. <i id='K8Xe1'><tr id='K8Xe1'><dt id='K8Xe1'><q id='K8Xe1'><span id='K8Xe1'><b id='K8Xe1'><form id='K8Xe1'><ins id='K8Xe1'></ins><ul id='K8Xe1'></ul><sub id='K8Xe1'></sub></form><legend id='K8Xe1'></legend><bdo id='K8Xe1'><pre id='K8Xe1'><center id='K8Xe1'></center></pre></bdo></b><th id='K8Xe1'></th></span></q></dt></tr></i><div class="5dr7fnb" id='K8Xe1'><tfoot id='K8Xe1'></tfoot><dl id='K8Xe1'><fieldset id='K8Xe1'></fieldset></dl></div>
      <legend id='K8Xe1'><style id='K8Xe1'><dir id='K8Xe1'><q id='K8Xe1'></q></dir></style></legend>
    2. <tfoot id='K8Xe1'></tfoot>

        如何修復 curl:(35) 無法與對等方安全通信:沒有通

        How to fix curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s)(如何修復 curl:(35) 無法與對等方安全通信:沒有通用的加密算法)
        <tfoot id='gINt3'></tfoot>

              • <bdo id='gINt3'></bdo><ul id='gINt3'></ul>
                  <tbody id='gINt3'></tbody>
              • <i id='gINt3'><tr id='gINt3'><dt id='gINt3'><q id='gINt3'><span id='gINt3'><b id='gINt3'><form id='gINt3'><ins id='gINt3'></ins><ul id='gINt3'></ul><sub id='gINt3'></sub></form><legend id='gINt3'></legend><bdo id='gINt3'><pre id='gINt3'><center id='gINt3'></center></pre></bdo></b><th id='gINt3'></th></span></q></dt></tr></i><div class="v5ddldr" id='gINt3'><tfoot id='gINt3'></tfoot><dl id='gINt3'><fieldset id='gINt3'></fieldset></dl></div>
              • <small id='gINt3'></small><noframes id='gINt3'>

              • <legend id='gINt3'><style id='gINt3'><dir id='gINt3'><q id='gINt3'></q></dir></style></legend>

                  本文介紹了如何修復 curl:(35) 無法與對等方安全通信:沒有通用的加密算法的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 php curlhttps://torrage.com 訪問和下載一些 .torrent 文件.但是什么也沒發生,curl_error($ch) 給出

                  I am trying to access and download some .torrent files from https://torrage.com using php curl. But nothing happens , curl_error($ch) gives

                  $ch = curl_init ('https://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent');
                  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                  curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
                  curl_setopt($ch, CURLOPT_HEADER, 1);
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                  curl_setopt($ch, CURLOPT_VERBOSE,true);
                  $data = curl_exec($ch);
                  $error = curl_error($ch);
                  curl_close ($ch);
                  echo $error;
                  

                  這給了.

                  Cannot communicate securely with peer: no common encryption algorithm(s).
                  

                  如果我像這樣從 shell 中嘗試

                  If I try from shell like this

                  [root@prod1 yum.repos.d]# curl -I https://torrage.com
                  curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
                  

                  處于詳細模式

                  [root@prod1 yum.repos.d]# curl -v https://torrage.com
                  * Rebuilt URL to: https://torrage.com/
                  *   Trying 81.17.30.48...
                  * Connected to torrage.com (81.17.30.48) port 443 (#0)
                  * Initializing NSS with certpath: sql:/etc/pki/nssdb
                  *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
                    CApath: none
                  * NSS error -12286 (SSL_ERROR_NO_CYPHER_OVERLAP)
                  * Cannot communicate securely with peer: no common encryption algorithm(s).
                  * Closing connection 0
                  curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
                  

                  系統信息centos 7.x86_64

                  [root@prod1 yum.repos.d]# uname -a
                  Linux prod1.localdomain 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
                  

                  卷曲版本

                  [root@prod1 yum.repos.d]# curl -V
                  curl 7.29.0 (x86_64-redhat-linux-gnu)
                  

                  openssl ,已經打過補丁.

                  [root@prod1 yum.repos.d]# openssl version -a
                  OpenSSL 1.0.1e-fips 11 Feb 2013
                  built on: Mon Jun 15 18:39:20 UTC 2015
                  platform: linux-x86_64
                  options:  bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
                  compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -Wa,--noexecstack -DPURIFY -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
                  OPENSSLDIR: "/etc/pki/tls"
                  engines:  dynamic
                  

                  驗證 openssl 是否打補丁.

                  [root@prod1 yum.repos.d]# rpm -q --changelog openssl | grep CVE-2014-0224
                  - fix CVE-2014-0224 fix that broke EAP-FAST session resumption support
                  - fix CVE-2014-0224 - SSL/TLS MITM vulnerability
                  

                  <小時>

                  我嘗試過的:

                  1) 我曾嘗試使用 HTTP insted of HTTPS,但該站點強制使用 HTTPS.例如

                  [root@prod1 yum.repos.d]# curl -I http://torrage.com
                  HTTP/1.1 301 Moved Permanently
                  Server: nginx/1.9.0
                  Date: Mon, 29 Jun 2015 04:13:17 GMT
                  Content-Type: text/html
                  Content-Length: 184
                  Connection: keep-alive
                  Location: https://torrage.com/
                  

                  2) 更新 ca-bundle.crt

                  cp /etc/pki/tls/certs/ca-bundle.crt /root/backup/
                  curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
                  

                  3) 將 Curl 更新到最新版本 7.43.0

                  nano /etc/yum.repos.d/city-fan-for-curl.repo
                  

                  使用此存儲庫.

                  [CityFanforCurl]
                  name=City Fan Repo
                  baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
                  enabled=0
                  gpgcheck=0
                  

                  然后做

                  yum update curl --enablerepo=CityFanforCurl
                  

                  然后驗證 curl 版本

                  then verifying curl version

                  [root@prod1 yum.repos.d]# curl -V
                  curl 7.43.0 (x86_64-redhat-linux-gnu) libcurl/7.43.0 NSS/3.18 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.6.0
                  Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
                  Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets Metalink
                  

                  4) 我試過這個來檢查我的 curl 是否過時.

                  參考:https://unix.stackexchange.com/questions/162816/disable-sslv3-in-curl

                  [root@prod1 yum.repos.d]# curl -1IsS --ciphers ecdhe_ecdsa_aes_128_sha https://sslspdy.com
                  HTTP/1.1 200 OK
                  Server: nginx centminmod
                  Content-Type: text/html; charset=utf-8
                  Connection: close
                  Vary: Accept-Encoding
                  Strict-Transport-Security: max-age=31536000; includeSubdomains
                  Date: Mon, 12 Jan 1970 23:00:11 GMT
                  X-Page-Speed: ngx_pagespeed
                  Cache-Control: max-age=0, no-cache
                  

                  <小時>

                  我該如何解決這個問題?并使用 PHP Curl 從 Torrage.com 下載文件?


                  How can i fix the issue ? and download files from Torrage.com using PHP Curl ?

                  *我不能使用 file_get_contents,因為我正在使用 curl_multi 進行同步下載.

                  *I cant use file_get_contents as i am using curl_multi for simultaneous downloads.

                  更新 1:

                  正如 steffen-ullrich 所建議的

                  [root@prod1 randoadmin]# curl --ciphers ecdhe_rsa_aes_128_gcm_sha_256 -I https://torrage.com
                  HTTP/1.1 200 OK
                  Server: nginx/1.9.0
                  Date: Mon, 29 Jun 2015 05:54:17 GMT
                  Content-Type: text/html; charset=UTF-8
                  Connection: keep-alive
                  Expires: Mon, 26 Jul 1997 05:00:00 GMT
                  Last-Modified: Mon, 29 Jun 2015 05:50:40 GMT
                  Cache-Control: no-store, no-cache, must-revalidate
                  Cache-Control: post-check=0, pre-check=0
                  Pragma: no-cache
                  Vary: Accept-Encoding, Accept-Encoding
                  Strict-Transport-Security: max-age=31536000
                  X-Frame-Options: DENY
                  X-Content-Type-Options: nosniff
                  

                  但那是 shell 我如何用 PHP-curl 實現它?

                  but thats with shell how can i implement it with PHP-curl ?

                  更新 2:

                  我已經修改了代碼并定義了密碼,以便在像這樣使用 curl 時使用.

                  i have modified code and defined cipher to use while using curl like this.

                  $ch = curl_init ('https://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent');
                  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                  curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
                  curl_setopt($ch, CURLOPT_HEADER, 1);
                  curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'ecdhe_rsa_aes_128_gcm_sha_256');
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                  curl_setopt($ch, CURLOPT_VERBOSE,true);
                  $data = curl_exec($ch);
                  $error = curl_error($ch);
                  curl_close ($ch);
                  echo $error;
                  echo $data ;
                  

                  它工作得很好.非常感謝 steffen-ullrich 解決了問題.

                  Its working great. Issue solved many thanks to steffen-ullrich .

                  推薦答案

                  服務器僅支持 ECC 密碼 (ECDHE-*).curl 的版本是使用 Redhat/CentOS 上的 NSS 庫構建的.有一個錯誤報告指出 Redhat/CentOS 會覆蓋 curl 設置并且默認禁用 ECC 密碼.因為客戶端沒有提供 ECC 密碼,而服務器只支持 ECC 密碼,所以連接將失敗.

                  The server supports only ECC ciphers (ECDHE-*). The version of curl is built with the NSS library on Redhat/CentOS. There is a bug report that Redhat/CentOS overrides the curl settings and disables ECC ciphers by default. Because there are thus no ECC ciphers offered by the client but only ECC ciphers are supported by the server the connection will fail.

                  您可以嘗試明確給出密碼,即

                  You might try to explicitly give the cipher, i.e.

                  curl --ciphers ecdhe_rsa_aes_128_gcm_sha_256 ...
                  

                  請注意,升級 OpenSSL 無濟于事,因為 curl 不是使用 OpenSSL 后端構建的.此外,禁用證書驗證(無論如何都是壞主意)或更改根 CA 也無濟于事,因為問題根本與證書驗證無關.

                  Note that upgrading OpenSSL would not help because curl is not built with the OpenSSL backend. Also it does not help to disable certificate validation (bad idea anyway) or to change the root CA's since the problem is not related to certificate validation at all.

                  嘗試使用 --ciphers ecdhe_ecdsa_aes_128_sha 明確給出密碼,因為解決問題的密碼朝著正確的方向發展,但在這種情況下無濟于事,因為這不是支持的密碼之一由服務器.服務器僅支持各種 ECDHE-RSA-* 密碼,但不支持 ECDHE-ECDSA-* 密碼.有關詳細信息,請參閱 SSLLabs.

                  Trying to explicitly give the cipher with --ciphers ecdhe_ecdsa_aes_128_sha as the cipher to solve the problem goes into the right direction but will not help in this case, because this is not one of the ciphers supported by the servers. The server supports only various ECDHE-RSA-* ciphers but not ECDHE-ECDSA-* ciphers. See SSLLabs for details.

                  這篇關于如何修復 curl:(35) 無法與對等方安全通信:沒有通用的加密算法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)

                    • <tfoot id='fYgAO'></tfoot>
                      • <bdo id='fYgAO'></bdo><ul id='fYgAO'></ul>
                        <legend id='fYgAO'><style id='fYgAO'><dir id='fYgAO'><q id='fYgAO'></q></dir></style></legend>

                            <tbody id='fYgAO'></tbody>
                          <i id='fYgAO'><tr id='fYgAO'><dt id='fYgAO'><q id='fYgAO'><span id='fYgAO'><b id='fYgAO'><form id='fYgAO'><ins id='fYgAO'></ins><ul id='fYgAO'></ul><sub id='fYgAO'></sub></form><legend id='fYgAO'></legend><bdo id='fYgAO'><pre id='fYgAO'><center id='fYgAO'></center></pre></bdo></b><th id='fYgAO'></th></span></q></dt></tr></i><div class="lfdf57d" id='fYgAO'><tfoot id='fYgAO'></tfoot><dl id='fYgAO'><fieldset id='fYgAO'></fieldset></dl></div>

                            <small id='fYgAO'></small><noframes id='fYgAO'>

                            主站蜘蛛池模板: 臭氧发生器_臭氧消毒机 - 【同林品牌 实力厂家】 | 济南铝方通-济南铝方通价格-济南方通厂家-山东鲁方通建材有限公司 | ALC墙板_ALC轻质隔墙板_隔音防火墙板_轻质隔墙材料-湖北博悦佳 | 塑料撕碎机_编织袋撕碎机_废纸撕碎机_生活垃圾撕碎机_废铁破碎机_河南鑫世昌机械制造有限公司 | 右手官网|右手工业设计|外观设计公司|工业设计公司|产品创新设计|医疗产品结构设计|EMC产品结构设计 | 大_小鼠elisa试剂盒-植物_人Elisa试剂盒-PCR荧光定量试剂盒-上海一研生物科技有限公司 | 胶水,胶粘剂,AB胶,环氧胶,UV胶水,高温胶,快干胶,密封胶,结构胶,电子胶,厌氧胶,高温胶水,电子胶水-东莞聚力-聚厉胶粘 | 威实软件_软件定制开发_OA_OA办公系统_OA系统_办公自动化软件 | 体视显微镜_荧光生物显微镜_显微镜报价-微仪光电生命科学显微镜有限公司 | 超声骨密度仪-骨密度检测仪-经颅多普勒-tcd仪_南京科进实业有限公司 | 减速机电机一体机_带电机减速器一套_德国BOSERL电动机与减速箱生产厂家 | 丹佛斯压力传感器,WISE温度传感器,WISE压力开关,丹佛斯温度开关-上海力笙工业设备有限公司 | MOOG伺服阀维修,ATOS比例流量阀维修,伺服阀维修-上海纽顿液压设备有限公司 | 桐城新闻网—桐城市融媒体中心主办| 自动化生产线-自动化装配线-直流电机自动化生产线-东莞市慧百自动化有限公司 | 电渗析,废酸回收,双极膜-山东天维膜技术有限公司 | 氢氧化钙设备_厂家-淄博工贸有限公司 | 神马影院-实时更新秒播 | 空气能采暖,热泵烘干机,空气源热水机组|设备|厂家,东莞高温热泵_正旭新能源 | 深圳天际源广告-形象堆头,企业文化墙,喷绘,门头招牌设计制作专家 | 医学动画公司-制作3d医学动画视频-医疗医学演示动画制作-医学三维动画制作公司 | 北京普辉律师事务所官网_北京律师24小时免费咨询|法律咨询 | 齿轮减速电机一体机_蜗轮蜗杆减速马达-德国BOSERL齿轮减速机带电机生产厂家 | 工业设计,人工智能,体验式3D展示的智能技术交流服务平台-纳金网 J.S.Bach 圣巴赫_高端背景音乐系统_官网 | 行星搅拌机,双行星搅拌机,动力混合机,无锡米克斯行星搅拌机生产厂家 | 冷油器-冷油器换管改造-连云港灵动列管式冷油器生产厂家 | 国际高中-国际学校-一站式择校服务-远播国际教育 | 渗透仪-直剪仪-三轴仪|苏州昱创百科 | 南京租车,南京汽车租赁,南京包车,南京会议租车-南京七熹租车 | 光泽度计_测量显微镜_苏州压力仪_苏州扭力板手维修-苏州日升精密仪器有限公司 | PVC快速门-硬质快速门-洁净室快速门品牌厂家-苏州西朗门业 | 超声波破碎仪-均质乳化机(供应杭州,上海,北京,广州,深圳,成都等地)-上海沪析实业有限公司 | 国际金融网_每日财经新资讯网| 比士亚-专业恒温恒湿酒窖,酒柜,雪茄柜的设计定制 | 成都租车_成都租车公司_成都租车网_众行宝 | 造价工程师网,考试时间查询,报名入口信息-网站首页 | 【孔氏陶粒】建筑回填陶粒-南京/合肥/武汉/郑州/重庆/成都/杭州陶粒厂家 | 鑫达滑石-辽宁鑫达滑石集团 | 小型手持气象站-空气负氧离子监测站-多要素微气象传感器-山东天合环境科技有限公司 | 智能门锁电机_智能门锁离合器_智能门锁电机厂家-温州劲力智能科技有限公司 | 结晶点测定仪-润滑脂滴点测定仪-大连煜烁 |