From 94c3e91fc52e4c70098c8eb51f2d97109d65a560 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 20 Dec 2009 18:14:20 +0200 Subject: [PATCH] Add empty FIPS PRF wrapper for CryptoAPI --- src/crypto/fips_prf_cryptoapi.c | 25 +++++++++++++++++++++++++ wpa_supplicant/Makefile | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 src/crypto/fips_prf_cryptoapi.c diff --git a/src/crypto/fips_prf_cryptoapi.c b/src/crypto/fips_prf_cryptoapi.c new file mode 100644 index 000000000..17d3116e8 --- /dev/null +++ b/src/crypto/fips_prf_cryptoapi.c @@ -0,0 +1,25 @@ +/* + * FIPS 186-2 PRF for Microsoft CryptoAPI + * Copyright (c) 2009, Jouni Malinen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Alternatively, this software may be distributed under the terms of BSD + * license. + * + * See README and COPYING for more details. + */ + +#include "includes.h" + +#include "common.h" +#include "crypto.h" + + +int fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, size_t xlen) +{ + /* FIX: how to do this with CryptoAPI? */ + return -1; +} diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 9980ac777..8a9c70cf9 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -764,6 +764,9 @@ OBJS += ../src/crypto/tls_schannel.o endif OBJS += ../src/crypto/crypto_cryptoapi.o OBJS_p += ../src/crypto/crypto_cryptoapi.o +ifdef NEED_FIPS186_2_PRF +OBJS += ../src/crypto/fips_prf_cryptoapi.o +endif CONFIG_INTERNAL_SHA256=y CONFIG_INTERNAL_RC4=y CONFIG_INTERNAL_DH_GROUP5=y