- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Mac El Capitan。我的系统显示我卡在 PyOpenSSL 版本 0.13.1 上。当我升级到16.2.0时,升级成功。但是,当我检查版本时,它仍然是 0.13.1。这是为什么?
MacBook-Air:include$ sudo pip install pyopenssl --user --upgrade
Password:
The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyopenssl
Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
100% |████████████████████████████████| 51kB 1.1MB/s
Requirement already up-to-date: cryptography>=1.3.4 in /Library/Python/2.7/site-packages (from pyopenssl)
Collecting six>=1.5.2 (from pyopenssl)
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already up-to-date: cffi>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Requirement already up-to-date: pyasn1>=0.1.8 in /Library/Python/2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Collecting setuptools>=11.3 (from cryptography>=1.3.4->pyopenssl)
Downloading setuptools-32.3.1-py2.py3-none-any.whl (479kB)
100% |████████████████████████████████| 481kB 1.3MB/s
Requirement already up-to-date: idna>=2.0 in /Library/Python/2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Requirement already up-to-date: ipaddress in /Library/Python/2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Requirement already up-to-date: enum34 in /Library/Python/2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Requirement already up-to-date: pycparser in /Library/Python/2.7/site-packages (from cffi>=1.4.1->cryptography>=1.3.4->pyopenssl)
Installing collected packages: six, pyopenssl, setuptools
然后检查版本,是错误的:
Successfully installed pyopenssl-16.2.0 setuptools-32.3.1 six-1.10.0
MacBook-Air:include$ pip show pyopenssl
Name: pyOpenSSL
Version: 0.13.1
Summary: Python wrapper module around the OpenSSL library
Home-page: http://pyopenssl.sourceforge.net/
Author: Jean-Paul Calderone
Author-email: exarkun@twistedmatrix.com
License: APL2
Location: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Requires:
最佳答案
问题的核心是 sudo pip install pyopenssl --user --upgrade
正在安装到“非 sudo”pip ...
的目录中没看先。发生这种情况的原因有很多。
简化此问题的第一个方面是了解 pip install --user ...
永远不需要与 sudo
一起运行。 --user
选项意味着安装到用户包目录(它应该在 /Users/your_username/
某处),并且不需要高级权限。
如果您在不使用 sudo 的情况下尝试 pip install --user --upgrade pyopenssl
,应该可以解决问题。
旧的 pyopenssl-0.13.1 仍将存在于 /System/Library/Frameworks/Python.framework/Versions/2.7/...
中,但是新的现在应该存在于 /Users/your_username/...
并且应该首先被 Python 导入机制找到。
但是,pip install --user
很有可能会在 Python 导入机制看不到的目录中安装新版本的 pyopenssl。要解决此问题,您需要知道 pip
在哪里安装包。尝试使用 pip install --user --verbose ..
如果默认 pip 输出没有告诉您正在安装包。然后需要在PYTHONPATH
中加入这个路径,比如下面把...
换成pip
安装包的地方(应该是在 /Users/your_username/
某处)。
export PYTHONPATH="/Users/your_username/Library/...:$PYTHONPATH"
pip show pyopenssl
如果可行,请将上面的 export ..
添加到您的 bash .profile
中,以便您的 Python 运行时始终首先从该目录加载包。
关于pip - PyOpenSSL 版本 0.13.1 在 pip 升级后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41661082/
我正在使用 Titanium 3.0 并尝试更新 pyOpenSSL。我检查了 python 网站,只看到 Windows 的可下载链接。在 Tianium 论坛中,他们说“如果您使用 MacPort
我想使用pyopenssl验证下载文件的签名和证书,但文档不明确,谷歌也无济于事。 我在用户的机器上有一个根 CA 证书,现在当用户下载文件时,我会连同它一起发送一个证书和签名。首先我需要在机器上使用
在 Apache 中,我成功地使用了以下 OpenSSL 密码设置: SSLHonorCipherOrder on SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+a
在回答this question , 我在看 the docs for PyOpenSSL - OpenSSL 的 python 包装器。 它有签名和证书的东西,但是所有的加密东西在哪里?我是否遗漏了
我有以下代码 key = OpenSSL.crypto.PKey() key.generate_key(OpenSSL.crypto.TYPE_RSA, 1024) cert = OpenSSL.cr
我在 Macbook Pro 上双启动了一个 Windows 10 分区:Mac:El Capitan(64 位)Windows:Windows 10 64 位,使用 fat 文件系统格式化 在 Wi
我有一个套接字服务器,我正试图将其转移到 python 2.5 上的 SSL,但我遇到了 pyOpenSSL 的障碍。我找不到任何关于使用它的好教程,所以我主要靠猜测。 这是我的服务器如何设置套接字:
我正在使用 pyOpenSSL 大量生成 CSR。 我需要生成一个受密码保护的私钥文件。 代码片段: key = crypto.PKey() key.generate_key(type, bits)
我需要在 python 中对打开的连接执行重新协商。似乎the renegotiate function is not implemented .有什么方法可以启动重新协商? 我尝试使用 set_co
更新:do_handshake 似乎正在重置密码列表 诚然,这是一个非常具体的场景,但也许有人会有想法。我试图强制服务器仅接受 RC4-SHA(仅出于调试原因)。我的代码看起来像这样: ctx
我可以获得私钥(PEM格式),但我不知道如何生成公钥: from OpenSSL import crypto, SSL key = crypto.PKey() key.generate_key(cry
我需要创建 SSL signatures对于大 *.tar.gz使用 Python 3 的文件(千兆字节的数据)和 pyopenssl模块。 下面是我的代码(有效)的简化摘录。有问题的行是以下一行:
我生成自签名证书 CA_KEY_FILE = os.path.join(settings.ROOT_CRT_PATH, 'rootCA.key') CA_CERT_FILE = os.path.joi
我目前正在尝试编写一个 python 服务器脚本,该脚本应根据其公钥对当前客户端进行身份验证。由于我使用的是扭曲的,example in the twisted documenteation让我开始了
我正在尝试创建 python 脚本,它将采用 PKCS#12 包并打印 x509 证书中包含的一些信息并用于此目的 PyOpenSSL 模块。到目前为止,我想从证书公钥中获取。但是 PKey 对象没有
我有两个证书,一个用于签署 client.crt 的 root.crt。 我想验证 client.crt 确实是由 root.key 签名的。 在终端上使用 openssl,它是这样工作的: $ op
我相信自从这个 question , pyOpenSSL 已经开始支持签名验证(自 pyOpenSSL 0.11 开始。 我正在做一个由其他人使用 M2Crypto 启动的项目. M2Crypto 包
我正在编写一个需要在客户端浏览器中安装证书的应用程序。我在“上下文”对象的 PyOpenSSL 文档中找到了这个,但我看不到任何关于回调应该如何验证证书的信息,只是它应该以某种方式验证。 set
我试图在 Digital Ocean Ubuntu 16.04 服务器中安装 pyopenssl 模块。我收到此错误“密码学构建轮失败”,随后出现一些错误。 Collecting pyopenssl
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 8 年前。 Improve th
我是一名优秀的程序员,十分优秀!