Branch: Tag:

2014-08-27

2014-08-27 14:53:22 by Martin Nilsson <nilsson@opera.com>

Serialize TBSCertificate by storing the Sequence and regenerate the other fields.

292:   {    inherit Sequence;    +  void _decode(array(int|array(Object)) x) +  { +  ::_decode(x); +  init(this); +  } +     protected string internal_der;       //!
759:    //! Object. Returns the object on success, otherwise @expr{0@}. You    //! probably want to call @[decode_certificate] or even    //! @[verify_certificate]. -  this_program init(array(Object)|Object asn1) +  this_program init(array|Object asn1)    { -  array(Object) a; -  if (objectp(asn1)) { +  if (!objectp(asn1)) +  return 0; +     if (asn1->type_name != "SEQUENCE")    return 0;    -  a = ([object(Sequence)]asn1)->elements; -  } else { -  a = [array(Object)]asn1; -  } +  array(Object) a = ([object(Sequence)]asn1)->elements;    DBG("TBSCertificate: sizeof(a) = %d\n", sizeof(a));       if (sizeof(a) < 6)