aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/algapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r--crypto/algapi.c52
1 files changed, 2 insertions, 50 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 9553f93..d44b156 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -61,15 +61,6 @@ static inline int crypto_set_driver_name(struct crypto_alg *alg)
static int crypto_check_alg(struct crypto_alg *alg)
{
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err())) {
- printk(KERN_ERR
- "crypto_check_alg failed due to FIPS error: %s",
- alg->cra_name);
- return -EACCES;
- }
-#endif
-
if (alg->cra_alignmask & (alg->cra_alignmask + 1))
return -EINVAL;
@@ -364,15 +355,6 @@ int crypto_register_alg(struct crypto_alg *alg)
struct crypto_larval *larval;
int err;
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err())) {
- printk(KERN_ERR
- "Unable to registrer alg: %s because of FIPS ERROR\n"
- , alg->cra_name);
- return -EACCES;
- }
-#endif
-
err = crypto_check_alg(alg);
if (err)
return err;
@@ -429,11 +411,6 @@ int crypto_register_template(struct crypto_template *tmpl)
struct crypto_template *q;
int err = -EEXIST;
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err()))
- return -EACCES;
-#endif
-
down_write(&crypto_alg_sem);
list_for_each_entry(q, &crypto_template_list, list) {
@@ -512,11 +489,6 @@ int crypto_register_instance(struct crypto_template *tmpl,
struct crypto_larval *larval;
int err;
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err()))
- return -EACCES;
-#endif
-
err = crypto_check_alg(&inst->alg);
if (err)
goto err;
@@ -552,11 +524,6 @@ int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg,
{
int err = -EAGAIN;
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err()))
- return -EACCES;
-#endif
-
spawn->inst = inst;
spawn->mask = mask;
@@ -772,11 +739,6 @@ void *crypto_alloc_instance2(const char *name, struct crypto_alg *alg,
char *p;
int err;
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err()))
- return ERR_PTR(-EACCES);
-#endif
-
p = kzalloc(head + sizeof(*inst) + sizeof(struct crypto_spawn),
GFP_KERNEL);
if (!p)
@@ -808,11 +770,6 @@ struct crypto_instance *crypto_alloc_instance(const char *name,
struct crypto_spawn *spawn;
int err;
- #ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err()))
- return ERR_PTR(-EACCES);
-#endif
-
inst = crypto_alloc_instance2(name, alg, 0);
if (IS_ERR(inst))
goto out;
@@ -849,11 +806,6 @@ int crypto_enqueue_request(struct crypto_queue *queue,
{
int err = -EINPROGRESS;
-#ifdef CRYPTO_FIPS
- if (unlikely(in_fips_err()))
- return ERR_PTR(-EACCES);
-#endif
-
if (unlikely(queue->qlen >= queue->max_qlen)) {
err = -EBUSY;
if (!(request->flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
@@ -958,13 +910,13 @@ EXPORT_SYMBOL_GPL(crypto_xor);
static int __init crypto_algapi_init(void)
{
- /*crypto_init_proc(); //Moved to testmgr*/
+ crypto_init_proc();
return 0;
}
static void __exit crypto_algapi_exit(void)
{
- /*crypto_exit_proc(); //Moved to testmgr*/
+ crypto_exit_proc();
}
module_init(crypto_algapi_init);