diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-10-27 00:15:14 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-10-27 00:15:14 +0000 |
commit | 0d1e69ae10af5eba7cd3426e802d40d17b6db218 (patch) | |
tree | d838573a667ed2ba75e04797f87eb9f45f1df05f /driver.c | |
parent | 8d293a3b12a5e2c4ecc6f70bcd59b862294458c8 (diff) | |
download | fetchmail-0d1e69ae10af5eba7cd3426e802d40d17b6db218.tar.gz fetchmail-0d1e69ae10af5eba7cd3426e802d40d17b6db218.tar.bz2 fetchmail-0d1e69ae10af5eba7cd3426e802d40d17b6db218.zip |
This preliminary SSL patch goes to Mike.
svn path=/trunk/; revision=2643
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1556,7 +1556,11 @@ const int maxfetch; /* maximum number of messages to fetch */ phase = OPEN_WAIT; set_timeout(mytimeout); #if !INET6 +#ifdef SSL_ENABLE + port = ctl->server.port ? ctl->server.port : ( ctl->use_ssl ? protocol->sslport : protocol->port ); +#else port = ctl->server.port ? ctl->server.port : protocol->port; +#endif #endif /* !INET6 */ realhost = ctl->server.via ? ctl->server.via : ctl->server.pollname; @@ -1615,6 +1619,17 @@ const int maxfetch; /* maximum number of messages to fetch */ set_timeout(0); phase = oldphase; +#ifdef SSL_ENABLE + /* perform initial SSL handshake on open connection */ + /* Note: We pass the realhost name over for certificate + verification. We may want to make this configurable */ + if (ctl->use_ssl && SSLOpen(mailserver_socket,ctl->sslkey,ctl->sslcert,realhost) == -1) + { + report(stderr, "SSL connection failed."); + goto closeUp; + } +#endif + #ifdef KERBEROS_V4 if (ctl->server.preauthenticate == A_KERBEROS_V4) { |