diff options
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r-- | usr/src/uts/common/Makefile.files | 3 | ||||
-rw-r--r-- | usr/src/uts/common/bignum/bignum_mod.c | 18 |
2 files changed, 15 insertions, 6 deletions
diff --git a/usr/src/uts/common/Makefile.files b/usr/src/uts/common/Makefile.files index 0cf13ebeee..7a4e3ab1d8 100644 --- a/usr/src/uts/common/Makefile.files +++ b/usr/src/uts/common/Makefile.files @@ -1517,7 +1517,8 @@ KCF_OBJS += kcf.o kcf_callprov.o kcf_cbufcall.o kcf_cipher.o kcf_crypto.o \ kcf_keys.o kcf_mac.o kcf_mech_tabs.o kcf_miscapi.o \ kcf_object.o kcf_policy.o kcf_prov_lib.o kcf_prov_tabs.o \ kcf_sched.o kcf_session.o kcf_sign.o kcf_spi.o kcf_verify.o \ - kcf_random.o modes.o ecb.o cbc.o ctr.o ccm.o gcm.o fips_random.o + kcf_random.o modes.o ecb.o cbc.o ctr.o ccm.o gcm.o \ + fips_random.o fips_checksum.o fips_test_vectors.o CRYPTOADM_OBJS += cryptoadm.o diff --git a/usr/src/uts/common/bignum/bignum_mod.c b/usr/src/uts/common/bignum/bignum_mod.c index 7ef8113537..938eb50d48 100644 --- a/usr/src/uts/common/bignum/bignum_mod.c +++ b/usr/src/uts/common/bignum/bignum_mod.c @@ -19,19 +19,16 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/systm.h> #include <sys/modctl.h> #include <sys/cmn_err.h> #include <sys/ddi.h> - +#include <fips/fips_checksum.h> extern struct mod_ops mod_cryptoops; @@ -64,3 +61,14 @@ _info(struct modinfo *modinfop) { return (mod_info(&modlinkage, modinfop)); } + +int +bignum_fips_check() +{ + if (fips_check_module("misc/bignum", (void *)_init) != 0) { + cmn_err(CE_WARN, "bignum: FIPS-140 Software Integrity Test " + "failed"); + return (EINVAL); + } + return (0); +} |