Branch: Tag:

2014-01-13

2014-01-13 16:49:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Crypto.ECC.Curve: Fixed pkcs_ec_parameters().

The curve identifier should not be wrapped in a sequence.

Fixes interoperability with OpenSSL and GNUTLS.

303: Inside #if constant(Crypto.ECC.Curve)
  #if constant(Crypto.ECC.Curve)    if(seq[0]->get_der() == Identifiers.ec_id->get_der())    { -  if( sizeof(seq)!=2 || seq[1]->type_name!="SEQUENCE" || -  sizeof(seq[1])!=1 || seq[1][0]->type_name!="OBJECT IDENTIFIER" ) +  if( sizeof(seq)!=2 || seq[1]->type_name!="OBJECT IDENTIFIER" )    return 0;       Sequence params = seq[1]; -  return ECDSAVerifier(str->value, params[0]->get_der()); +  return ECDSAVerifier(str->value, params->get_der());    }   #endif