python-ssl 相关问题


Python 请求库问题:获取 SSL 证书验证失败错误

我目前正在开发一个Python脚本,该脚本利用requests库来发出API请求。但是,我遇到了一个问题,即我始终收到“SSL 证书验证失败”的消息...


将 iPhone 应用程序连接到安全的 RESTful API?

我正在使用 Pylons 框架在 Python 中构建 RESTful API,并使用 Apache2 和 mod_wsgi 为其提供服务,并希望将其连接到 iPhone 应用程序。我对 HTTPS、SSL 的经验很少


在 macOS 的本地主机上设置 HTTPS [mac os catalina 10.15.2]

cd ~/ mkdir .localhost-ssl sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048 sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3...


如何在 istio ingress gateway 中配置以下 nginx 注解

如何在 istio ingress gateway 中添加以下 ssl-redirect 配置 nginx.ingress.kubernetes.io/ssl-redirect:“假” nginx.ingress.kubernertes.io/force-ssl-redirect:“假&...


内存 BIO 的 SSL_pending 功能?

我使用 2 个内存 BIO (BIO_s_mem) 来通过 Winsock 实现异步功能。 ssl = SSL_new(this->ctx); ssl_input = BIO_new(BIO_s_mem()); ssl_output = BIO_new(BIO_s_mem()); SSL_set_bio(ssl,


在调试失败的 SSL 握手时,如何在文件中捕获 Java 控制台的输出?

我想通过查看 Java 调试输出来调试 java.io.EOFException: SSL 对等点错误关闭。运行应用程序时我看不到 Java 控制台,因此我想存储 SSL 调试日志...


SSL证书更新算法

我有一个 IoT 设备和一个 Android 应用程序。两者都通过 MQTT 服务器相互通信,并且该通信通过 SSL 加密。根据我的理解,出于安全考虑...


ElysiaJS 和 Bun 的 SSL 证书

我正在尝试在我自己的数字海洋 Droplet 上设置 elysiaJS API,但我在设置 SSL 证书时遇到了问题。我在文档中找不到任何内容,我尝试了...


Windows 7 无法创建 SSL/TLS 安全通道。”} System.Net.WebException

我正在运行 Windows 7 64 位专业版并尝试编写 RSS Feed 阅读器 这是错误消息 - $Exception {“请求被中止:无法创建 SSL/TLS 安全通道。”} System.Net。


使用 libcurl 时出现“SSL CA 证书问题”错误

我使用--openssldir=< path to ssl >/ssl(链接到/etc/ssl)构建了openssl 1.1.1,并使用--with-ssl=< path to openssl >构建了curl 7.76.1。 编译了以下代码: #包括 我使用--openssldir=< path to ssl >/ssl(链接到/etc/ssl)构建了openssl 1.1.1,并使用--with-ssl=< path to openssl >构建了curl 7.76.1。 编译了以下代码: #include <iostream> #include <curl/curl.h> int main() { CURL *curl = curl_easy_init(); if (curl) { struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Accept: */*"); headers = curl_slist_append(headers, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_URL, "https://<address>"); curl_easy_setopt(curl, CURLOPT_POST, 1); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "<some data>"); curl_easy_perform(curl); curl_slist_free_all(headers) } curl_easy_cleanup(curl); } 当我运行此代码时,出现错误: curl_easy_operation() failed : Problem with the SSL CA cert (path? access rights?) 我在 strace 中看到,它正在尝试打开“/etc/pki/tls/certs/ca-bundle.crt” 但在我的机器(Ubuntu 12 和 Ubuntu 14)中没有文件夹“/etc/pki”。 为什么curl使用“/etc/pki”而不是“/etc/ssl”?我怎样才能强制它使用“/etc/ssl”? 我尝试使用 --without-nss 构建curl,但没有成功。 编辑: 我的解决方案是添加以下代码: ifstream caBundleFile("/etc/pki/tls/certs/ca-bundle.crt"); if (caBundleFile.good()) { curl_easy_setopt(curl, CURLOPT_CAINFO, "/etc/pki/tls/certs/ca-bundle.crt"); caBundleFile.close(); } else { curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/ssl/certs"); } 有两种流行的存储根证书的格式。第一个适用于 RHEL/Centos 等,第二个适用于 Ubuntu 等发行版。 对于未来的读者,答案是设置curl CA路径 #include <iostream> #include <curl/curl.h> const std::string curlCertPath = "./keys/curl-ca-bundle.crt"; int main() { CURL *curl; CURLcode res; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); curl_easy_setopt(curl, CURLOPT_CAINFO, curlCertPath.c_str()); res = curl_easy_perform(curl); if (res == CURLE_OK) { std::cout << "Curl worked" << std::endl; } else { std::cout << "Error: curl failed: " << curl_easy_strerror(res) << std::endl; } curl_easy_cleanup(curl); } curl_global_cleanup(); return 0; }


