public override TlsAuthentication GetAuthentication() { return(new TlsAuthenticationImplementor ( getClientCredentials: (certRequest) => { if (clientCredentials == null) { clientCredentials = new DefaultTlsSignerCredentials(mContext, CertificateInfo.certificate, CertificateInfo.keyPair.Private, new SignatureAndHashAlgorithm(HashAlgorithm.sha256, SignatureAlgorithm.ecdsa)); } return clientCredentials; }, notifyServerCertificate: (cert) => { ServerCertificateInfoAvailable?.Invoke(this, cert); } )); }
private void TlsClient_ServerCertificateInfoAvailable(object sender, Certificate e) { ServerCertificateInfoAvailable?.Invoke(this, e); }