unplug unused certificate verification code, now that this is done by libtls.
authoreric <eric@openbsd.org>
Wed, 21 Apr 2021 07:54:10 +0000 (07:54 +0000)
committereric <eric@openbsd.org>
Wed, 21 Apr 2021 07:54:10 +0000 (07:54 +0000)
ok tb@ millert@

usr.sbin/smtpd/dispatcher.c
usr.sbin/smtpd/lka.c
usr.sbin/smtpd/smtpd.c
usr.sbin/smtpd/smtpd.h
usr.sbin/smtpd/smtpd/Makefile

index 3c67ea4..758de39 100644 (file)
@@ -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 <gilles@poolp.org>
@@ -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:
index e5c6dd7..ec0264a 100644 (file)
@@ -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 <pyr@openbsd.org>
@@ -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:
index 329f6d8..76bf156 100644 (file)
@@ -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 <gilles@poolp.org>
@@ -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);
index 7e73194..be93411 100644 (file)
@@ -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 <gilles@poolp.org>
 #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);
index 694ece9..b31d4e4 100644 (file)
@@ -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