From 2504c0a1bc5723c961ee16a990d30f66104d19c4 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Thu, 16 Jul 2009 12:24:44 +0200 Subject: [PATCH] dma: unconditionally use openssl Drop HAVE_CRYPTO and unconditionally use openssl. Dma is supposed to be small and secure, so there is no way around openssl anyways. --- Makefile | 1 - crypto.c | 4 ---- dma.c | 4 ---- dma.h | 6 ------ net.c | 6 ------ 5 files changed, 21 deletions(-) diff --git a/Makefile b/Makefile index d5adfee..5d7f30f 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ # $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $ # -CFLAGS+= -DHAVE_CRYPTO CFLAGS+= -I${.CURDIR} DPADD= ${LIBSSL} ${LIBCRYPTO} diff --git a/crypto.c b/crypto.c index 7e5f292..a75fc5b 100644 --- a/crypto.c +++ b/crypto.c @@ -35,8 +35,6 @@ * $DragonFly: src/libexec/dma/crypto.c,v 1.4 2008/09/30 17:47:21 swildner Exp $ */ -#ifdef HAVE_CRYPTO - #include #include #include @@ -305,5 +303,3 @@ smtp_auth_md5(struct qitem *it, int fd, char *login, char *password) return (0); } - -#endif /* HAVE_CRYPTO */ diff --git a/dma.c b/dma.c index ef0639a..2db8dcd 100644 --- a/dma.c +++ b/dma.c @@ -40,10 +40,6 @@ #include #include -#ifdef HAVE_CRYPTO -#include -#endif /* HAVE_CRYPTO */ - #include #include #include diff --git a/dma.h b/dma.h index 9128f37..dc9a39b 100644 --- a/dma.h +++ b/dma.h @@ -38,9 +38,7 @@ #ifndef DMA_H #define DMA_H -#ifdef HAVE_CRYPTO #include -#endif /* HAVE_CRYPTO */ #include #include @@ -118,9 +116,7 @@ struct config { char *authpath; char *certfile; int features; -#ifdef HAVE_CRYPTO SSL *ssl; -#endif /* HAVE_CRYPTO */ char *mailname; char *mailnamefile; }; @@ -156,11 +152,9 @@ extern int parse_virtuser(const char *); extern int parse_authfile(const char *); /* crypto.c */ -#ifdef HAVE_CRYPTO extern void hmac_md5(unsigned char *, int, unsigned char *, int, caddr_t); extern int smtp_auth_md5(struct qitem *, int, char *, char *); extern int smtp_init_crypto(struct qitem *, int, int); -#endif /* HAVE_CRYPTO */ /* net.c */ extern int read_remote(int, int, char *); diff --git a/net.c b/net.c index 8dd09bf..bcd3ce5 100644 --- a/net.c +++ b/net.c @@ -43,9 +43,7 @@ #include #include -#ifdef HAVE_CRYPTO #include -#endif /* HAVE_CRYPTO */ #include #include @@ -200,7 +198,6 @@ smtp_login(struct qitem *it, int fd, char *login, char* password) char *temp; int len, res = 0; -#ifdef HAVE_CRYPTO res = smtp_auth_md5(it, fd, login, password); if (res == 0) { return (0); @@ -211,7 +208,6 @@ smtp_login(struct qitem *it, int fd, char *login, char* password) */ return (-1); } -#endif /* HAVE_CRYPTO */ if ((config->features & INSECURE) != 0) { /* Send AUTH command according to RFC 2554 */ @@ -355,7 +351,6 @@ deliver_remote(struct qitem *it, const char **errmsg) } config->features &= ~NOSSL; -#ifdef HAVE_CRYPTO if ((config->features & SECURETRANS) != 0) { error = smtp_init_crypto(it, fd, config->features); if (error >= 0) @@ -364,7 +359,6 @@ deliver_remote(struct qitem *it, const char **errmsg) else goto out; } -#endif /* HAVE_CRYPTO */ send_remote_command(fd, "EHLO %s", hostname()); if (read_remote(fd, 0, NULL) != 2) { -- 2.39.2