diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2019-01-07 20:54:27 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-18 18:40:24 +0800 |
commit | 2927bfa2b531dec77b9dea2e1cc20ac6fed36613 (patch) | |
tree | fed69a343b83d54bc7f02b25b948d903b5f6628d /crypto/twofish_generic.c | |
parent | 120faf3caa61be210fb1ff50ffa7f9e274760188 (diff) | |
download | linux-crypto-2927bfa2b531dec77b9dea2e1cc20ac6fed36613.tar.gz linux-crypto-2927bfa2b531dec77b9dea2e1cc20ac6fed36613.zip |
crypto: testmgr - split akcipher tests by a key type
Before this, if akcipher_testvec have `public_key_vec' set to true
(i.e. having a public key) only sign/encrypt test is performed, but
verify/decrypt test is skipped.
With a public key we could do encrypt and verify, but to sign and decrypt
a private key is required.
This logic is correct for encrypt/decrypt tests (decrypt is skipped if
no private key). But incorrect for sign/verify tests - sign is performed
no matter if there is no private key, but verify is skipped if there is
a public key.
Rework `test_akcipher_one' to arrange tests properly depending on value
of `public_key_vec` and `siggen_sigver_test'.
No tests were missed since there is only one sign/verify test (which
have `siggen_sigver_test' set to true) and it has a private key, but
future tests could benefit from this improvement.
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/twofish_generic.c')
0 files changed, 0 insertions, 0 deletions