{"Entry":{"collection":"hook","key":"openssl_tls_init_hook","name":"openssl_tls_init_hook","aliases":[],"metadata":{"aliases":[],"category":"Authentication and connections","content_hash":"61b2e6517ab7c91122da207af487a933a710cef5d167514d87702a65fec3500f","imported_at":"2026-09-27T17:57:58.830514+08:00","name":"openssl_tls_init_hook","name_zh":"openssl_tls_init_hook","slug":"openssl_tls_init_hook","summary":"openssl_tls_init_hook: core extension hook declared in src/include/libpq/libpq-be.h. The exact interface and call sites are recorded below."}},"Definition":{"Collection":"hook","Key":"openssl_tls_init_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"openssl_tls_init_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Call init hook (usually to set password callback)"],"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"}],"related":[],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["src/backend/libpq/be-secure-openssl.c:132"],"title":"Call sites"},{"code":"\t */\n\tSSL_CTX_set_mode(context, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);\n\n\t/*\n\t * Call init hook (usually to set password callback)\n\t */\n\t(*openssl_tls_init_hook) (context, isServerStart);\n\n\t/* used by the callback */\n\tssl_is_server_start = isServerStart;\n\n\t/*\n\t * Load and verify server's certificate and private key\n\t */\n\tif (SSL_CTX_use_certificate_chain_file(context, ssl_cert_file) != 1)","paragraphs":[],"title":"Core call context: src/backend/libpq/be-secure-openssl.c:126–140"}],"signature":"typedef void (*openssl_tls_init_hook_typ) (SSL_CTX *context, bool isServerStart);\nextern PGDLLIMPORT openssl_tls_init_hook_typ openssl_tls_init_hook;","sources":[{"label":"Interface declaration","path":"src/include/libpq/libpq-be.h","sha256":"1588b2cfe9ea1f737055880b8d09667feb59d918ab16dfeb855b0eae996596db","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/libpq/libpq-be.h#L335"},{"label":"Core definition","path":"src/backend/libpq/be-secure-openssl.c","sha256":"68195987503c2b0c32048559352fa8e7e7265cdd047777941eb8fefae98fb4f7","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/be-secure-openssl.c#L57"},{"label":"Call sites","path":"src/backend/libpq/be-secure-openssl.c","sha256":"68195987503c2b0c32048559352fa8e7e7265cdd047777941eb8fefae98fb4f7","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/be-secure-openssl.c#L132"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/libpq/libpq-be.h","sha256":"1588b2cfe9ea1f737055880b8d09667feb59d918ab16dfeb855b0eae996596db","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/libpq/libpq-be.h#L335"},{"label":"Core definition","path":"src/backend/libpq/be-secure-openssl.c","sha256":"68195987503c2b0c32048559352fa8e7e7265cdd047777941eb8fefae98fb4f7","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/be-secure-openssl.c#L57"},{"label":"Call sites","path":"src/backend/libpq/be-secure-openssl.c","sha256":"68195987503c2b0c32048559352fa8e7e7265cdd047777941eb8fefae98fb4f7","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/be-secure-openssl.c#L132"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"openssl_tls_init_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"openssl_tls_init_hook","Summary":"Call init hook (usually to set password callback)","BodyHTML":"\u003cp\u003eCall init hook (usually to set password callback)\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"4d910b3486ed76df23cb313694da82d2945033028bedc9920666bf75d8eed1e4","Payload":{"description":["Call init hook (usually to set password callback)"],"related":[],"sections":[{"paragraphs":["src/backend/libpq/be-secure-openssl.c:132"],"title":"Call sites"},{"code":"\t */\n\tSSL_CTX_set_mode(context, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);\n\n\t/*\n\t * Call init hook (usually to set password callback)\n\t */\n\t(*openssl_tls_init_hook) (context, isServerStart);\n\n\t/* used by the callback */\n\tssl_is_server_start = isServerStart;\n\n\t/*\n\t * Load and verify server's certificate and private key\n\t */\n\tif (SSL_CTX_use_certificate_chain_file(context, ssl_cert_file) != 1)","paragraphs":[],"title":"Core call context: src/backend/libpq/be-secure-openssl.c:126–140"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
