跳转到主要内容

libx509pq

通过 OpenSSL 解析与检查 X.509 证书

libx509pq · 通过 OpenSSL 解析与检查 X.509 证书

概览

ID扩展软件包版本类别许可证编程语言
7420libx509pqlibx509pq1.3SECGPL-3.0-or-laterC
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--s-d-r否是否是是否
Requires OpenSSL 1.1.1+; GPL-3.0-or-later is explicit in source headers. EL9 default crypto policy rejects a legacy SHA-1 test fixture; SHA-256 verification passed without changing policy.

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTPIGSTY1.319 18 17 16 15libx509pq-
RPMPIGSTY1.319 18 17 16 15libx509pq_$vopenssl-libs
DEBPIGSTY1.319 18 17 16 15postgresql-$v-libx509pq-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
el8.aarch64N/APIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
el9.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
el9.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
el10.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
el10.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
d12.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
d12.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
d13.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
d13.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
u22.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
u22.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
u24.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
u24.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
u26.x86_64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
u26.aarch64PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3PIGSTY 1.3
软件包版本平台仓库大小下载
libx509pq_191.3el9.x86_64pigsty92.1 KiBlibx509pq_19-1.3-1PGSTY.el9.x86_64.rpm
libx509pq_191.3el9.aarch64pigsty92.1 KiBlibx509pq_19-1.3-1PGSTY.el9.aarch64.rpm
libx509pq_191.3el10.x86_64pigsty93.2 KiBlibx509pq_19-1.3-1PGSTY.el10.x86_64.rpm
libx509pq_191.3el10.aarch64pigsty92.4 KiBlibx509pq_19-1.3-1PGSTY.el10.aarch64.rpm
postgresql-19-libx509pq1.3d12.x86_64pigsty81.7 KiBpostgresql-19-libx509pq_1.3-1PGSTY~bookworm_amd64.deb
postgresql-19-libx509pq1.3d12.aarch64pigsty81.0 KiBpostgresql-19-libx509pq_1.3-1PGSTY~bookworm_arm64.deb
postgresql-19-libx509pq1.3d13.x86_64pigsty81.6 KiBpostgresql-19-libx509pq_1.3-1PGSTY~trixie_amd64.deb
postgresql-19-libx509pq1.3d13.aarch64pigsty80.8 KiBpostgresql-19-libx509pq_1.3-1PGSTY~trixie_arm64.deb
postgresql-19-libx509pq1.3u22.x86_64pigsty88.1 KiBpostgresql-19-libx509pq_1.3-1PGSTY~jammy_amd64.deb
postgresql-19-libx509pq1.3u22.aarch64pigsty87.7 KiBpostgresql-19-libx509pq_1.3-1PGSTY~jammy_arm64.deb
postgresql-19-libx509pq1.3u24.x86_64pigsty85.6 KiBpostgresql-19-libx509pq_1.3-1PGSTY~noble_amd64.deb
postgresql-19-libx509pq1.3u24.aarch64pigsty85.5 KiBpostgresql-19-libx509pq_1.3-1PGSTY~noble_arm64.deb
postgresql-19-libx509pq1.3u26.x86_64pigsty85.0 KiBpostgresql-19-libx509pq_1.3-1PGSTY~resolute_amd64.deb
postgresql-19-libx509pq1.3u26.aarch64pigsty84.5 KiBpostgresql-19-libx509pq_1.3-1PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
libx509pq_181.3el8.x86_64pigsty92.0 KiBlibx509pq_18-1.3-1PGSTY.el8.x86_64.rpm
libx509pq_181.3el8.aarch64pigsty91.0 KiBlibx509pq_18-1.3-1PGSTY.el8.aarch64.rpm
libx509pq_181.3el9.x86_64pigsty92.1 KiBlibx509pq_18-1.3-1PGSTY.el9.x86_64.rpm
libx509pq_181.3el9.aarch64pigsty92.1 KiBlibx509pq_18-1.3-1PGSTY.el9.aarch64.rpm
libx509pq_181.3el10.x86_64pigsty93.1 KiBlibx509pq_18-1.3-1PGSTY.el10.x86_64.rpm
libx509pq_181.3el10.aarch64pigsty92.4 KiBlibx509pq_18-1.3-1PGSTY.el10.aarch64.rpm
postgresql-18-libx509pq1.3d12.x86_64pigsty81.6 KiBpostgresql-18-libx509pq_1.3-1PGSTY~bookworm_amd64.deb
postgresql-18-libx509pq1.3d12.aarch64pigsty80.9 KiBpostgresql-18-libx509pq_1.3-1PGSTY~bookworm_arm64.deb
postgresql-18-libx509pq1.3d13.x86_64pigsty81.5 KiBpostgresql-18-libx509pq_1.3-1PGSTY~trixie_amd64.deb
postgresql-18-libx509pq1.3d13.aarch64pigsty80.6 KiBpostgresql-18-libx509pq_1.3-1PGSTY~trixie_arm64.deb
postgresql-18-libx509pq1.3u22.x86_64pigsty87.9 KiBpostgresql-18-libx509pq_1.3-1PGSTY~jammy_amd64.deb
postgresql-18-libx509pq1.3u22.aarch64pigsty87.5 KiBpostgresql-18-libx509pq_1.3-1PGSTY~jammy_arm64.deb
postgresql-18-libx509pq1.3u24.x86_64pigsty85.4 KiBpostgresql-18-libx509pq_1.3-1PGSTY~noble_amd64.deb
postgresql-18-libx509pq1.3u24.aarch64pigsty85.4 KiBpostgresql-18-libx509pq_1.3-1PGSTY~noble_arm64.deb
postgresql-18-libx509pq1.3u26.x86_64pigsty85.1 KiBpostgresql-18-libx509pq_1.3-1PGSTY~resolute_amd64.deb
postgresql-18-libx509pq1.3u26.aarch64pigsty84.5 KiBpostgresql-18-libx509pq_1.3-1PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
libx509pq_171.3el8.x86_64pigsty92.0 KiBlibx509pq_17-1.3-1PGSTY.el8.x86_64.rpm
libx509pq_171.3el8.aarch64pigsty91.0 KiBlibx509pq_17-1.3-1PGSTY.el8.aarch64.rpm
libx509pq_171.3el9.x86_64pigsty92.3 KiBlibx509pq_17-1.3-1PGSTY.el9.x86_64.rpm
libx509pq_171.3el9.aarch64pigsty92.2 KiBlibx509pq_17-1.3-1PGSTY.el9.aarch64.rpm
libx509pq_171.3el10.x86_64pigsty93.3 KiBlibx509pq_17-1.3-1PGSTY.el10.x86_64.rpm
libx509pq_171.3el10.aarch64pigsty92.5 KiBlibx509pq_17-1.3-1PGSTY.el10.aarch64.rpm
postgresql-17-libx509pq1.3d12.x86_64pigsty81.6 KiBpostgresql-17-libx509pq_1.3-1PGSTY~bookworm_amd64.deb
postgresql-17-libx509pq1.3d12.aarch64pigsty80.8 KiBpostgresql-17-libx509pq_1.3-1PGSTY~bookworm_arm64.deb
postgresql-17-libx509pq1.3d13.x86_64pigsty81.4 KiBpostgresql-17-libx509pq_1.3-1PGSTY~trixie_amd64.deb
postgresql-17-libx509pq1.3d13.aarch64pigsty80.7 KiBpostgresql-17-libx509pq_1.3-1PGSTY~trixie_arm64.deb
postgresql-17-libx509pq1.3u22.x86_64pigsty102.2 KiBpostgresql-17-libx509pq_1.3-1PGSTY~jammy_amd64.deb
postgresql-17-libx509pq1.3u22.aarch64pigsty101.6 KiBpostgresql-17-libx509pq_1.3-1PGSTY~jammy_arm64.deb
postgresql-17-libx509pq1.3u24.x86_64pigsty85.4 KiBpostgresql-17-libx509pq_1.3-1PGSTY~noble_amd64.deb
postgresql-17-libx509pq1.3u24.aarch64pigsty85.4 KiBpostgresql-17-libx509pq_1.3-1PGSTY~noble_arm64.deb
postgresql-17-libx509pq1.3u26.x86_64pigsty85.1 KiBpostgresql-17-libx509pq_1.3-1PGSTY~resolute_amd64.deb
postgresql-17-libx509pq1.3u26.aarch64pigsty84.5 KiBpostgresql-17-libx509pq_1.3-1PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
libx509pq_161.3el8.x86_64pigsty92.0 KiBlibx509pq_16-1.3-1PGSTY.el8.x86_64.rpm
libx509pq_161.3el8.aarch64pigsty91.0 KiBlibx509pq_16-1.3-1PGSTY.el8.aarch64.rpm
libx509pq_161.3el9.x86_64pigsty92.3 KiBlibx509pq_16-1.3-1PGSTY.el9.x86_64.rpm
libx509pq_161.3el9.aarch64pigsty92.2 KiBlibx509pq_16-1.3-1PGSTY.el9.aarch64.rpm
libx509pq_161.3el10.x86_64pigsty93.2 KiBlibx509pq_16-1.3-1PGSTY.el10.x86_64.rpm
libx509pq_161.3el10.aarch64pigsty92.5 KiBlibx509pq_16-1.3-1PGSTY.el10.aarch64.rpm
postgresql-16-libx509pq1.3d12.x86_64pigsty81.6 KiBpostgresql-16-libx509pq_1.3-1PGSTY~bookworm_amd64.deb
postgresql-16-libx509pq1.3d12.aarch64pigsty80.8 KiBpostgresql-16-libx509pq_1.3-1PGSTY~bookworm_arm64.deb
postgresql-16-libx509pq1.3d13.x86_64pigsty81.5 KiBpostgresql-16-libx509pq_1.3-1PGSTY~trixie_amd64.deb
postgresql-16-libx509pq1.3d13.aarch64pigsty80.7 KiBpostgresql-16-libx509pq_1.3-1PGSTY~trixie_arm64.deb
postgresql-16-libx509pq1.3u22.x86_64pigsty101.4 KiBpostgresql-16-libx509pq_1.3-1PGSTY~jammy_amd64.deb
postgresql-16-libx509pq1.3u22.aarch64pigsty100.8 KiBpostgresql-16-libx509pq_1.3-1PGSTY~jammy_arm64.deb
postgresql-16-libx509pq1.3u24.x86_64pigsty85.4 KiBpostgresql-16-libx509pq_1.3-1PGSTY~noble_amd64.deb
postgresql-16-libx509pq1.3u24.aarch64pigsty85.5 KiBpostgresql-16-libx509pq_1.3-1PGSTY~noble_arm64.deb
postgresql-16-libx509pq1.3u26.x86_64pigsty85.1 KiBpostgresql-16-libx509pq_1.3-1PGSTY~resolute_amd64.deb
postgresql-16-libx509pq1.3u26.aarch64pigsty84.5 KiBpostgresql-16-libx509pq_1.3-1PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
libx509pq_151.3el8.x86_64pigsty92.2 KiBlibx509pq_15-1.3-1PGSTY.el8.x86_64.rpm
libx509pq_151.3el8.aarch64pigsty91.0 KiBlibx509pq_15-1.3-1PGSTY.el8.aarch64.rpm
libx509pq_151.3el9.x86_64pigsty92.8 KiBlibx509pq_15-1.3-1PGSTY.el9.x86_64.rpm
libx509pq_151.3el9.aarch64pigsty92.6 KiBlibx509pq_15-1.3-1PGSTY.el9.aarch64.rpm
libx509pq_151.3el10.x86_64pigsty93.7 KiBlibx509pq_15-1.3-1PGSTY.el10.x86_64.rpm
libx509pq_151.3el10.aarch64pigsty93.0 KiBlibx509pq_15-1.3-1PGSTY.el10.aarch64.rpm
postgresql-15-libx509pq1.3d12.x86_64pigsty81.9 KiBpostgresql-15-libx509pq_1.3-1PGSTY~bookworm_amd64.deb
postgresql-15-libx509pq1.3d12.aarch64pigsty81.2 KiBpostgresql-15-libx509pq_1.3-1PGSTY~bookworm_arm64.deb
postgresql-15-libx509pq1.3d13.x86_64pigsty81.9 KiBpostgresql-15-libx509pq_1.3-1PGSTY~trixie_amd64.deb
postgresql-15-libx509pq1.3d13.aarch64pigsty80.8 KiBpostgresql-15-libx509pq_1.3-1PGSTY~trixie_arm64.deb
postgresql-15-libx509pq1.3u22.x86_64pigsty101.9 KiBpostgresql-15-libx509pq_1.3-1PGSTY~jammy_amd64.deb
postgresql-15-libx509pq1.3u22.aarch64pigsty101.3 KiBpostgresql-15-libx509pq_1.3-1PGSTY~jammy_arm64.deb
postgresql-15-libx509pq1.3u24.x86_64pigsty85.9 KiBpostgresql-15-libx509pq_1.3-1PGSTY~noble_amd64.deb
postgresql-15-libx509pq1.3u24.aarch64pigsty86.0 KiBpostgresql-15-libx509pq_1.3-1PGSTY~noble_arm64.deb
postgresql-15-libx509pq1.3u26.x86_64pigsty85.6 KiBpostgresql-15-libx509pq_1.3-1PGSTY~resolute_amd64.deb
postgresql-15-libx509pq1.3u26.aarch64pigsty85.0 KiBpostgresql-15-libx509pq_1.3-1PGSTY~resolute_arm64.deb

