相关疑难解决方法(0)

使用openssl从服务器获取证书

我正在尝试获取远程服务器的证书,然后我可以使用它来添加到我的密钥库并在我的java应用程序中使用.

一位资深开发者(节假日:())告诉我,我可以运行这个:

openssl s_client -connect host.host:9999
Run Code Online (Sandbox Code Playgroud)

要获取原始证书,我可以将其复制并导出.我收到以下输出:

depth=1 /C=NZ/ST=Test State or Province/O=Organization Name/OU=Organizational Unit Name/CN=Test CA
verify error:num=19:self signed certificate in certificate chain
verify return:0
23177:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1086:SSL alert number 40
23177:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
Run Code Online (Sandbox Code Playgroud)

我也试过这个选项

-showcerts 
Run Code Online (Sandbox Code Playgroud)

而这一个(在debian上运行你的头脑)

-CApath /etc/ssl/certs/ 
Run Code Online (Sandbox Code Playgroud)

但得到同样的错误.

这个消息来源说我可以使用那个CApath标志,但它似乎没有帮助.我尝试了多条路径无济于事.

请让我知道我哪里出错了.

linux security openssl certificate ssl-certificate

314
推荐指数
12
解决办法
61万
查看次数

python easy_install因所有软件包的SSL证书错误而失败

目标:我正在使用RedHat 5并尝试为Web应用程序安装最新的python和django.

我成功地安装了python27和easy_install,并使用openssl进行了wget.

问题:但是现在我尝试从pypi.python.org获取任何内容我收到以下错误:

$ sudo easy_install --verbose django
Searching for django
Reading https://pypi.python.org/simple/django/
Download error on https://pypi.python.org/simple/django/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
Couldn't find index page for 'django' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
No local packages or download links found for …
Run Code Online (Sandbox Code Playgroud)

python django ssl easy-install pypi

13
推荐指数
2
解决办法
2万
查看次数