Branch: Tag:

2014-11-03

2014-11-03 15:07:18 by Martin Nilsson <nilsson@opera.com>

Use the new PEM methods.

1599:    string pem = Stdio.read_bytes(combine_path(dir, "ca-certificates.crt"));    if (pem) {    Standards.PEM.Messages messages = Standards.PEM.Messages(pem); -  foreach(messages->fragments, string|Standards.PEM.Message m) { -  if (!objectp(m) || m->pre!="CERTIFICATE" || !m->body) continue; -  TBSCertificate tbs = verify_ca_certificate(m->body); +  foreach(messages->get_certificates(), string m) { +  TBSCertificate tbs = verify_ca_certificate(m);    if (!tbs) continue;    string subj = tbs->subject->get_der();    if( !res[subj] || !has_value(res[subj], tbs->public_key ) )