# $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}
* $DragonFly: src/libexec/dma/crypto.c,v 1.4 2008/09/30 17:47:21 swildner Exp $
*/
-#ifdef HAVE_CRYPTO
-
#include <openssl/x509.h>
#include <openssl/md5.h>
#include <openssl/ssl.h>
return (0);
}
-
-#endif /* HAVE_CRYPTO */
#include <sys/types.h>
#include <sys/wait.h>
-#ifdef HAVE_CRYPTO
-#include <openssl/ssl.h>
-#endif /* HAVE_CRYPTO */
-
#include <dirent.h>
#include <err.h>
#include <errno.h>
#ifndef DMA_H
#define DMA_H
-#ifdef HAVE_CRYPTO
#include <openssl/ssl.h>
-#endif /* HAVE_CRYPTO */
#include <sys/queue.h>
#include <stdint.h>
char *authpath;
char *certfile;
int features;
-#ifdef HAVE_CRYPTO
SSL *ssl;
-#endif /* HAVE_CRYPTO */
char *mailname;
char *mailnamefile;
};
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 *);
#include <netinet/in.h>
#include <arpa/inet.h>
-#ifdef HAVE_CRYPTO
#include <openssl/ssl.h>
-#endif /* HAVE_CRYPTO */
#include <err.h>
#include <errno.h>
char *temp;
int len, res = 0;
-#ifdef HAVE_CRYPTO
res = smtp_auth_md5(it, fd, login, password);
if (res == 0) {
return (0);
*/
return (-1);
}
-#endif /* HAVE_CRYPTO */
if ((config->features & INSECURE) != 0) {
/* Send AUTH command according to RFC 2554 */
}
config->features &= ~NOSSL;
-#ifdef HAVE_CRYPTO
if ((config->features & SECURETRANS) != 0) {
error = smtp_init_crypto(it, fd, config->features);
if (error >= 0)
else
goto out;
}
-#endif /* HAVE_CRYPTO */
send_remote_command(fd, "EHLO %s", hostname());
if (read_remote(fd, 0, NULL) != 2) {