SSL 证书.p7b 消失了

我正在开发一个客户端系统,他们有一个即将过期的 SSL 证书,他们给了我一个 .p7b 格式的新证书,并且没有私钥。它有相同的名字...


IBM MQ SSL 错误 - pymqi.MQMIError:MQI 错误。比较:2,原因 2393:失败:MQRC_SSL_INITIALIZATION_ERROR

我正在尝试使用 SSL 连接到我的本地队列。我收到 pymqi.MQMIError: MQI 错误。比较:2,原因 2393:失败:MQRC_SSL_INITIALIZATION_ERROR 错误。 AMQERR01.LOG 显示 AMQ9660E:SSL 密钥


SSLHandshakeException:SSL 握手中止:ssl=0xbe6af938:系统调用期间出现 I/O 错误,连接被对等方重置

出现以下错误:javax.net.ssl.SSLHandshakeException:SSL握手中止:ssl = 0xbe6af938:系统调用期间发生I/O错误,连接被对等方重置 改装类: 公开课


conda错误ssl证书:HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443

无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all 解决环境:失败 CondaHTTPError:URL 的 HTTP 000 连接失败 无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/win-64/repodata.json.bz2> Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team. SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))')) 我已经搜索了所有互联网,重新安装了 anaconda 并做了建议中的任何操作,但这个问题仍然存在。 Windows 10 C:\Users\MyPc>anaconda --version anaconda 命令行客户端(版本 1.7.2) C:\Users\MyPc>conda --version 康达 4.5.12 就我而言,当我尝试运行此命令时,我收到了此类错误消息 conda install tensorflow 这是错误消息 CondaSSLError:OpenSSL 似乎在此计算机上不可用。下载并安装软件包需要 OpenSSL。 异常:HTTPSConnectionPool(主机='repo.anaconda.com',端口=443):超过最大重试次数,网址:/pkgs/main/win-64/current_repodata.json(由SSLError(“无法连接到HTTPS URL”)引起因为 SSL 模块不可用。")) 这就是解决方案 步骤01 进入你的anaconda3的安装路径 步骤02 现在转到此文件路径 anaconda3\Library\bin 步骤03 现在选择这个 DLL 文件并复制它 libcrypto-1_1-x64.dll libssl-1_1-x64.dll 步骤04 之后转到此文件路径并将其粘贴到该文件夹内部 anaconda3\DLLs 这个命令对我有用: conda config --set ssl_verify false 我也遇到了同样的问题,解决这个问题的方法是安装早期的 32 位版本的 Conda。由于某种原因,较新的 64 位版本似乎容易出现此错误。您可以在这里找到 Conda 的早期版本: https://repo.continuum.io/archive/ 您应该搜索仅具有 x86 而不是 x86_64 的 Anaconda3 版本。 我也遇到了同样的问题,简单的解决方案是: 从开始菜单打开anaconda navigator,然后运行CMD.exe提示符,然后从那里安装,就是这样。 在 C:\Users\xyz 目录中创建一个名为 .condarc 的文件,其中包含以下内容 频道: 默认值 ssl_verify:假 然后尝试创建虚拟环境: conda create -n envname python=x.x anaconda 祝你好运!


