diff options
| author | Pawel Salek <pawsa@fedorapeople.org> | 2010-03-05 21:22:15 +0100 |
|---|---|---|
| committer | Pawel Salek <pawsa@fedorapeople.org> | 2010-03-05 21:22:15 +0100 |
| commit | 0cc409a44cac5ac29d0bd18fa13a4e9f2b2f2b96 (patch) | |
| tree | 5a54b7a2e3f0d767cbf587212c95897b8310a28b /protocol.c | |
| parent | 5d3cf8a33ced580af0d3e30b8fbd3cf9a5aa315a (diff) | |
| download | libesmtp-0cc409a44cac5ac29d0bd18fa13a4e9f2b2f2b96.tar.gz libesmtp-0cc409a44cac5ac29d0bd18fa13a4e9f2b2f2b96.tar.xz libesmtp-0cc409a44cac5ac29d0bd18fa13a4e9f2b2f2b96.zip | |
Implement submission to smtps service.
* examples/mail-file.c: allow testing submission to smtps service.
* libesmtp-private.h: add negotiate_ssl() prototype.
* libesmtp.h: add Starttls_OVER_SSL to starttls_option enum.
* protocol.h: enable SSL on connection whenever selected.
* smtp-tls.c: share negotiate_ssl().
Diffstat (limited to 'protocol.c')
| -rw-r--r-- | protocol.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -303,6 +303,18 @@ do_session (smtp_session_t session) #ifdef USE_TLS session->using_tls = 0; #endif +#if 1 + if (session->starttls_enabled == Starttls_OVER_SSL) + { + if ( !(select_starttls (session) && + negotiate_ssl (conn, session) == 0) ) + continue; + /* Do we handle here negotiate_ssl returning -1? We might + leave a dangling open socket here. */ + } +#endif + printf("%s A %d\n", __func__, session->using_tls); + nresp = 0; session->cmd_state = session->rsp_state = 0; |
