mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Provide a TLS init hook
The default hook function sets the default password callback function. In order to allow preloaded libraries to have an opportunity to override the default, TLS initialization if now delayed slightly until after shared preloaded libraries have been loaded. A test module is provided which contains a trivial example that decodes an obfuscated password for an SSL certificate. Author: Andrew Dunstan Reviewed By: Andreas Karlsson, Asaba Takanori Discussion: https://postgr.es/m/04116472-818b-5859-1d74-3d995aab2252@2ndQuadrant.com
This commit is contained in:
@@ -972,17 +972,6 @@ PostmasterMain(int argc, char *argv[])
|
||||
*/
|
||||
LocalProcessControlFile(false);
|
||||
|
||||
/*
|
||||
* Initialize SSL library, if specified.
|
||||
*/
|
||||
#ifdef USE_SSL
|
||||
if (EnableSSL)
|
||||
{
|
||||
(void) secure_initialize(true);
|
||||
LoadedSSL = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Register the apply launcher. Since it registers a background worker,
|
||||
* it needs to be called before InitializeMaxBackends(), and it's probably
|
||||
@@ -996,6 +985,17 @@ PostmasterMain(int argc, char *argv[])
|
||||
*/
|
||||
process_shared_preload_libraries();
|
||||
|
||||
/*
|
||||
* Initialize SSL library, if specified.
|
||||
*/
|
||||
#ifdef USE_SSL
|
||||
if (EnableSSL)
|
||||
{
|
||||
(void) secure_initialize(true);
|
||||
LoadedSSL = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Now that loadable modules have had their chance to register background
|
||||
* workers, calculate MaxBackends.
|
||||
|
||||
Reference in New Issue
Block a user