Skip to content

Commit 97b74e8

Browse files
author
ladeak
committed
Adding Obsolete attribute on the properties of ITlsHandshakeFeature.
1 parent 5d2f669 commit 97b74e8

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/CHttpServer/CHttpServer/HttpsConnectionMiddleware.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,17 +252,23 @@ public X509Certificate2? ClientCertificate
252252
// Required for TLS Handshake feature
253253

254254
public TlsCipherSuite? NegotiatedCipherSuite => _sslStream.NegotiatedCipherSuite;
255-
255+
256+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
256257
public CipherAlgorithmType CipherAlgorithm => _sslStream.CipherAlgorithm;
257258

259+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
258260
public int CipherStrength => _sslStream.CipherStrength;
259261

262+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
260263
public HashAlgorithmType HashAlgorithm => _sslStream.HashAlgorithm;
261264

265+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
262266
public int HashStrength => _sslStream.HashStrength;
263267

268+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
264269
public ExchangeAlgorithmType KeyExchangeAlgorithm => _sslStream.KeyExchangeAlgorithm;
265270

271+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
266272
public int KeyExchangeStrength => _sslStream.KeyExchangeStrength;
267273

268274
public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)

tests/CHttpServer.Tests/TestBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,17 @@ internal class TestTls : ITlsHandshakeFeature
116116
{
117117
public SslProtocols Protocol => SslProtocols.Tls12;
118118

119+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
119120
public CipherAlgorithmType CipherAlgorithm => throw new NotImplementedException();
120121

121122
public int CipherStrength => throw new NotImplementedException();
122123

124+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
123125
public HashAlgorithmType HashAlgorithm => throw new NotImplementedException();
124126

125127
public int HashStrength => throw new NotImplementedException();
126128

129+
[Obsolete("Obsolete by BCL, use NegotiatedCipherSuite instead.")]
127130
public ExchangeAlgorithmType KeyExchangeAlgorithm => throw new NotImplementedException();
128131

129132
public int KeyExchangeStrength => throw new NotImplementedException();

0 commit comments

Comments
 (0)