使用python的mechanize自动网站登录

我正在尝试自动登录一个网站,该网站的登录表单具有以下 HTML 代码(摘录): 我正在尝试自动登录一个网站,其登录表单具有以下 HTML 代码(摘录): <tr> <td width="60%"> <input type="text" name="username" class="required black_text" maxlength="50" value="" /> </td> <td> <input type="password" name="password" id="password" class="required black_text" maxlength="50" value="" /> </td> <td colspan="2" align="center"> <input type="image" src="gifs/login.jpg" name="Login2" value="Login" alt="Login" title="Login"/> </td> </tr> 我正在使用python的mechanize模块进行网页浏览。以下是代码: br.select_form(predicate=self.__form_with_fields("username", "password")) br['username'] = self.config['COMMON.USER'] br['password'] = self.config['COMMON.PASSWORD'] try: request = br.click(name='Login2', type='image') response = mechanize.urlopen(request) print response.read() except IOError, err: logger = logging.getLogger(__name__) logger.error(str(err)) logger.debug(response.info()) print str(err) sys.exit(1) def __form_with_fields(self, *fields): """ Generator of form predicate functions. """ def __pred(form): for field_name in fields: try: form.find_control(field_name) except ControlNotFoundError, err: logger = logging.getLogger(__name__) logger.error(str(err)) return False return True return __pred 不知道我做错了什么...... 谢谢 该网站有可能在登录期间使用java脚本进行回发。我记得很清楚,对于 ASP .Net 站点,您需要获取隐藏表单字段,例如 VIEWSTATE 和 EVENTTARGET 并将它们发布到新 Page 。 您为什么不发送问题网站的链接?之后就变得相对容易弄清楚了 尝试使用 Selenium 和 PhantomJS from selenium import PhantomJS import platform if platform.system() == 'Windows': # .exe for Windows PhantomJS_path = './phantomjs.exe' else: PhantomJS_path = './phantomjs' service_args = [ # Proxy (optional) '--proxy=<>', '--proxy-type=http', '--ignore-ssl-errors=true', '--web-security=false' ] browser = PhantomJS(PhantomJS_path, service_args=service_args) browser.set_window_size(1280, 720) # Window size for screenshot (optional) login_url = "<url_here>" # Credentials Username = "<insert>" Password = "<insert>" # Login browser.get(login_url) browser.save_screenshot('login.png') print browser.current_url browser.find_element_by_id("<username field id>").send_keys(Username) browser.find_element_by_id("<password field id>").send_keys(Password) browser.find_element_by_id("<login button id>").click() print (browser.current_url) browser.get(scrape_url) print browser.page_source browser.quit() ''' python 和 pycharm 设置路径变量 点维辛检查 包管理器 python 如何安装新版本 python最新版本 - python 3.7.2 用户环境变量 蟒蛇 pyton 中的命令行 '''


node.js https 示例,错误,连接到本地主机的未知 SSL 协议错误

我使用这些链接中的简单示例: a 链接[a 如何在 Node.js 中创建 HTTPS 服务器?] a link[a 如何创建 https 服务器? docs.nodejitsu.com] 但我收到类似的错误 卷曲:(35) 未知 SSL


为什么我的自签名 SSL 证书可以在 https://192.168.1.200 上工作,但不能在 https://192.168.1.200:9001 上工作

目前我正在 TrueNas Scale Server 上创建我自己的自签名 CA 和 SSL 证书。然而,在设置完所有内容后,我意识到输入主机 URL 是有效的,但主机 URL 包含...


即使使用`rejectUnauthorized: false`,postgresql也不接受自签名证书

