libx509pq
libx509pq : X.509 certificate parsing and inspection through OpenSSL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 7420 | libx509pq | libx509pq | 1.3 |
SEC | GPL-3.0-or-later | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | sslinfo sslutils pg_snakeoil pgcrypto |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.3 |
18 17 16 15 14 | libx509pq |
- |
| RPM | PIGSTY | 1.3 |
18 17 16 15 14 | libx509pq_$v |
openssl-libs |
| DEB | PIGSTY | 1.3 |
18 17 16 15 14 | postgresql-$v-libx509pq |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| el8.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| el9.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| el9.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| el10.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| el10.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| d12.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| d12.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| d13.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| d13.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| u22.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| u22.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| u24.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| u24.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| u26.x86_64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
| u26.aarch64 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 | PIGSTY 1.3 |
Source
github.com/crtsh/libx509pq
libx509pq-1.3-bed05c6e87d7.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
libx509pq exposes OpenSSL X.509 certificate parsing to SQL. It accepts DER certificates as bytea and extracts subject, issuer, validity, serial number, key and signature information, extensions, alternate names, fingerprints, and related fields.
For multiple basic fields, x509_basic_info(der) avoids parsing the same certificate repeatedly. Other APIs enumerate extensions and names, expose public keys, identify selected weak-key patterns, and verify one certificate signature against a supplied key.
Parsing or signature verification is not full PKIX path validation: it does not by itself establish trust, hostname validity, revocation status, policy, or current acceptability. Malformed DER reaches native OpenSSL code; cap input size, fuzz and regression-test untrusted corpora, and keep PostgreSQL and OpenSSL patched. Pin the OpenSSL ABI used at build and runtime, review sentinel-versus-null error behavior, restrict expensive functions, and benchmark bulk parsing.