Branch: Tag:

2015-09-23

2015-09-23 15:42:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Standards.X509: parse_private_key() now knows about PKCS#8.

1818:    return Standards.PKCS.DSA.parse_private_key(seq);    case 9:    return Standards.PKCS.RSA.parse_private_key(seq); - #if constant(Nettle.ECC_Curve) +     case 2:    // ECDSA, implicit curve. Not supported yet.    return UNDEFINED;    case 3:    case 4: -  +  // Either PKCS#8 or ECDSA. +  Crypto.Sign res = Standards.PKCS.parse_private_key(seq); +  if (res) return res; + #if constant(Nettle.ECC_Curve) +  // EDCSA    return Standards.PKCS.ECDSA.parse_private_key(seq);   #endif    }