• Lei He's avatar
    crypto: testmgr - Fix wrong test case of RSA · a9887010
    Lei He authored
    According to the BER encoding rules, integer value should be encoded
    as two's complement, and if the highest bit of a positive integer
    is 1, should add a leading zero-octet.
    
    The kernel's built-in RSA algorithm cannot recognize negative numbers
    when parsing keys, so it can pass this test case.
    
    Export the key to file and run the following command to verify the
    fix result:
    
      openssl asn1parse -inform DER -in /path/to/key/file
    Signed-off-by: default avatarLei He <helei.sig11@bytedance.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    a9887010
testmgr.h 1.19 MB