* Create a new SSL context into which we'll load all the configuration
* settings. If we fail partway through, we can avoid memory leakage by
* freeing this context; we don't install it as active until the end.
- *
- * We use SSLv23_method() because it can negotiate use of the highest
- * mutually supported protocol version, while alternatives like
- * TLSv1_2_method() permit only one specific version. Note that we don't
- * actually allow SSL v2 or v3, only TLS protocols (see below).
*/
- context = SSL_CTX_new(SSLv23_method());
+ context = SSL_CTX_new(TLS_method());
if (!context)
{
ereport(isServerStart ? FATAL : LOG,
static bool
init_host_context(HostsLine *host, bool isServerStart, bool *hasWarned)
{
- SSL_CTX *ctx = SSL_CTX_new(SSLv23_method());
+ SSL_CTX *ctx = SSL_CTX_new(TLS_method());
if (!ctx)
{
* complicated if connections used different certificates. So now we
* create a separate context for each connection, and accept the overhead.
*/
- SSL_context = SSL_CTX_new(SSLv23_method());
+ SSL_context = SSL_CTX_new(TLS_method());
if (!SSL_context)
{
char *err = SSLerrmessage(ERR_get_error());