计算机视觉api SSL错误 [英] computer vision api SSL error

查看:112
本文介绍了计算机视觉api SSL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨;

我在调用计算机视觉API的PHP代码中收到以下错误:

I get the following error in my php code that calls the computer vision api:

HTTP_Request2_ConnectionException :无法连接到ssl://api.projectoxford.ai:443。错误:stream_socket_client():无法
连接到ssl://api.projectoxford.ai:443(未知错误)stream_socket_client():无法启用crypto stream_socket_client():SSL操作失败,代码为1. OpenSSL错误消息:错误:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:证书
验证失败 
... / php / HTTP / Request2 / Adapter / Socket.php   on  325

对解决方案有何评论?

提前感谢

推荐答案

嗨malix123,

Hi malix123,

下面是Curl代码,希望可以帮到你。

Below is the Curl code, hope could help you.

please reference http://curl.haxx.se/docs/sslcerts.html 

and the tools in http://curl.haxx.se/download/curl-7.33.0-win64-ssl-sspi.zip
https://social.msdn.microsoft.com/Forums/azure/en-US/8af1b626-8b74-4919-83a0-dd87e0568e19/mvp-how-to-using-project-oxford-vision-api-with-curl?forum=mlapi


@ECHO OFF

curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);

REM for Basic Authorization use: --user {username}:{password}

REM Specify values for path parameters (shown as {...}), your subscription key and values for query parameters

curl -v -X POST "https://api.projectoxford.ai/vision/v1/analyses?visualFeatures=All&subscription-key=XXXX" -d "{'Url':'http://images.takungpao.com/2012/1115/20121115073901672.jpg'}" -H "Content-Type: application/json" -k


这篇关于计算机视觉api SSL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