-
Notifications
You must be signed in to change notification settings - Fork 3
/
sslutils--1.0--1.3.sql
32 lines (28 loc) · 1.26 KB
/
sslutils--1.0--1.3.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
CREATE OR REPLACE FUNCTION sslutils_version()
RETURNS text
AS 'MODULE_PATHNAME', 'sslutils_version'
LANGUAGE C IMMUTABLE;
COMMENT ON FUNCTION sslutils_version() IS 'Returns the current version of sslutils';
CREATE OR REPLACE FUNCTION openssl_is_crt_expire_on(text, timestamptz)
RETURNS integer
AS 'MODULE_PATHNAME', 'openssl_is_crt_expire_on'
LANGUAGE C IMMUTABLE;
COMMENT ON FUNCTION openssl_is_crt_expire_on(text, timestamptz) IS 'Compare certificate expiry on given time.
-- Parameters:
-- param1 : Path to certificate.
-- param2 : time to compare with end date';
CREATE OR REPLACE FUNCTION openssl_revoke_certificate(text, text)
RETURNS text
AS 'MODULE_PATHNAME', 'openssl_revoke_certificate'
LANGUAGE C IMMUTABLE;
COMMENT ON FUNCTION openssl_revoke_certificate(text, text) IS 'Revoke Certificate and add to Certificate Revocation List (CRL).
-- Parameters:
-- param1 : Path to client certificate to be revoked.
-- param2 : CRL file name specified in postgres config file.';
CREATE OR REPLACE FUNCTION openssl_get_crt_expiry_date(text)
RETURNS timestamptz
AS 'MODULE_PATHNAME', 'openssl_get_crt_expiry_date'
LANGUAGE C IMMUTABLE;
COMMENT ON FUNCTION openssl_get_crt_expiry_date(text) IS 'Return the expiry date of the given certificate.
-- Parameters:
-- param1 : Path to certificate.';