summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/smtp.c')
-rw-r--r--usr.sbin/smtpd/smtp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index e12d8728b8a..70b9e0f3dcc 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.95 2011/12/12 17:17:55 eric Exp $ */
+/* $OpenBSD: smtp.c,v 1.96 2011/12/13 23:55:00 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -209,6 +209,14 @@ smtp_imsg(struct imsgev *iev, struct imsg *imsg)
if (ssl->ssl_dhparams == NULL)
fatal(NULL);
}
+ if (ssl->ssl_ca_len) {
+ ssl->ssl_ca = strdup((char *)imsg->data
+ + sizeof *ssl + ssl->ssl_cert_len +
+ ssl->ssl_key_len + ssl->ssl_dhparams_len);
+ if (ssl->ssl_ca == NULL)
+ fatal(NULL);
+ }
+
SPLAY_INSERT(ssltree, env->sc_ssl, ssl);
return;