Branch: Tag:

2014-09-30

2014-09-30 16:57:14 by Martin Nilsson <nilsson@opera.com>

Somewhat more unwieldy parts interface for single messages, but easier for e.g. certificate chains.

436:   test_true(mappingp(Standards.X509.load_authorities()))      define(test_cert, ([[ -  test_true(Standards.X509.verify_certificate(Standards.PEM.Messages(#"$1")->parts->CERTIFICATE->body, ([]))) +  test_true(Standards.X509.verify_certificate(Standards.PEM.Messages(#"$1")->parts->CERTIFICATE[0]->body, ([])))    test_any([[ -  string der = Standards.PEM.Messages(#"$1")->parts->CERTIFICATE->body; +  string der = Standards.PEM.Messages(#"$1")->parts->CERTIFICATE[0]->body;    object o = decode_value(encode_value(Standards.X509.decode_certificate(der)));    /* TBS does not contain the full certificate... */    /* if( o->get_der() != der ) return -1; */