Add more OIDs which may designate the public key: sha256WithRSAEncryption shaWithRSASignatureOiw Notes: Fri Mar 8 12:06:44 CST 2013 jas The x509-ape.c file will be removed in a future patch. Reference: /n/sources/patch/maybe/x509-oids Date: Fri Feb 8 16:27:45 CET 2013 Signed-off-by: yarikos@gmail.com Reviewed-by: geoff --- /sys/src/libsec/port/x509.c Fri Feb 8 16:27:05 2013 +++ /sys/src/libsec/port/x509.c Fri Feb 8 16:26:53 2013 @@ -1581,6 +1581,8 @@ ALG_md4WithRSAEncryption, ALG_md5WithRSAEncryption, ALG_sha1WithRSAEncryption, + ALG_sha256WithRSAEncryption, + ALG_shaWithRSASignatureOiw, ALG_sha1WithRSAEncryptionOiw, ALG_md5, NUMALGS @@ -1594,6 +1596,8 @@ static Ints7 oid_md4WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 3 }; static Ints7 oid_md5WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 4 }; static Ints7 oid_sha1WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 5 }; +static Ints7 oid_sha256WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 11 }; +static Ints7 oid_shaWithRSASignatureOiw ={6, 1, 3, 14, 3, 2, 15 }; static Ints7 oid_sha1WithRSAEncryptionOiw ={6, 1, 3, 14, 3, 2, 29 }; static Ints7 oid_md5 ={6, 1, 2, 840, 113549, 2, 5, 0 }; static Ints *alg_oid_tab[NUMALGS+1] = { @@ -1602,11 +1606,13 @@ (Ints*)&oid_md4WithRSAEncryption, (Ints*)&oid_md5WithRSAEncryption, (Ints*)&oid_sha1WithRSAEncryption, + (Ints*)&oid_sha256WithRSAEncryption, + (Ints*)&oid_shaWithRSASignatureOiw, (Ints*)&oid_sha1WithRSAEncryptionOiw, (Ints*)&oid_md5, nil }; -static DigestFun digestalg[NUMALGS+1] = { md5, md5, md5, md5, sha1, sha1, md5, nil }; +static DigestFun digestalg[NUMALGS+1] = { md5, md5, md5, md5, sha1, sha2_256, sha1, sha1, md5, nil }; static void freecert(CertX509* c) --- /sys/src/ape/lib/sec/port/x509-ape.c Fri Feb 8 16:27:21 2013 +++ /sys/src/ape/lib/sec/port/x509-ape.c Fri Feb 8 16:27:11 2013 @@ -1581,6 +1581,8 @@ ALG_md4WithRSAEncryption, ALG_md5WithRSAEncryption, ALG_sha1WithRSAEncryption, + ALG_sha256WithRSAEncryption, + ALG_shaWithRSASignatureOiw, ALG_sha1WithRSAEncryptionOiw, ALG_md5, NUMALGS @@ -1594,6 +1596,8 @@ static Ints7 oid_md4WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 3 }; static Ints7 oid_md5WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 4 }; static Ints7 oid_sha1WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 5 }; +static Ints7 oid_sha256WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 11 }; +static Ints7 oid_shaWithRSASignatureOiw ={6, 1, 3, 14, 3, 2, 15 }; static Ints7 oid_sha1WithRSAEncryptionOiw ={6, 1, 3, 14, 3, 2, 29 }; static Ints7 oid_md5 ={6, 1, 2, 840, 113549, 2, 5, 0 }; static Ints *alg_oid_tab[NUMALGS+1] = { @@ -1602,11 +1606,13 @@ (Ints*)&oid_md4WithRSAEncryption, (Ints*)&oid_md5WithRSAEncryption, (Ints*)&oid_sha1WithRSAEncryption, + (Ints*)&oid_sha256WithRSAEncryption, + (Ints*)&oid_shaWithRSASignatureOiw, (Ints*)&oid_sha1WithRSAEncryptionOiw, (Ints*)&oid_md5, nil }; -static DigestFun digestalg[NUMALGS+1] = { md5, md5, md5, md5, sha1, sha1, md5, nil }; +static DigestFun digestalg[NUMALGS+1] = { md5, md5, md5, md5, sha1, sha2_256, sha1, sha1, md5, nil }; static void freecert(CertX509* c)