• Eric Biggers's avatar
    crypto: testmgr - expand ability to test for errors · 5283a8ee
    Eric Biggers authored
    Update testmgr to support testing for specific errors from setkey() and
    digest() for hashes; setkey() and encrypt()/decrypt() for skciphers and
    ciphers; and setkey(), setauthsize(), and encrypt()/decrypt() for AEADs.
    This is useful because algorithms usually restrict the lengths or format
    of the message, key, and/or authentication tag in some way.  And bad
    inputs should be tested too, not just good inputs.
    
    As part of this change, remove the ambiguously-named 'fail' flag and
    replace it with 'setkey_error = -EINVAL' for the only test vector that
    used it -- the DES weak key test vector.  Note that this tightens the
    test to require -EINVAL rather than any error code, but AFAICS this
    won't cause any test failure.
    
    Other than that, these new fields aren't set on any test vectors yet.
    Later patches will do so.
    Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    5283a8ee
testmgr.h 1.2 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.