mirror of https://github.com/citusdata/citus.git
Refactor OpenSSL initialization and certificate date adjustment for improved clarity and consistency
parent
a70baadecb
commit
3e401a75dc
|
@ -2970,11 +2970,11 @@ DeleteNodeRow(char *nodeName, int32 nodePort)
|
|||
/* PG 18+ adds a bool “deferrable_ok” parameter */
|
||||
Relation replicaIndex =
|
||||
index_open(RelationGetPrimaryKeyIndex(pgDistNode, false),
|
||||
RowExclusiveLock);
|
||||
AccessShareLock);
|
||||
#else
|
||||
Relation replicaIndex =
|
||||
index_open(RelationGetPrimaryKeyIndex(pgDistNode),
|
||||
RowExclusiveLock);
|
||||
AccessShareLock);
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -246,9 +246,11 @@ CreateCertificatesWhenNeeded()
|
|||
* its configuration with ssl enabled.
|
||||
*/
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
|
||||
/* OpenSSL 1.1.0+ */
|
||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
|
||||
#else
|
||||
|
||||
/* OpenSSL < 1.1.0 */
|
||||
SSL_library_init();
|
||||
#endif
|
||||
|
@ -383,10 +385,12 @@ CreateCertificate(EVP_PKEY *privateKey)
|
|||
* expiration date and then suddenly erroring out.
|
||||
*/
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
|
||||
/* OpenSSL 1.1.0+ */
|
||||
X509_gmtime_adj(X509_getm_notBefore(certificate), 0);
|
||||
X509_gmtime_adj(X509_getm_notAfter(certificate), 0);
|
||||
#else
|
||||
|
||||
/* OpenSSL < 1.1.0 */
|
||||
X509_gmtime_adj(X509_get_notBefore(certificate), 0);
|
||||
X509_gmtime_adj(X509_get_notAfter(certificate), 0);
|
||||
|
|
Loading…
Reference in New Issue