diff options
Diffstat (limited to 'crypto/src/tls/crypto/impl/bc/BcTlsCertificate.cs')
-rw-r--r-- | crypto/src/tls/crypto/impl/bc/BcTlsCertificate.cs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsCertificate.cs b/crypto/src/tls/crypto/impl/bc/BcTlsCertificate.cs index 2f331a166..9d4157050 100644 --- a/crypto/src/tls/crypto/impl/bc/BcTlsCertificate.cs +++ b/crypto/src/tls/crypto/impl/bc/BcTlsCertificate.cs @@ -342,7 +342,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC } /// <exception cref="IOException"/> - public virtual TlsCertificate CheckUsageInRole(int connectionEnd, int tlsCertificateRole) + public virtual TlsCertificate CheckUsageInRole(int tlsCertificateRole) { switch (tlsCertificateRole) { @@ -360,25 +360,6 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC } } - if (connectionEnd == ConnectionEnd.server) - { - switch (tlsCertificateRole) - { - case TlsCertificateRole.RsaEncryption: - { - ValidateKeyUsage(KeyUsage.KeyEncipherment); - this.m_pubKeyRsa = GetPubKeyRsa(); - return this; - } - case TlsCertificateRole.Sm2Encryption: - { - ValidateKeyUsage(KeyUsage.KeyEncipherment); - this.m_pubKeyEC = GetPubKeyEC(); - return this; - } - } - } - throw new TlsFatalAlert(AlertDescription.certificate_unknown); } |