{"Entry":{"collection":"hook","key":"openssl_tls_init_hook","name":"openssl_tls_init_hook","aliases":[],"metadata":{"aliases":[],"category":"Authentication and connections","content_hash":"61b2e6517ab7c91122da207af487a933a710cef5d167514d87702a65fec3500f","derived_content_hash":"66bb5621e6ee3bd2e75d08ced0853828e0c9e741b7f5fb3f5567dc2747be09a4","imported_at":"2026-09-27T17:57:58.830514+08:00","name":"openssl_tls_init_hook","name_zh":"openssl_tls_init_hook","repair_provenance":{"original_source_revision":"","receipt_sha256":"0b87e340d7cd442f2e63df521acf856969df1c0dea2af0946038d92ab98838f0","repair":"wiki-repair-20261023"},"slug":"openssl_tls_init_hook","source_rev":"wiki-repair-20261023:2b4c8b6cdaf2e2bb48b658627a3335d8c50d2b4e3aebc5a3a8024b38b880dcba","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)"],"description_zh":"调用初始化钩子，通常用于设置密码回调。","description_zh_html":"\u003cp\u003e调用初始化钩子，通常用于设置密码回调。\u003c/p\u003e\u003cp\u003e以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。\u003c/p\u003e\u003ch3\u003e接口声明\u003c/h3\u003e\u003cpre\u003etypedef void (*openssl_tls_init_hook_typ) (SSL_CTX *context, bool isServerStart);\nextern PGDLLIMPORT openssl_tls_init_hook_typ openssl_tls_init_hook;\u003c/pre\u003e\u003ch3\u003e调用位置\u003c/h3\u003e\u003cul\u003e\u003cli\u003e\u003ccode\u003esrc/backend/libpq/be-secure-openssl.c:132\u003c/code\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003e核心调用上下文：src/backend/libpq/be-secure-openssl.c:126–140\u003c/h3\u003e\u003cpre\u003e\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\u0026#x27;s certificate and private key\n\t */\n\tif (SSL_CTX_use_certificate_chain_file(context, ssl_cert_file) != 1)\u003c/pre\u003e","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"}],"translation_provenance":{"inputs":[{"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"}],"kind":"authored-source-translation","locale":"zh-Hans","source_revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","translated_source_sha256":"28cd28c0e118056a594cc2d6949f148f98421f3e031e6208a608c7f833eacce2","version":"18"},"zh_from":"authored-source-translation"},"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":"en","Fallback":false,"Versions":["13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
