尝试使用以下代码通过python请求执行REST GET,我收到了错误.
代码片段:
import requests
header = {'Authorization': 'Bearer...'}
url = az_base_url + az_subscription_id + '/resourcegroups/Default-Networking/resources?' + az_api_version
r = requests.get(url, headers=header)
Run Code Online (Sandbox Code Playgroud)
错误:
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.
For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Run Code Online (Sandbox Code Playgroud)
我的python版本是2.7.3.我尝试安装urllib3并请求[安全],因为其他线程建议,我仍然有同样的错误.
想知道是否有人可以提供一些提示?
谁能告诉我从文件中提取/转换证书.crt和私钥.key文件的正确方法/命令.pem?我刚读过它们是可以互换的,但不是如何.
我有一个简单的Web服务调用,由.NET(C#)2.0 Windows应用程序通过Visual Studio生成的Web服务代理生成,用于也用C#(2.0)编写的Web服务.这已经工作了几年,并且在它运行的十几个地方继续这样做.
新站点的新安装遇到问题.尝试调用Web服务时,它失败并显示以下消息:
无法为SSL/TLS安全通道建立信任关系
Web服务的URL使用SSL(https://) - 但这已经在很多其他位置工作了很长时间(并且仍在继续).
我在哪里看?这可能是Windows和.NET之间的安全问题吗?如果是这样,我在哪里建立信任关系?我迷路了!
我正在编写一个涉及CAS,jspring安全检查,重定向等的简单脚本.我想使用Kenneth Reitz的python请求,因为它是一项很棒的工作!但是,CAS需要通过SSL进行验证,因此我必须先通过该步骤.我不知道Python的要求是什么?这个SSL证书应该驻留在哪里?
Traceback (most recent call last):
File "./test.py", line 24, in <module>
response = requests.get(url1, headers=headers)
File "build/bdist.linux-x86_64/egg/requests/api.py", line 52, in get
File "build/bdist.linux-x86_64/egg/requests/api.py", line 40, in request
File "build/bdist.linux-x86_64/egg/requests/sessions.py", line 209, in request
File "build/bdist.linux-x86_64/egg/requests/models.py", line 624, in send
File "build/bdist.linux-x86_64/egg/requests/models.py", line 300, in _build_response
File "build/bdist.linux-x86_64/egg/requests/models.py", line 611, in send
requests.exceptions.SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Run Code Online (Sandbox Code Playgroud) 通过以下两个类,我尝试连接到MySQL数据库.但是,我总是得到这个错误:
Wed Dec 09 22:46:52 CET 2015 WARN:不建议在没有服务器身份验证的情况下建立SSL连接.根据MySQL 5.5.45 +,5.6.26 +和5.7.6+要求如果未设置显式选项,则必须默认建立SSL连接.为了符合不使用SSL的现有应用程序,verifyServerCertificate属性设置为"false".您需要通过设置useSSL = false显式禁用SSL,或者设置useSSL = true并为服务器证书验证提供信任库.
这是使用以下main方法的测试类:
public class TestDatabase {
public static void main(String[] args) {
Database db = new Database();
try {
db.connect();
} catch (Exception e) {
e.printStackTrace();
}
db.close();
}
}
Run Code Online (Sandbox Code Playgroud)
这是Database班级:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class Database {
private Connection con;
public void connect() throws Exception{
if(con != null) return;
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
throw …Run Code Online (Sandbox Code Playgroud) 我正在使用Authlogic-Connect进行第三方登录.运行适当的迁移后,Twitter/Google/yahoo登录似乎工作正常但Facebook登录引发异常:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Run Code Online (Sandbox Code Playgroud)
开发日志显示
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):
app/controllers/users_controller.rb:37:in `update'
Run Code Online (Sandbox Code Playgroud)
请建议..
如果我在Mac或Linux中有实际文件和Bash shell,我如何查询cert文件何时到期?假设我有csr,key,pem和chain文件,这不是一个网站,而是实际上是证书文件本身.
我正在尝试做Michael Hartl教程.当我尝试在我的gemset中安装rails 3.2.14时,我遇到以下问题:
$ gem install rails -v 3.2.14
错误:找不到有效的宝石'rails'(= 3.2.14),原因如下:
无法从https://rubygems.org/下载数据- SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败(https://s3.amazonaws.com/production.s3.rubygems.org /specs.4.8.gz)
谷歌搜索后,我发现我可以使用非SSL源的rubygems,所以我运行:
sudo gem sources -a http://rubygems.org
Run Code Online (Sandbox Code Playgroud)
然后,当我再次尝试安装rails时,它成功了.但是,我仍然遇到上述问题,但作为警告:
警告:无法从" https://rubygems.org/ " 提取数据:SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败(https://s3.amazonaws.com/production.s3 .rubygems.org/specs.4.8.gz)
如何完全删除此警告/错误?
我使用以下内容:
当我bundle install在Centos 5.5上运行我的Rails 3项目时失败并出现错误:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed
(https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem)
An error occured while installing multi_json (1.3.2), and Bundler cannot continue.
Make sure that `gem install multi_json -v '1.3.2'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
当我尝试手动安装gem时(by gem install multi_json -v '1.3.2')它可以工作.其他几个宝石也会出现同样的问题.我使用RVM(1.12.3),ruby 1.9.2,bundler 1.1.3.
怎么解决?
我必须使用没有适当证书的git服务器,但我不想这样做
env GIT_SSL_NO_VERIFY=true git command
Run Code Online (Sandbox Code Playgroud)
每次我做一个git操作.但我还想为其他git存储库启用SSL.有没有办法让这个本地的单一回购?