diff options
| author | manuel <manuel@mausz.at> | 2023-08-17 00:11:44 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2023-08-17 00:11:44 +0200 |
| commit | eb5ca293396b8da8d8e994a6e1ad3ca467169b85 (patch) | |
| tree | ceea1f64e1a2bbac9f39cc8a8ab5c76d8661af8f | |
| parent | 4df2021e49f5cd9efea175f50033cf27fd3b2dd8 (diff) | |
| download | qmail-eb5ca293396b8da8d8e994a6e1ad3ca467169b85.tar.gz qmail-eb5ca293396b8da8d8e994a6e1ad3ca467169b85.tar.bz2 qmail-eb5ca293396b8da8d8e994a6e1ad3ca467169b85.zip | |
qmail-smtpd: print tls error message on stderr
| -rw-r--r-- | qmail-smtpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c index d02452f..5c28cf2 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c | |||
| @@ -1304,9 +1304,13 @@ void tls_nogateway() | |||
| 1304 | } | 1304 | } |
| 1305 | void tls_out(const char *s1, const char *s2) | 1305 | void tls_out(const char *s1, const char *s2) |
| 1306 | { | 1306 | { |
| 1307 | enew(); eout("TLS "); eout(s1); | ||
| 1308 | if (s2) { eout(" :"); eout(s2); } | ||
| 1309 | eout("\n"); | ||
| 1307 | out("454 TLS "); out(s1); | 1310 | out("454 TLS "); out(s1); |
| 1308 | if (s2) { out(": "); out(s2); } | 1311 | if (s2) { out(": "); out(s2); } |
| 1309 | out(" (#4.3.0)\r\n"); flush(); | 1312 | out(" (#4.3.0)\r\n"); flush(); |
| 1313 | eflush(); | ||
| 1310 | } | 1314 | } |
| 1311 | void tls_err(const char *s) { tls_out(s, ssl_error()); if (smtps) die_read(); } | 1315 | void tls_err(const char *s) { tls_out(s, ssl_error()); if (smtps) die_read(); } |
| 1312 | 1316 | ||
| @@ -1408,7 +1412,7 @@ void tls_init() | |||
| 1408 | if (SSL_CONF_cmd(cctx, cmd, arg) <= 0) { | 1412 | if (SSL_CONF_cmd(cctx, cmd, arg) <= 0) { |
| 1409 | enew(); eout("opensslconf \""); eout(cmd); eout(" "); eout(arg); | 1413 | enew(); eout("opensslconf \""); eout(cmd); eout(" "); eout(arg); |
| 1410 | eout("\" failed: "); eout(ssl_error()); eout("\n"); eflush(); | 1414 | eout("\" failed: "); eout(ssl_error()); eout("\n"); eflush(); |
| 1411 | tls_out("OpenSSL", "unable to initialize ssl"); | 1415 | tls_out("unable to configure ssl library", NULL); |
| 1412 | SSL_free(myssl); | 1416 | SSL_free(myssl); |
| 1413 | die_read(); | 1417 | die_read(); |
| 1414 | } | 1418 | } |
