From: Simon Schubert Date: Thu, 16 Jul 2009 10:24:44 +0000 (+0200) Subject: dma: unconditionally use openssl X-Git-Tag: v2.4.0~414^2~12 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/1ff94032a892b79a088be1baaa5136a593267200 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. --- diff --git a/libexec/dma/Makefile b/libexec/dma/Makefile index d5adfeefc8..5d7f30fd09 100644 --- a/libexec/dma/Makefile +++ b/libexec/dma/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/libexec/dma/crypto.c b/libexec/dma/crypto.c index 7e5f292117..a75fc5b2f0 100644 --- a/libexec/dma/crypto.c +++ b/libexec/dma/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/libexec/dma/dma.c b/libexec/dma/dma.c index ef0639aff8..2db8dcd549 100644 --- a/libexec/dma/dma.c +++ b/libexec/dma/dma.c @@ -40,10 +40,6 @@ #include #include -#ifdef HAVE_CRYPTO -#include -#endif /* HAVE_CRYPTO */ - #include #include #include diff --git a/libexec/dma/dma.h b/libexec/dma/dma.h index 9128f37650..dc9a39b20f 100644 --- a/libexec/dma/dma.h +++ b/libexec/dma/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/libexec/dma/net.c b/libexec/dma/net.c index 8dd09bf194..bcd3ce5b51 100644 --- a/libexec/dma/net.c +++ b/libexec/dma/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) {