• Tadeusz Struk's avatar
    crypto: fix test vector for rsa · 949d865f
    Tadeusz Struk authored
    After the fix to the asn1_decoder in commit: 0d62e9dd
    "ASN.1: Fix non-match detection failure on data overrun"
    the rsa algorithm is failing to register in 4.3 stable kernels with
    error: "alg: rsa: test failed on vector 4, err=-74"
    
    This happens because the asn1 definition for the rsa key that has been
    added in 4.2 defined all 3 components of the key as non-optional, as
    the asn1_decoder before the fix was working fine for both the private
    and public keys.
    
    This patch adds the missing (fake) component to one key vector to allow
    the algorithm to successfully register and be used with a valid private
    keys later. This is only to make the asn1_decoder successfully parse the
    key and the fake component is never used in the test as the vector is
    marked as public key.
    
    This patch applies only to 4.3 kernels as the 4.2 version of asn1_decoder
    works fine with the asn1 definition.
    4.4 is also ok because the akcipher interface has been changed, and
    the set_key function has been split into set_public_key and set_priv_key
    and there are two separate asn1 definitions for the two key formats
    with all the required components correctly defined (commit 22287b0b).
    Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
    Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    949d865f
testmgr.h 1.17 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.