sslutils
sslutils
sslutils : A Postgres extension for managing SSL certificates through SQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 7410 | sslutils
|
sslutils
|
1.4 |
SEC
|
PostgreSQL
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d--
|
No
|
Yes
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| See Also | sslinfo
pgsodium
pgsmcrypto
pgcryptokey
pgcrypto
pg_tde
passwordcheck_cracklib
supautils
|
no pg15,14 on el9, no pg18 on el8
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
1.4 |
18
17
16
15
14
|
sslutils |
- |
| RPM | PIGSTY
|
1.4 |
18
17
16
15
14
|
sslutils_$v |
- |
| DEB | PIGSTY
|
1.4 |
18
17
16
15
14
|
postgresql-$v-sslutils |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
el8.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
el9.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
el9.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
el10.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
el10.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
d12.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
d12.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
d13.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
d13.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
u22.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
u22.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
u24.x86_64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
u24.aarch64
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
PIGSTY 1.4
|
Source
pig build pkg sslutils; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install sslutils; # install via package name, for the active PG version
pig install sslutils -v 18; # install for PG 18
pig install sslutils -v 17; # install for PG 17
pig install sslutils -v 16; # install for PG 16
pig install sslutils -v 15; # install for PG 15
pig install sslutils -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION sslutils;Usage
sslutils is a PostgreSQL extension for managing SSL certificates through SQL commands. It provides functions to generate, inspect, and manage SSL/TLS certificates directly within the database.
CREATE EXTENSION sslutils;Functions
The extension provides SQL functions for SSL certificate management:
| Function | Description |
|---|---|
openssl_rsa_generate_key(bits int) |
Generate an RSA private key |
openssl_rsa_key_to_csr(key text, cn text, ...) |
Generate a Certificate Signing Request |
openssl_csr_to_crt(csr text, ca_key text, ca_crt text) |
Sign a CSR to produce a certificate |
openssl_rsa_generate_crl(ca_key text, ca_crt text) |
Generate a Certificate Revocation List |
ssl_is_init_fn() |
Check if SSL is initialized |
ssl_get_cipher_fn() |
Get current SSL cipher |
ssl_get_version_fn() |
Get current SSL version |
Typical Workflow
-- Generate a CA private key
SELECT openssl_rsa_generate_key(2048);
-- Create a self-signed CA certificate
-- Generate server key and CSR
-- Sign the CSR with the CAThis extension is useful for automating SSL certificate provisioning in managed PostgreSQL environments.
Last updated on