[Git][NTPsec/ntpsec][master] libntp: Rename SSL_init to init_ssl
Richard Laager (@rlaager)
gitlab at mg.gitlab.com
Mon May 2 23:07:39 UTC 2022
Richard Laager pushed to branch master at NTPsec / ntpsec
Commits:
e27cae14 by James Browning at 2022-05-02T16:18:45-05:00
libntp: Rename SSL_init to init_ssl
This makes it more obvious that this is NOT an OpenSSL function.
Also, improve the comment by specifying exactly which versions of
OpenSSL need these functions called.
Co-authored-by: Richard Laager <rlaager at wiktel.com>
Signed-off-by: Richard Laager <rlaager at wiktel.com>
- - - - -
1 changed file:
- libntp/pymodule-mac.c
Changes:
=====================================
libntp/pymodule-mac.c
=====================================
@@ -29,8 +29,8 @@
#define EVP_MD_CTX_reset(ctx) EVP_MD_CTX_init(ctx)
#endif
-/* Needed on old versions of OpenSSL */
-static void SSL_init(void) {
+/* Needed on OpenSSL < 1.1.0 */
+static void init_ssl(void) {
static bool init_done = false;
if (init_done)
return;
@@ -48,7 +48,7 @@ int do_checkname(const char *name)
const EVP_MD *digest;
const EVP_CIPHER *cipher;
- SSL_init();
+ init_ssl();
strlcpy(upcase, name, sizeof(upcase));
for (int i=0; upcase[i]!=0; i++) {
@@ -94,7 +94,7 @@ void do_mac(char *name,
size_t cipherlen;
uint8_t newkey[EVP_MAX_KEY_LENGTH];
- SSL_init();
+ init_ssl();
strlcpy(upcase, name, sizeof(upcase));
for (int i=0; upcase[i]!=0; i++) {
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/e27cae1492f3920d1da7498271127934a52fae49
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/e27cae1492f3920d1da7498271127934a52fae49
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20220502/51ce3d84/attachment-0001.htm>
More information about the vc
mailing list