Branch: Tag:

2015-03-07

2015-03-07 22:36:48 by Martin Nilsson <nilsson@opera.com>

Get rid of the risky DER cache.

137:    return data;    }    -  // Set the encoded data for the node. -  protected void record_der_contents(string(0..255) s) -  { -  der = build_der(s); -  } -  +     //! Get the DER encoded version of this object.    //!    //! @returns    //! DER encoded representation of this object.    string(0..255) get_der() { -  return der || (der = build_der(get_der_content())); +  return build_der(get_der_content());    }       protected void create(mixed ...args) {
180:       void begin_decode_constructed(string(0..255) raw) {    WERROR("asn1_compound[%s]->begin_decode_constructed\n", type_name); -  record_der_contents(raw); +     }       void decode_constructed_element(int i, object e) {
245:    mapping(int:program(Object)):    Object)|void decoder,    mapping(int:program(Object))|void types) { -  record_der_contents(contents); +     value = contents;    return this;    }
296:    mapping(int:program(Object)):    Object)|void decoder,    mapping(int:program(Object))|void types) { -  record_der_contents(contents); +     if( contents=="" ) error("Illegal boolean value.\n");    value = (contents != "\0");    return this;
355:    mapping(int:program(Object)):    Object)|void decoder,    mapping(int:program(Object))|void types) { -  record_der_contents(contents); +     value = Gmp.mpz(contents, 256);    if (contents[0] & 0x80) /* Negative */    value -= pow(256, sizeof(contents));
536:    mapping(int:program(Object)):    Object)|void decoder,    mapping(int:program(Object))|void types) { -  record_der_contents(contents); +     if (!sizeof(contents))    return 0;    unused = contents[0];
613:    mapping(int:program(Object)):    Object)|void decoder,    mapping(int:program(Object))|void types) { -  record_der_contents(contents); +     return !sizeof(contents) && this;    }   
665:    mapping(int:program(Object)):    Object)|void decoder,    mapping(int:program(Object))|void types) { -  record_der_contents(contents); -  +     if (contents[0] < 120)    id = ({ contents[0] / 40, contents[0] % 40 });    else