protected virtual void HandleCertificate(TlsCertificate message) { if (message.Certificates == null || message.Certificates.Count < 1) { throw new TlsException(AlertDescription.CertificateUnknown); } var exchangeAlgorithm = PendingCrypto.Cipher.ExchangeAlgorithmType; if (!CertificateManager.VerifyServerCertificate(Context, message.Certificates [0], exchangeAlgorithm)) { throw new TlsException(AlertDescription.UnsupportedCertificate); } CertificateManager.CheckRemoteCertificate(Config, message.Certificates); PendingCrypto.ServerCertificates = message.Certificates; PendingCrypto.RemoteCertificateVerified = true; }
protected virtual void HandleCertificate(TlsCertificate message) { CertificateManager.CheckRemoteCertificate(Config, message.Certificates); PendingCrypto.ServerCertificates = message.Certificates; PendingCrypto.ServerCertificateVerified = true; }