$Log$
+ Revision 614.38 2004/02/16 21:54:22 ajc
+ * Support POP3 over TLS
+
Revision 614.37 2004/02/16 21:45:43 ajc
* Implement RFC 2487 - SMTP Service Extension for Secure SMTP over TLS
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
#include "serv_pop3.h"
#include "md5.h"
+#ifdef HAVE_OPENSSL
+#include "serv_crypto.h"
+#endif
+
+
/*
* This cleanup function blows away the temporary memory and files used by
}
+/*
+ * implements the STLS command (Citadel API version)
+ */
+#ifdef HAVE_OPENSSL
+void pop3_stls(void)
+{
+ char ok_response[SIZ];
+ char nosup_response[SIZ];
+ char error_response[SIZ];
+
+ sprintf(ok_response,
+ "+OK Begin TLS negotiation now\r\n");
+ sprintf(nosup_response,
+ "-ERR TLS not supported here\r\n");
+ sprintf(error_response,
+ "-ERR Internal error\r\n");
+ CtdlStartTLS(ok_response, nosup_response, error_response);
+}
+#endif
+
+
+
+
+
/*
pop3_apop(&cmdbuf[5]);
}
+#ifdef HAVE_OPENSSL
+ else if (!strncasecmp(cmdbuf, "STLS", 4)) {
+ pop3_stls();
+ }
+#endif
+
else if (!CC->logged_in) {
cprintf("-ERR Not logged in.\r\n");
}
lprintf(5, "SMTP: %s\n", cmdbuf);
while (strlen(cmdbuf) < 5) strcat(cmdbuf, " ");
- lprintf(9, "CC->logged_in = %d\n", CC->logged_in);
-
if (SMTP->command_state == smtp_user) {
smtp_get_user(cmdbuf);
}