summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-06 00:44:28 +0100
committermanuel <manuel@mausz.at>2013-02-06 00:44:28 +0100
commit1fa9630fdd0378bcfbfa38b320c3f80986cf5808 (patch)
treef9fee6be204ea3796fa6e02b8bfe36ed6017b776
parent8b77bc6a233b9a7ab069c68e75dc140af7a7e539 (diff)
downloadqmail-1fa9630fdd0378bcfbfa38b320c3f80986cf5808.tar.gz
qmail-1fa9630fdd0378bcfbfa38b320c3f80986cf5808.tar.bz2
qmail-1fa9630fdd0378bcfbfa38b320c3f80986cf5808.zip
[PATCH] qmail-smtpd_auth-ssl-fix-spp
-rw-r--r--qmail-smtpd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c
index 76cedcb..43570f4 100644
--- a/qmail-smtpd.c
+++ b/qmail-smtpd.c
@@ -65,6 +65,7 @@ void tls_init();
65int tls_verify(); 65int tls_verify();
66void tls_nogateway(); 66void tls_nogateway();
67int ssl_rfd = -1, ssl_wfd = -1; /* SSL_get_Xfd() are broken */ 67int ssl_rfd = -1, ssl_wfd = -1; /* SSL_get_Xfd() are broken */
68stralloc proto = {0};
68#endif 69#endif
69 70
70int safewrite(fd,buf,len) int fd; char *buf; int len; 71int safewrite(fd,buf,len) int fd; char *buf; int len;
@@ -1062,7 +1063,16 @@ char *arg;
1062 case 0: 1063 case 0:
1063 if (!spp_auth(authcmds[i].text, user.s)) return; 1064 if (!spp_auth(authcmds[i].text, user.s)) return;
1064 flagauth = 1; 1065 flagauth = 1;
1065 protocol = "ESMTPA"; 1066 if (ssl) {
1067 if (!stralloc_copys(&proto, "ESMTPSA (")
1068 || !stralloc_cats(&proto, SSL_get_cipher(ssl))
1069 || !stralloc_cats(&proto, " encrypted, authenticated)"))
1070 die_nomem();
1071 if (!stralloc_0(&proto)) die_nomem();
1072 protocol = proto.s;
1073 } else {
1074 protocol = "ESMTPA";
1075 }
1066 relayclient = ""; 1076 relayclient = "";
1067 remoteinfo = user.s; 1077 remoteinfo = user.s;
1068 if (!env_unset("TCPREMOTEINFO")) die_read(); 1078 if (!env_unset("TCPREMOTEINFO")) die_read();
@@ -1079,7 +1089,6 @@ char *arg;
1079/* this file is too long --------------------------------------------- GO ON */ 1089/* this file is too long --------------------------------------------- GO ON */
1080 1090
1081#ifdef TLS 1091#ifdef TLS
1082stralloc proto = {0};
1083int ssl_verified = 0; 1092int ssl_verified = 0;
1084const char *ssl_verify_err = 0; 1093const char *ssl_verify_err = 0;
1085 1094