Continue phase 2 of modules stuff.
[citadel.git] / citadel / modules / smtp / serv_smtp.c
index c2329ba9168cf958524ed78e8a568efdd842bc16..f24701ac08ace625f62273c6e92823489409cff7 100644 (file)
 #include "locate_host.h"
 #include "citadel_dirs.h"
 
-#ifdef HAVE_OPENSSL
-#include "serv_crypto.h"
-#endif
-
 
 
 #ifndef HAVE_SNPRINTF
@@ -168,12 +164,10 @@ void smtp_greeting(int is_msa)
 /*
  * SMTPS is just like SMTP, except it goes crypto right away.
  */
-#ifdef HAVE_OPENSSL
 void smtps_greeting(void) {
-       CtdlStartTLS(NULL, NULL, NULL);
+       CtdlModuleStartCryptoMsgs(NULL, NULL, NULL);
        smtp_greeting(0);
 }
-#endif
 
 
 /*
@@ -797,7 +791,6 @@ void smtp_data(void) {
 /*
  * implements the STARTTLS command (Citadel API version)
  */
-#ifdef HAVE_OPENSSL
 void smtp_starttls(void)
 {
        char ok_response[SIZ];
@@ -810,10 +803,9 @@ void smtp_starttls(void)
                "554 5.7.3 TLS not supported here\r\n");
        sprintf(error_response,
                "554 5.7.3 Internal error\r\n");
-       CtdlStartTLS(ok_response, nosup_response, error_response);
+       CtdlModuleStartCryptoMsgs(ok_response, nosup_response, error_response);
        smtp_rset(0);
 }
-#endif