Branch: Tag:

2016-10-24

2016-10-24 17:10:45 by Martin Nilsson <nilsson@fastmail.com>

Crash with more grace when ECDSA uses unsupported curve.

215: Inside #if constant(Crypto.ECC.Curve)
   break;    }    } +  if(!curve) return;    DBG("ECC Curve: %O (%O)\n", curve, curve_id);    pkc = curve->ECDSA()->set_public_key(key);    }
271: Inside #if constant(Crypto.ECC.Curve)
   return NULL("Illegal ECDSA ASN.1\n");       Identifier params = seq[1]; -  return ECDSAVerifier(str->value, params); +  Verifier ver = ECDSAVerifier(str->value, params); +  if(ver->pkc) return ver; +  return NULL("make_verifier: Unsupported ECDSA curve.\n");    }   #endif