dongwenhui8900 2018-06-12 22:35 采纳率: 0%
浏览 71

Paypal:TLS 1.2测试在ssh中工作,但在浏览器中不起作用

I created the following script to check that hosting uses TLS 1.2 for encryption:

<?php
$ch = curl_init('https://tlstest.paypal.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_SSLVERSION, 6); //TLS v1.2
$data = curl_exec($ch);
curl_close($ch);

print $data;

If the call is made using TLS 1.2, paypal returns "PayPal_Connection_OK".

When I call it directly in ssh I get successful response:

$ php ./tls.php 
PayPal_Connection_OK

But when I put this script into httpdocs dir and call it through browser I get:

ERROR! Connection is using TLS version lesser than 1.2. Please use TLS1.2

What can be the issue?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?