↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Hooks / Authentication and connections

openssl_tls_init_hook

openssl_tls_init_hook

Call init hook (usually to set password callback)

Reading PostgreSQL 18.

Description

Call init hook (usually to set password callback)

Interface type
openssl_tls_init_hook_typ
Header
src/include/libpq/libpq-be.h
Subsystem
Authentication and connections
Initial value
default_openssl_tls_init

C interface

typedef void (*openssl_tls_init_hook_typ) (SSL_CTX *context, bool isServerStart);
extern PGDLLIMPORT openssl_tls_init_hook_typ openssl_tls_init_hook;

Call sites

src/backend/libpq/be-secure-openssl.c:132

Core call context: src/backend/libpq/be-secure-openssl.c:126–140

	 */
	SSL_CTX_set_mode(context, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);

	/*
	 * Call init hook (usually to set password callback)
	 */
	(*openssl_tls_init_hook) (context, isServerStart);

	/* used by the callback */
	ssl_is_server_start = isServerStart;

	/*
	 * Load and verify server's certificate and private key
	 */
	if (SSL_CTX_use_certificate_chain_file(context, ssl_cert_file) != 1)

Documentation and source

Source build
Version
18
Build
REL_18_STABLE
Source fingerprint
753057e340da8f22e57c9a409ea7a235fd6a46bd

Compare versions

PostgreSQL 12 → 13: added.

--- PostgreSQL 12
+++ PostgreSQL 13
@@ -1 +1,22 @@
-Not recorded in this version
+{
+  "facts": [
+    {
+      "label": "Interface type",
+      "value": "openssl_tls_init_hook_typ"
+    },
+    {
+      "label": "Header",
+      "value": "src/include/libpq/libpq-be.h"
+    },
+    {
+      "label": "Subsystem",
+      "value": "Authentication and connections"
+    },
+    {
+      "label": "Initial value",
+      "value": "default_openssl_tls_init"
+    }
+  ],
+  "signature": "typedef void (*openssl_tls_init_hook_typ) (SSL_CTX *context, bool isServerStart);\nextern PGDLLIMPORT openssl_tls_init_hook_typ openssl_tls_init_hook;",
+  "tables": null
+}

Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.

Related entries

Export JSON · Back to Hooks · Recorded in PostgreSQL 13 through 20; the first sample is not necessarily its introduction.