Skip to content

Commit 2f08dd6

Browse files
committed
fixup! Make crypto.c compile/link with OpenSSL 3
1 parent f786a3b commit 2f08dd6

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

crypto.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,7 @@ smtp_init_crypto(int fd, int feature, struct smtp_features* features)
121121

122122
/* XXX clean up on error/close */
123123
/* Init SSL library */
124-
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
125-
error = OPENSSL_init_ssl(0, NULL);
126-
if (error != 1) {
127-
syslog(LOG_WARNING, "remote delivery deferred: SSL init failed: %s", ssl_errstr());
128-
return (1);
129-
}
130-
#else
124+
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
131125
SSL_library_init();
132126
SSL_load_error_strings();
133127
#endif
@@ -316,8 +310,8 @@ hmac_md5(unsigned char *text, int text_len, unsigned char *key, int key_len,
316310
EVP_DigestFinal_ex(context, digest, NULL);
317311

318312
/**
319-
* Perform outer MD5.
320-
*/
313+
* Perform outer MD5.
314+
*/
321315

322316
/* Re-init context for second pass. */
323317
EVP_DigestInit_ex(context, md, NULL);
@@ -338,7 +332,7 @@ hmac_md5(unsigned char *text, int text_len, unsigned char *key, int key_len,
338332
MD5_Update(&context, k_ipad, 64); /* start with inner pad */
339333
MD5_Update(&context, text, text_len); /* then text of datagram */
340334

341-
MD5_Final(digest, &context); /* finish up 1st pass */
335+
MD5_Final(digest, &context); /* finish up 1st pass */
342336
/*
343337
* perform outer MD5
344338
*/

0 commit comments

Comments
 (0)