Fix MKCRYPTO=no build.

This commit is contained in:
christos 2016-06-29 19:16:23 +00:00
parent bbb4899a3e
commit f56ebce961
5 changed files with 14 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2015/04/01 19:45:14 christos Exp $
# $NetBSD: Makefile,v 1.9 2016/06/29 19:16:23 christos Exp $
.include "${.CURDIR}/../Makefile.inc"
@ -86,7 +86,6 @@ eap_server_methods.c
# crypto
SRCS+= \
crypto_openssl.c \
random.c \
sha1-prf.c
@ -150,6 +149,7 @@ aes-ctr.c \
aes-eax.c \
aes-encblock.c \
aes-omac1.c \
crypto_openssl.c \
dh_groups.c \
fips_prf_openssl.c \
ms_funcs.c \
@ -196,7 +196,9 @@ DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBDES}
LDADD+= -lssl -lcrypto -ldes
.else
CPPFLAGS+= -DINTERNAL_AES -DINTERNAL_MD5 -DINTERNAL_SHA1 -DCONFIG_NO_PBKDF2
CPPFLAGS+= -DCONFIG_CRYPTO_INTERNAL
SRCS+= tls_none.c sha1-internal.c md5-internal.c aes-xinternal.c rc4.c
SRCS+= sha1-pbkdf2.c sha1.c md5.c
.endif
.include <bsd.prog.mk>

View File

@ -4,7 +4,7 @@
#include "aes.h"
#include "aes_wrap.h"
int aes_wrap(const u8 *kek, int n, const u8 *cipher, u8 *plain)
int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain)
{
return -1;
}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2015/04/01 19:45:14 christos Exp $
# $NetBSD: Makefile,v 1.4 2016/06/29 19:16:23 christos Exp $
.include "${.CURDIR}/../Makefile.inc"
@ -18,7 +18,9 @@ DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBDES}
LDADD+= -lssl -lcrypto -ldes
.else
CPPFLAGS+= -DINTERNAL_AES -DINTERNAL_MD5 -DINTERNAL_SHA1
CPPFLAGS+= -DCONFIG_CRYPTO_INTERNAL
SRCS+= tls_none.c md5-internal.c sha1-internal.c
SRCS+= sha1-pbkdf2.c sha1.c md5.c
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.7 2016/03/23 09:35:25 roy Exp $
# $NetBSD: Makefile,v 1.8 2016/06/29 19:16:23 christos Exp $
.include "${.CURDIR}/../Makefile.inc"
@ -33,6 +33,7 @@ pmksa_cache.c \
preauth.c \
random.c \
scan.c \
sha1-prf.c \
wmm_ac.c \
wpa.c \
wpa_common.c \
@ -102,7 +103,6 @@ eap_ttls.c \
ms_funcs.c \
mschapv2.c \
sha1-tlsprf.c \
sha1-prf.c \
tls_openssl.c
SRCS+=aes-ctr.c \
@ -119,7 +119,9 @@ LDADD+= -lssl -lcrypto -ldes
.else
CPPFLAGS+= -DINTERNAL_AES -DINTERNAL_MD5 -DINTERNAL_SHA1 -DCONFIG_NO_PBKDF2
SRCS+= tls_none.c sha1-internal.c md5-internal.c aes-xinternal.c rc4.c
SRCS+= aes-unwrap.c md5.c
CPPFLAGS+= -DCONFIG_CRYPTO_INTERNAL
#SRCS+= aes-unwrap.c md5.c
SRCS+= sha1-pbkdf2.c sha1.c md5.c
.endif
.endif

View File

@ -4,7 +4,7 @@
#include "aes.h"
#include "aes_wrap.h"
int aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain)
int aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain)
{
return -1;
}