sslutils
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
sslutils | 1.4 | SEC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7410 | sslutils | No | Yes | No | Yes | No | No | - |
| Related | sslinfo pgsodium pgsmcrypto pgcryptokey pgcrypto pg_tde passwordcheck_cracklib supautils |
|---|
no pg15,14 on el9, no pg18 on el8
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.4 | 1817161514 | sslutils | - |
| RPM | PIGSTY | 1.4 | 1817161514 | sslutils_$v | - |
| DEB | PIGSTY | 1.4 | 1817161514 | postgresql-$v-sslutils | - |
Build
You can build the RPM / DEB packages for sslutils using pig build:
pig build pkg sslutils # build RPM / DEB packages
Install
You can install sslutils directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install sslutils; # Install for current active PG version
pig ext install -y sslutils -v 18 # PG 18
pig ext install -y sslutils -v 17 # PG 17
pig ext install -y sslutils -v 16 # PG 16
pig ext install -y sslutils -v 15 # PG 15
pig ext install -y sslutils -v 14 # PG 14
dnf install -y sslutils_18 # PG 18
dnf install -y sslutils_17 # PG 17
dnf install -y sslutils_16 # PG 16
dnf install -y sslutils_15 # PG 15
dnf install -y sslutils_14 # PG 14
apt install -y postgresql-18-sslutils # PG 18
apt install -y postgresql-17-sslutils # PG 17
apt install -y postgresql-16-sslutils # PG 16
apt install -y postgresql-15-sslutils # PG 15
apt install -y postgresql-14-sslutils # PG 14
Create Extension:
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 CA
This extension is useful for automating SSL certificate provisioning in managed PostgreSQL environments.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.