惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - CalvinChu

vyos syslog配置 How to upgrade pip on Debian Wheezy 指数数据解密,懂的都懂 OpenWRT and VPN Passthrough - CalvinChu 如何将 find 命令与 exec 一起使用 CentOS 7 下搭建 OpenVPN - CalvinChu How to get the ip ranges of domain esxi 直通sata控制器 xRDP – Detected issues with Debian 11 – Oh No ! Something has gone wrong…. qemu-mips环境搭建跳坑指南 ImportError: libSM.so.6: cannot open shared object file: No such file or directory openwrt(lede)中,PPtP Client需要安装的软件包 OpenWrt中的Hotplug脚本 MAC OSX VPN自动添加静态路由 - CalvinChu fbprophet安装和使用 CentOS7安装iptables防火墙 CENTOS7下安装REDIS mysql忘记root密码解决办法 iptables命令(备忘)
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_P
CalvinChu · 2022-05-21 · via 博客园 - CalvinChu

因openssl 1.0.1存在安全问题,python3自3.7版本后要求依赖openssl 1.0.2以上或libressl;错误提示如下:

Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_P

python3.7以上建议使用libressl代替openssl,故需通过源码编译安装libressl

# 下载源码包

wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.0.2.tar.gz

# 解压

tar -zxvf libressl-3.0.2.tar.gz

# 配置安装路径

mkdir /usr/local/libressl
cd libressl-3.0.2

./configure --prefix=/usr/local/libressl
# 安装

make -j8 & sudo make install

# 创建软连接代替openssl

mv /usr/bin/openssl /usr/bin/openssl.bak

mv /usr/include/openssl /usr/include/openssl.bak

ln -s /usr/local/libressl/bin/openssl /usr/bin/openssl
ln -s /usr/local/libressl/include/openssl /usr/include/openssl
echo /usr/local/libressl/lib >> /etc/ld.so.conf.d/libressl-3.0.2.conf
ldconfig -v
验证是否安装完成

openssl version

export LDFLAGS="-L/usr/local/libressl/lib"
export CPPFLAGS="-I/usr/local/libressl/include"
export PKG_CONFIG_PATH="/usr/local/libressl/lib/pkgconfig"
配置编译安装python

./configure --prefix=/usr/local/python37 
make

make install

验证ssl 安装正确

import ssl没有报错