crypto: ecdh - fix ecdh-nist-p192's entry in testmgr
Add a comment that p192 will fail to register in FIPS mode. Fix ecdh-nist-p192's entry in testmgr by removing the ifdefs and not setting fips_allowed. Signed-off-by: Hui Tang <tanghui20@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
0dbcf1a24e
commit
6889fc2104
@ -179,6 +179,7 @@ static int ecdh_init(void)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* NIST p192 will fail to register in FIPS mode */
|
||||||
ret = crypto_register_kpp(&ecdh_nist_p192);
|
ret = crypto_register_kpp(&ecdh_nist_p192);
|
||||||
ecdh_nist_p192_registered = ret == 0;
|
ecdh_nist_p192_registered = ret == 0;
|
||||||
|
|
||||||
|
@ -4899,15 +4899,12 @@ static const struct alg_test_desc alg_test_descs[] = {
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_CRYPTO_FIPS
|
|
||||||
.alg = "ecdh-nist-p192",
|
.alg = "ecdh-nist-p192",
|
||||||
.test = alg_test_kpp,
|
.test = alg_test_kpp,
|
||||||
.fips_allowed = 1,
|
|
||||||
.suite = {
|
.suite = {
|
||||||
.kpp = __VECS(ecdh_p192_tv_template)
|
.kpp = __VECS(ecdh_p192_tv_template)
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
#endif
|
|
||||||
.alg = "ecdh-nist-p256",
|
.alg = "ecdh-nist-p256",
|
||||||
.test = alg_test_kpp,
|
.test = alg_test_kpp,
|
||||||
.fips_allowed = 1,
|
.fips_allowed = 1,
|
||||||
|
@ -2685,7 +2685,6 @@ static const struct kpp_testvec curve25519_tv_template[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef CONFIG_CRYPTO_FIPS
|
|
||||||
static const struct kpp_testvec ecdh_p192_tv_template[] = {
|
static const struct kpp_testvec ecdh_p192_tv_template[] = {
|
||||||
{
|
{
|
||||||
.secret =
|
.secret =
|
||||||
@ -2725,7 +2724,6 @@ static const struct kpp_testvec ecdh_p192_tv_template[] = {
|
|||||||
.expected_ss_size = 24
|
.expected_ss_size = 24
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
static const struct kpp_testvec ecdh_p256_tv_template[] = {
|
static const struct kpp_testvec ecdh_p256_tv_template[] = {
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user