summaryrefslogtreecommitdiff
path: root/crypto/fips.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-10 11:20:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-10 11:20:42 -0700
commit006ea7fbda4d2f76628ed10954766a016d774ea5 (patch)
tree911a2877484be92358e8547e3ee4582e250866aa /crypto/fips.c
parent6064930f3b4c887fec5f6f0a3c3b188d49b92058 (diff)
parent07ef69bca79a3fb7e203ff5133126e4553ed436e (diff)
downloadlinux-crypto-006ea7fbda4d2f76628ed10954766a016d774ea5.tar.gz
linux-crypto-006ea7fbda4d2f76628ed10954766a016d774ea5.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: skcipher - Use RNG interface instead of get_random_bytes crypto: rng - RNG interface and implementation crypto: api - Add fips_enable flag crypto: skcipher - Move IV generators into their own modules crypto: cryptomgr - Test ciphers using ECB crypto: api - Use test infrastructure crypto: cryptomgr - Add test infrastructure crypto: tcrypt - Add alg_test interface crypto: tcrypt - Abort and only log if there is an error crypto: crc32c - Use Intel CRC32 instruction crypto: tcrypt - Avoid using contiguous pages crypto: api - Display larval objects properly crypto: api - Export crypto_alg_lookup instead of __crypto_alg_lookup crypto: Kconfig - Replace leading spaces with tabs
Diffstat (limited to 'crypto/fips.c')
-rw-r--r--crypto/fips.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/crypto/fips.c b/crypto/fips.c
new file mode 100644
index 00000000..55397008
--- /dev/null
+++ b/crypto/fips.c
@@ -0,0 +1,27 @@
+/*
+ * FIPS 200 support.
+ *
+ * Copyright (c) 2008 Neil Horman <nhorman@tuxdriver.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ */
+
+#include "internal.h"
+
+int fips_enabled;
+EXPORT_SYMBOL_GPL(fips_enabled);
+
+/* Process kernel command-line parameter at boot time. fips=0 or fips=1 */
+static int fips_enable(char *str)
+{
+ fips_enabled = !!simple_strtol(str, NULL, 0);
+ printk(KERN_INFO "fips mode: %s\n",
+ fips_enabled ? "enabled" : "disabled");
+ return 1;
+}
+
+__setup("fips=", fips_enable);