源码

pig build pkg libx509pq;		# build rpm/deb

安装

启用 PGDG 和 PIGSTY 仓库并更新缓存。

pig repo add pgsql -u   # add both repo and update cache

使用 pig 安装扩展。

pig install libx509pq;		# install by package name

pig install libx509pq -v 19;   # install for PG 19
pig install libx509pq -v 18;   # install for PG 18
pig install libx509pq -v 17;   # install for PG 17
pig install libx509pq -v 16;   # install for PG 16
pig install libx509pq -v 15;   # install for PG 15

在数据库中创建扩展。

CREATE EXTENSION libx509pq;

用法

来源:

libx509pq 向 SQL 暴露 OpenSSL X.509 证书解析。它接收 DER bytea 证书,并提取主题、签发者、有效期、序列号、密钥与签名信息、扩展、备用名称、指纹等字段。

CREATE EXTENSION libx509pq;
SELECT x509_commonName(der),
       x509_issuerName(der),
       x509_notBefore(der),
       x509_notAfter(der),
       x509_keyAlgorithm(der),
       x509_keySize(der)
FROM certificate_store;

提取多个基础字段时,x509_basic_info(der) 可避免重复解析同一证书。其他 API 可枚举扩展与名称、提取公钥、识别部分弱密钥模式,并用指定密钥验证单个证书签名。

解析或签名验证并不等于完整 PKIX 路径验证:它本身不能建立信任、主机名有效性、吊销状态、策略或当前可接受性。畸形 DER 会进入原生 OpenSSL 代码,应限制输入大小,用不可信语料做模糊和回归测试,并及时修补 PostgreSQL 与 OpenSSL。构建和运行时应固定 OpenSSL ABI,审计错误哨兵与空值语义,限制高开销函数,并基准批量解析。

表格阅读器