// We managed to connect and get a certificate. For some (possibly local) reason it didn't
// pass validation but that is not important for this test.
cert=(X509Certificate2)ex.Data["Certificate"];
}
// NOTE: These asserts correspond to certificate "SERIALNUMBER=CVR:30808460-FID:94731315 + CN=TU GENEREL FOCES gyldig (funktionscertifikat), O=NETS DANID A/S // CVR:30808460, C=DK"
// The lookup will still resolve this even though we used a modified certSubject above, since the actual lookup uses the SERIALNUMBER, not the other parts