diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2021-04-10 10:19:20 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2021-04-10 10:19:20 +0000 |
commit | f7e47fd526363bbe45dcc3e01ab1041c939b1713 (patch) | |
tree | 44492f378123869d1dc939b4f9b6b48242bbee1e /usr.sbin/smtpd/smtpc.c | |
parent | 94eaccfa92d220ca8df2f1d2189c3da60854355f (diff) |
remove dead code and unused dependencies
ok tb@
Diffstat (limited to 'usr.sbin/smtpd/smtpc.c')
-rw-r--r-- | usr.sbin/smtpd/smtpc.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/usr.sbin/smtpd/smtpc.c b/usr.sbin/smtpd/smtpc.c index fd0f8ef3652..ca48604feb5 100644 --- a/usr.sbin/smtpd/smtpc.c +++ b/usr.sbin/smtpd/smtpc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpc.c,v 1.14 2021/03/05 12:37:32 eric Exp $ */ +/* $OpenBSD: smtpc.c,v 1.15 2021/04/10 10:19:19 eric Exp $ */ /* * Copyright (c) 2018 Eric Faurot <eric@openbsd.org> @@ -32,10 +32,7 @@ #include <tls.h> #include <unistd.h> -#include <openssl/ssl.h> - #include "smtp.h" -#include "ssl.h" #include "log.h" static void parse_server(char *); @@ -371,37 +368,6 @@ log_trace(int lvl, const char *emsg, ...) } void -smtp_verify_server_cert(void *tag, struct smtp_client *proto, void *ctx) -{ - SSL *ssl = ctx; - X509 *cert; - long res; - int match; - - if ((cert = SSL_get_peer_certificate(ssl))) { - (void)ssl_check_name(cert, servname, &match); - X509_free(cert); - res = SSL_get_verify_result(ssl); - if (res == X509_V_OK) { - if (match) { - log_debug("valid certificate"); - smtp_cert_verified(proto, CERT_OK); - } - else { - log_debug("certificate does not match hostname"); - smtp_cert_verified(proto, CERT_INVALID); - } - return; - } - log_debug("certificate validation error %ld", res); - } - else - log_debug("no certificate provided"); - - smtp_cert_verified(proto, CERT_INVALID); -} - -void smtp_require_tls(void *tag, struct smtp_client *proto) { struct tls *tls; |