summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2011-11-03 14:34:14 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2011-11-03 14:34:14 +0000
commitf57decd8224d57a7a4439ad66fb2a10a947c1c65 (patch)
tree7a1cdf6de17b1f925d32f7752fb234d4bca6c83f /usr.sbin/smtpd
parentb26d74cd52e62abeb3ea418a408e20303c7b0e9e (diff)
since smtpctl doesn't need to be build along with client.c,
client.c doesn't need to be build with -DCLIENT_NO_SSL anymore, so get rid of #ifdef CLIENT_NO_SSL ok eric@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/client.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/usr.sbin/smtpd/client.c b/usr.sbin/smtpd/client.c
index 00979d279e1..f3807210dfc 100644
--- a/usr.sbin/smtpd/client.c
+++ b/usr.sbin/smtpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.37 2011/07/06 20:56:16 gilles Exp $ */
+/* $OpenBSD: client.c,v 1.38 2011/11/03 14:34:13 chl Exp $ */
/*
* Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -39,12 +39,10 @@
#include "client.h"
#include "log.h"
-#ifndef CLIENT_NO_SSL
int client_ssl_connect(struct smtp_client *);
SSL *ssl_client_init(int, char *, size_t, char *, size_t);
int ssl_buf_read(SSL *, struct ibuf_read *);
int ssl_buf_write(SSL *, struct msgbuf *);
-#endif
/*
* Initialize SMTP session.
@@ -87,10 +85,6 @@ client_init(int fd, FILE *body, char *ehlo, int verbose)
sp->exts[CLIENT_EXT_STARTTLS].want = 1;
sp->exts[CLIENT_EXT_STARTTLS].must = 1;
-#ifdef CLIENT_NO_SSL
- sp->exts[CLIENT_EXT_STARTTLS].want = 0;
- sp->exts[CLIENT_EXT_STARTTLS].must = 0;
-#endif
sp->exts[CLIENT_EXT_STARTTLS].name = "STARTTLS";
sp->exts[CLIENT_EXT_AUTH].want = 0;
@@ -294,7 +288,6 @@ client_talk(struct smtp_client *sp, int writable)
writable = 0;
}
-#ifndef CLIENT_NO_SSL
if (sp->flags & CLIENT_FLAG_HANDSHAKING) {
if (sp->ssl == NULL) {
log_debug("client: ssl handshake started");
@@ -309,7 +302,6 @@ client_talk(struct smtp_client *sp, int writable)
} else
return client_ssl_connect(sp);
}
-#endif
/* regular handlers */
return (writable ? client_write(sp) : client_read(sp));
@@ -492,7 +484,6 @@ client_write(struct smtp_client *sp)
return client_poll(sp);
}
-#ifndef CLIENT_NO_SSL
/*
* Progress SSL handshake.
*/
@@ -540,7 +531,6 @@ client_ssl_connect(struct smtp_client *sp)
}
}
}
-#endif
/*
* Deinitialization routine.
@@ -567,10 +557,8 @@ client_close(struct smtp_client *sp)
TAILQ_REMOVE(&sp->cmdrecvq, cmd, entry);
cmd_free(cmd);
}
-#ifndef CLIENT_NO_SSL
if (sp->ssl)
SSL_free(sp->ssl);
-#endif
close(sp->w.fd);
free(sp);
}
@@ -816,7 +804,6 @@ client_quit(struct smtp_client *sp)
int
client_socket_read(struct smtp_client *sp)
{
-#ifndef CLIENT_NO_SSL
if (sp->ssl) {
switch (ssl_buf_read(sp->ssl, &sp->r)) {
case SSL_ERROR_NONE:
@@ -830,7 +817,6 @@ client_socket_read(struct smtp_client *sp)
return (CLIENT_DONE);
}
}
-#endif
if (sp->ssl == NULL) {
errno = 0;
if (buf_read(sp->w.fd, &sp->r) == -1) {
@@ -852,7 +838,6 @@ client_socket_read(struct smtp_client *sp)
int
client_socket_write(struct smtp_client *sp)
{
-#ifndef CLIENT_NO_SSL
if (sp->ssl) {
switch (ssl_buf_write(sp->ssl, &sp->w)) {
case SSL_ERROR_NONE:
@@ -866,7 +851,6 @@ client_socket_write(struct smtp_client *sp)
return (CLIENT_DONE);
}
}
-#endif
if (sp->ssl == NULL) {
if (ibuf_write(&sp->w) < 0) {
client_status(sp, "130 buf_write error");