From: eric Date: Wed, 21 Apr 2021 07:54:10 +0000 (+0000) Subject: unplug unused certificate verification code, now that this is done by libtls. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8a42180ccb28a8e0c90d409dde395274eab39c6e;p=openbsd unplug unused certificate verification code, now that this is done by libtls. ok tb@ millert@ --- diff --git a/usr.sbin/smtpd/dispatcher.c b/usr.sbin/smtpd/dispatcher.c index 3c67ea43918..758de39f49c 100644 --- a/usr.sbin/smtpd/dispatcher.c +++ b/usr.sbin/smtpd/dispatcher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatcher.c,v 1.2 2021/03/05 12:37:32 eric Exp $ */ +/* $OpenBSD: dispatcher.c,v 1.3 2021/04/21 07:54:10 eric Exp $ */ /* * Copyright (c) 2014 Gilles Chehade @@ -64,11 +64,6 @@ dispatcher_imsg(struct mproc *p, struct imsg *imsg) resolver_dispatch_result(p, imsg); return; - case IMSG_CERT_INIT: - case IMSG_CERT_VERIFY: - cert_dispatch_result(p, imsg); - return; - case IMSG_CONF_START: return; case IMSG_CONF_END: diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index e5c6dd7f91d..ec0264a572f 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.244 2020/12/31 08:27:15 martijn Exp $ */ +/* $OpenBSD: lka.c,v 1.245 2021/04/21 07:54:10 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -111,12 +111,6 @@ lka_imsg(struct mproc *p, struct imsg *imsg) resolver_dispatch_request(p, imsg); return; - case IMSG_CERT_INIT: - case IMSG_CERT_CERTIFICATE: - case IMSG_CERT_VERIFY: - cert_dispatch_request(p, imsg); - return; - case IMSG_MTA_DNS_HOST: case IMSG_MTA_DNS_MX: case IMSG_MTA_DNS_MX_PREFERENCE: diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 329f6d8673b..76bf1561e1f 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.337 2021/03/05 12:37:32 eric Exp $ */ +/* $OpenBSD: smtpd.c,v 1.338 2021/04/21 07:54:10 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -2003,10 +2003,6 @@ imsg_to_str(int type) CASE(IMSG_GETNAMEINFO); CASE(IMSG_RES_QUERY); - CASE(IMSG_CERT_INIT); - CASE(IMSG_CERT_CERTIFICATE); - CASE(IMSG_CERT_VERIFY); - CASE(IMSG_SETUP_KEY); CASE(IMSG_SETUP_PEER); CASE(IMSG_SETUP_DONE); diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 7e73194dc0b..be934112103 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.667 2021/04/11 07:18:08 eric Exp $ */ +/* $OpenBSD: smtpd.h,v 1.668 2021/04/21 07:54:10 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -102,12 +102,6 @@ #define P_NEWALIASES 1 #define P_MAKEMAP 2 -#define CERT_ERROR -1 -#define CERT_OK 0 -#define CERT_NOCA 1 -#define CERT_NOCERT 2 -#define CERT_INVALID 3 - struct userinfo { char username[SMTPD_VUSERNAME_SIZE]; char directory[PATH_MAX]; @@ -211,10 +205,6 @@ enum imsg_type { IMSG_GETNAMEINFO, IMSG_RES_QUERY, - IMSG_CERT_INIT, - IMSG_CERT_CERTIFICATE, - IMSG_CERT_VERIFY, - IMSG_SETUP_KEY, IMSG_SETUP_PEER, IMSG_SETUP_DONE, @@ -1283,14 +1273,6 @@ void ca_init(void); void ca_engine_init(void); -/* cert.c */ -int cert_init(const char *, int, - void (*)(void *, int, const char *, const void *, size_t), void *); -int cert_verify(const void *, const char *, int, void (*)(void *, int), void *); -void cert_dispatch_request(struct mproc *, struct imsg *); -void cert_dispatch_result(struct mproc *, struct imsg *); - - /* compress_backend.c */ struct compress_backend *compress_backend_lookup(const char *); size_t compress_chunk(void *, size_t, void *, size_t); diff --git a/usr.sbin/smtpd/smtpd/Makefile b/usr.sbin/smtpd/smtpd/Makefile index 694ece96a6b..b31d4e42224 100644 --- a/usr.sbin/smtpd/smtpd/Makefile +++ b/usr.sbin/smtpd/smtpd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.112 2021/04/11 07:18:08 eric Exp $ +# $OpenBSD: Makefile,v 1.113 2021/04/21 07:54:10 eric Exp $ .PATH: ${.CURDIR}/.. @@ -7,7 +7,6 @@ PROG= smtpd SRCS= aliases.c SRCS+= bounce.c SRCS+= ca.c -SRCS+= cert.c SRCS+= compress_backend.c SRCS+= config.c SRCS+= control.c