Branch: Tag:

2016-04-11

2016-04-11 20:08:42 by Martin Nilsson <nilsson@fastmail.com>

Fix reversed tests.

409:       c = Standards.X509.make_selfsigned_certificate(cert_rsa, 3600, ([ "commonName":"*" ]));    m = Standards.X509.verify_certificate_chain( ({ c }), auths, 1); -  if(!m->verified || m->error_code!=Standards.X509.CERT_ROOT_UNTRUSTED) +  if(m->verified || m->error_code!=Standards.X509.CERT_ROOT_UNTRUSTED)    return m+(["line":__LINE__]);       c = Standards.X509.make_site_certificate(rtbs, root_rsa, cert_rsa, -3600, ([ "commonName":"*" ]));    m = Standards.X509.verify_certificate_chain( ({ c }), auths, 1); -  if(!m->verified || m->error_code!=Standards.X509.CERT_TOO_OLD) +  if(m->verified || m->error_code!=Standards.X509.CERT_TOO_OLD)    return m+(["line":__LINE__]);       {
431:    c = Standards.X509.sign_tbs(tbs, root_rsa, Crypto.SHA256)->get_der();    }    m = Standards.X509.verify_certificate_chain( ({ c }), auths, 1); -  if(!m->verified || m->error_code!=Standards.X509.CERT_TOO_NEW) +  if(m->verified || m->error_code!=Standards.X509.CERT_TOO_NEW)    return m+(["line":__LINE__]);       return 1;