这是我的代码: 从 'pg' 导入 pg; const { 池 } = pg; 让connectionString = process.env.DB_CONNECTION_STRING 导出常量池=新池({ 连接字符串: 连接字符串, SSL:{


C# .NET Core 3.1 无法建立 SSL 连接

我在 SAP 的 docker 容器内使用 OData 服务和 C# ASP.NET Core 3.1 服务,并具有客户自签名证书。 与此同时,我尝试了一千件事,但错误


企业网络VPN:`ddev Composer create`导致“ssl证书问题:自签名证书”

我在 wsl2 下运行 ddev。我在 zscaler 代理后面。我能够将 zscaler 证书复制到 ubuntu“/usr/local/share/ca-certificates”并运行“sudo update-ca-certificates”...


Micronaut Key Store Path中可以设置S3路径吗?

我有一个使用 Micronaut 3.9.x(从 Micronaut 1 迁移)的 lambda 应用程序,它使用 HttpClient 并具有指向我的资源文件夹内的证书的 SSL 配置。我有


APN PHP 代码给出警告:stream_socket_client() [function.stream-socket-client]: 无法连接到 ssl://gateway.sandbox.push.apple.com:2195

我正在尝试使用 PHP 代码实现 Apple 推送通知。这是我的代码: $deviceToken = '我的设备令牌'; $密码=''; $message = '我的第一个推送通知!'; //////////////////...


如何从 PEM 编码证书确定 SSL 证书到期日期?

如果我有实际文件和 Mac 或 Linux 中的 Bash shell,我如何查询证书文件何时过期?不是网站,而是证书文件本身,假设我有 csr...


SSL_read 当不再接收来自 HTTP 服务器的响应时卡住

当 HTTP 服务器完成发送信息时,即使服务器完成发送数据,SSL_read 函数也会陷入等待响应的状态。 我尝试使用 SSL defa 检查错误...


SSL 证书问题:无法在 Laravel 中使用 Twilio 获取本地颁发者证书

将 Laravel 应用程序与短信发送器 Twilio 结合使用。我将使用以下 LoginController 将电话号码插入表中 公共函数提交(请求$请求) { $请求->


使用 GitHub Action Deploy 在 Docker 容器中安装 SSL 证书

我正在使用 GitHub 操作将 .NET 应用程序部署到 Docker 容器(此处定义操作以供参考)。我找到了关于将 .crt 文件复制到图像中的主题的答案,b...


将 macos 版本从 Big Sur 更新到 Montrey 会导致 OpenSSL 版本不匹配。根据 30100010 构建,您拥有 30200000

我的 osx 版本最初是 Big Sur,SSH 和 SSL 工作正常,直到我更新到 Montrey。 自更新以来,我无法使用 SSH 或从 Github 拉取,并且收到此错误。 OpenSSL 版本不匹配...


Python子进程获取输出

我有一个 python 脚本来使用 subprocess 模块运行辅助 python 脚本。 我想捕获第二个 python 脚本输出并在关闭主 python 脚本后使其保持活动状态。 我想要...


使用 Python 时出现 Visual Studio 代码错误

我是 VS Code 的新手,希望将其与 Python 一起使用(我也是新手) 遵循 Python 和 Visual Studio 的所有安装说明以及安装 Python Extensi...


python matplotlib 透明热图颜色条

如何实现这样的python matplotlib heatmap colorbar? plt.imshow(a,aspect='auto', cmap=plt.cm.gist_rainbow_r) plt.colorbar()


如何更改Git远程仓库?

考虑: PS C:\.dev\despesas-python> heroku 创建 app-despesas-pessoais-python » 警告:heroku 更新从 7.53.0 到 8.0.5 可用。 创建 ⬢ app-despesas-pessoais-python...完成 https...


使用 Python 以编程方式编辑 Terraform 配置文件

我正在尝试使用Python编辑Terraform配置文件。我正在使用返回 python 字典的 python hcl2 库解析 Terraform 文件(.tf)。我想添加新的键/值对或 c...


关于 mod_wsgi ModuleNotFoundError (dateutil) // python 3.11.4 64bit 和 apache 2.4.58 win64 VS17

我在Windows 11 Pro上使用mod_wsgi与python 3.11.4 64位和apache 2.4.58 win64 VS17。 我为每个人安装 python,而不仅仅是为我自己。 另外我不使用python virtualenv。 当我跑步时


在 Python 中查找面向公众的 IP 地址?

如何在 Python 中找到我的网络的面向公众的 IP?


Python 内部类 - 对象编程

大家。 我想了解 python 类和对象。 我对 python 相当陌生,想深入了解。 我正在努力并努力从内部类中获取输出结果...


成功安装新版本的python后,终端中只显示旧版本

我正在尝试安装 python 3.12,但即使安装成功后,终端仍显示旧版本的 python。 我通过两种方式安装它:使用网站上的 python 安装程序和 hom...


如何从Python中的另一个类更改kivy中的标签文本?

我是Python大佬。 这是我的 python 文件: 从 kivy.app 导入 App 从 kivy.uix.screenmanager 导入 ScreenManager, Screen 从 kivy.lang 导入生成器 kv = Builder.load_file('test.kv...


如何整合两个python文件夹?

我的 OS(C:) 驱动器中的两个位置都有 python。 一个位于 [Folder1] C:\Python38 其他位于 [Folder2] C:\Users\User\AppData\Local\Programs\Python\Python38-32 大部分Folder1和Fol...


vbaShellRun for Python

我正在从 Excel 运行一个调用 python 脚本的宏。我在 PC 上的一个位置安装了 Python 3.11.5,在另一位置安装了 3.12.1。当我使用 3.11.5 调用脚本时 vbaShell.运行...


在Python中计算阶乘

计算时 数学.阶乘(100) 我得到:


Mt5 python 部署

我有一个 python 机器人,可以将订单发送到 MetaTrader5。除了将 mt5 python 机器人托管在本地计算机上之外,是否有任何最佳方法来部署 mt5 python 机器人以 24/7 运行 我尝试在以下免费平台上部署


如何在Python中连接两个整数?

如何在Python中连接两个整数?例如,给定 10 和 20,我想要返回值为 1020。


除非与特定版本的 python 一起使用,否则无法解析 Python 导入

所以我尝试用 nextcord 编写一个 Discord 机器人,但我遇到了一些问题。 nextcord import 仅适用于 python 版本 3.10.11 。如果我使用任何其他版本的 python,它无法解析导入


Python lxml 通过 id-tag 查找元素

我正在开发一个Python程序来保存储藏室的库存。在 XML 文档中,将保留碳粉量,我希望我的 python 程序能够添加、删除和显示


Python 包安装问题:ModuleNotFoundError

我正在尝试使用 modal-python 包。 使用 Google Colab 笔记本时,在安装 pip install modal-python 软件包后,我可以轻松地按预期使用该软件包。例如:从 modAL.models 导入


Python 逐步回归与 AIC?

以 AIC 为标准的逐步回归的 R step() 函数的 Python 等效项是什么? statsmodels.api 中是否有现有函数?


Python 中的 Selenium - 我无法从 <a> 元素中提取文本

有了这段Python代码,我有: main_div = driver.find_element(By.XPATH,"//div[@class='am-appointments am-section']")#该类只有一个 child_div = main_div.find_elements...


python 中的 ntp 客户端

我用python编写了一个ntp客户端来查询时间服务器并显示时间,程序执行但没有给我任何结果。 我使用的是python的2.7.3集成开发环境...


ModuleNotFoundError:将 openai python sdk 导入 renpy 时,没有名为 'pydantic_core._pydantic_core' 的模块

在renpy项目中导入openai python sdk时 初始化Python: 从 openai 导入 OpenAI 出现这个错误 抱歉,发生了未捕获的异常。运行游戏时...


尝试在 Python 3 上安装 pygame 时出错

我尝试使用安装 pygame pip 安装 pygame 我尝试使用 Python 3.8 安装它,但它输出以下错误。 我也尝试使用 Python 3.7 安装,但仍然没有成功。 错误: ...


© www.soinside.com 2019 - 2024. All rights reserved.