相关疑难解决方法(0)

Homebrew拒绝链接OpenSSL

我在:OSX 10.11.6,Homebrew版本0.9.9m OpenSSL 0.9.8zg 2015年7月14日

我正在尝试使用dotnetcore并遵循他们的指示,

我升级/安装了最新版本的openssl:

> brew install openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2h_1.el_capitan.bottle.tar.gz
Already downloaded: /Users/administrator/Library/Caches/Homebrew/openssl-1.0.2h_1.el_capitan.bottle.tar.gz
==> Pouring openssl-1.0.2h_1.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences …
Run Code Online (Sandbox Code Playgroud)

macos homebrew openssl .net-core

122
推荐指数
9
解决办法
10万
查看次数

使用Homebrew在OS X上更新OpenSSL

我正在使用MacOS X 10.7.5,由于握手失败,我需要更新的OpenSSL版本.互联网上有几个教程,我尝试了以下内容:

brew install openssl
brew link openssl --force
Run Code Online (Sandbox Code Playgroud)

然而,它不起作用:

openssl version
OpenSSL 0.9.8r 8 Feb 2011

brew unlink openssl && brew link openssl --force
Unlinking /usr/local/Cellar/openssl/1.0.1e... 1139 links removed
Linking /usr/local/Cellar/openssl/1.0.1e... 1139 symlinks created
Run Code Online (Sandbox Code Playgroud)

SVN问题也未解决.有任何想法吗?我宁愿不尝试MacPorts方式,因为它可能会干扰Homebrew.

svn macos homebrew openssl

75
推荐指数
5
解决办法
14万
查看次数

如何安装最新版本的openssl Mac OS X El Capitan

我曾经习惯brew install openssl下载并安装openssl v1.0.2f,然而,它回来说:

A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to …
Run Code Online (Sandbox Code Playgroud)

macos homebrew openssl

35
推荐指数
5
解决办法
10万
查看次数

如何安装OpenSSL for Python

我需要在python2.7上安装OpenSSL.

我试过了

$ sudo pip install pyopenssl
Run Code Online (Sandbox Code Playgroud)

我得到了以下内容

/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
  warnings.warn(msg)
running build
running build_py
running build_ext
building 'OpenSSL.crypto' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c OpenSSL/crypto/crypto.c -o build/temp.linux-x86_64-2.7/OpenSSL/crypto/crypto.o
In file included from OpenSSL/crypto/crypto.h:17,
                 from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509.h:17:25: error: openssl/ssl.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:17,
                 from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509.h:25: error: expected specifier-qualifier-list before ‘X509’
OpenSSL/crypto/x509.h:29: error: expected declaration specifiers or ‘...’ before ‘ASN1_TIME’
OpenSSL/crypto/x509.h:30: error: …
Run Code Online (Sandbox Code Playgroud)

python ssl openssl pyopenssl python-2.7

28
推荐指数
1
解决办法
10万
查看次数

如何在python中导入OpenSSL

我试图运行这个简单的代码来检索SSL证书:

import ssl, socket

#print ssl.get_server_certificate(('www.google.com', 443))
cert=ssl.get_server_certificate(('www.google.com', 443))
# OpenSSL
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
x509.get_subject().get_components()
Run Code Online (Sandbox Code Playgroud)

但我得到错误说:

Traceback (most recent call last):
  File "C:\Users\e\Desktop\Python\ssl\test.py", line 6, in <module>
    x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
NameError: name 'OpenSSL' is not defined
Run Code Online (Sandbox Code Playgroud)

我知道我必须导入OpenSSL.但是我不知道怎么做?从哪里获得OpenSSL?我从https://pypi.python.org/pypi/pyOpenSSL下载了一个名为pyOpenSSL的模块, 其中包含两个文件夹:pyOpenSSL-0.15.1.dist-info和OpenSSL.当我尝试添加导入OpenSSL或导入pyOpenSSL时,我收到错误.你能解释清楚,如何导入这些库或模块?他们应该放在哪里?如果不在我的代码文件的同一目录中?如何在导入语法中编写路径?请帮忙.

编辑: 当试图添加from OpenSSL import SSL代码时,我得到:

    C:\Users\e\Desktop\Python\ssl>test.py
Traceback (most recent call last):
  File "C:\Users\e\Desktop\Python\ssl\test.py", line 2, in <module>
    from OpenSSL import SSL
  File "C:\Users\e\Desktop\Python\ssl\OpenSSL\__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "C:\Users\e\Desktop\Python\ssl\OpenSSL\rand.py", line …
Run Code Online (Sandbox Code Playgroud)

python openssl python-2.7

26
推荐指数
1
解决办法
7万
查看次数

ModuleNotFoundError:尽管安装了 pyopenssl,但没有名为“OpenSSL”的模块

我正在尝试使用命令行在 Windows 上安装 OpenSSL for Python。

我试过运行以下命令:

pip install OpenSSL
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

  Could not find a version that satisfies the requirement openssl (from versions: )
No matching distribution found for openssl
Run Code Online (Sandbox Code Playgroud)

我也尝试这样做:

pip install pyopenssl
Run Code Online (Sandbox Code Playgroud)

这成功了,但是,当我尝试运行具有以下行的 python 脚本时,它显示一个错误:

from OpenSSL import crypto, SSL
Run Code Online (Sandbox Code Playgroud)

错误:

Traceback (most recent call last):
  File "C:\Users\ajayv\AppData\Local\Programs\Python\Python36-32\Scripts\ENV\Scripts\PDB Latest 1250\Endpoints\X.509.py", line 1, in <module>
    import OpenSSL
ModuleNotFoundError: No module named 'OpenSSL'
Run Code Online (Sandbox Code Playgroud)

我错过了什么吗?请告诉我。

python windows command-line pyopenssl

6
推荐指数
0
解决办法
7095
查看次数