Use libmd if and only if OpenSSL is not available.
PR: bin/171402 MFC after: 3 days
This commit is contained in:
parent
42415fcb52
commit
0e50a83330
@ -16,8 +16,8 @@ CFLAGS+= -DINET6
|
||||
|
||||
.if ${MK_OPENSSL} != "no"
|
||||
CFLAGS+= -DWITH_SSL
|
||||
DPADD= ${LIBSSL} ${LIBCRYPTO} ${LIBMD}
|
||||
LDADD= -lssl -lcrypto -lmd
|
||||
DPADD= ${LIBSSL} ${LIBCRYPTO}
|
||||
LDADD= -lssl -lcrypto
|
||||
.else
|
||||
DPADD= ${LIBMD}
|
||||
LDADD= -lmd
|
||||
|
@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef WITH_SSL
|
||||
#include <openssl/md5.h>
|
||||
#define MD5Init(c) MD5_Init(c)
|
||||
#define MD5Update(c, data, len) MD5_Update(c, data, len)
|
||||
#define MD5Final(md, c) MD5_Final(md, c)
|
||||
#else
|
||||
#include <md5.h>
|
||||
#endif
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
@ -4,11 +4,12 @@
|
||||
|
||||
PROG= fetch
|
||||
CSTD?= c99
|
||||
.if ${MK_OPENSSL} != "no"
|
||||
DPADD= ${LIBFETCH} ${LIBSSL} ${LIBCRYPTO}
|
||||
LDADD= -lfetch -lssl -lcrypto
|
||||
.else
|
||||
DPADD= ${LIBFETCH} ${LIBMD}
|
||||
LDADD= -lfetch -lmd
|
||||
.if ${MK_OPENSSL} != "no"
|
||||
DPADD+= ${LIBSSL} ${LIBCRYPTO}
|
||||
LDADD+= -lssl -lcrypto
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user