diff options
Diffstat (limited to 'crypto/src/tls/TlsExtensionsUtilities.cs')
-rw-r--r-- | crypto/src/tls/TlsExtensionsUtilities.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/src/tls/TlsExtensionsUtilities.cs b/crypto/src/tls/TlsExtensionsUtilities.cs index bc4ca2714..ffc1c23c1 100644 --- a/crypto/src/tls/TlsExtensionsUtilities.cs +++ b/crypto/src/tls/TlsExtensionsUtilities.cs @@ -308,6 +308,14 @@ namespace Org.BouncyCastle.Tls } /// <exception cref="IOException"/> + public static short GetClientCertificateTypeExtensionServer(IDictionary<int, byte[]> extensions) + { + byte[] extensionData = TlsUtilities.GetExtensionData(extensions, ExtensionType.client_certificate_type); + return extensionData == null ? (short)-1 : ReadCertificateTypeExtensionServer(extensionData); + } + + /// <exception cref="IOException"/> + [Obsolete("Use version without 'defaultValue' instead")] public static short GetClientCertificateTypeExtensionServer(IDictionary<int, byte[]> extensions, short defaultValue) { @@ -429,6 +437,14 @@ namespace Org.BouncyCastle.Tls } /// <exception cref="IOException"/> + public static short GetServerCertificateTypeExtensionServer(IDictionary<int, byte[]> extensions) + { + byte[] extensionData = TlsUtilities.GetExtensionData(extensions, ExtensionType.server_certificate_type); + return extensionData == null ? (short)-1 : ReadCertificateTypeExtensionServer(extensionData); + } + + /// <exception cref="IOException"/> + [Obsolete("Use version without 'defaultValue' instead")] public static short GetServerCertificateTypeExtensionServer(IDictionary<int, byte[]> extensions, short defaultValue) { |