summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-06-01 14:53:19 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-06-01 14:53:19 +0000
commitfc60ad6a31486ad2f81a1356db67d2dce2dd9973 (patch)
tree095e1d612128c29825a0afc2b443c09d3d762079
parent4c7862e787e10c16b3cf1d4e73043a66ebb4e4d1 (diff)
display ssl negociation information in the received line of incoming
sessions; ok jacekm@
-rw-r--r--usr.sbin/smtpd/smtp_session.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index d8c37a86232..a5959204f83 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.104 2009/05/31 18:34:48 gilles Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.105 2009/06/01 14:53:18 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -27,6 +27,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <ssl/ssl.h>
+
#include <ctype.h>
#include <errno.h>
#include <event.h>
@@ -666,6 +668,12 @@ session_pickup(struct session *s, struct submit_status *ss)
s->s_env->sc_hostname, s->s_flags & F_EHLO ? "E" : "",
s->s_msg.message_id);
+ if (s->s_flags & F_SECURE) {
+ fprintf(s->datafp, "\n\t(version=%s cipher=%s bits=%d)",
+ SSL_get_cipher_version(s->s_ssl),
+ SSL_get_cipher_name(s->s_ssl),
+ SSL_get_cipher_bits(s->s_ssl, NULL));
+ }
if (s->rcptcount == 1)
fprintf(s->datafp, "\n\tfor <%s@%s>; ",
s->s_msg.session_rcpt.user,