diff --git a/crypto/src/crypto/tls/AbstractTlsClient.cs b/crypto/src/crypto/tls/AbstractTlsClient.cs
index 3398d94df..9484afa7d 100644
--- a/crypto/src/crypto/tls/AbstractTlsClient.cs
+++ b/crypto/src/crypto/tls/AbstractTlsClient.cs
@@ -148,7 +148,7 @@ namespace Org.BouncyCastle.Crypto.Tls
public virtual byte[] GetCompressionMethods()
{
- return new byte[]{ CompressionMethod.NULL };
+ return new byte[]{ CompressionMethod.cls_null };
}
public virtual void NotifySessionID(byte[] sessionID)
@@ -209,7 +209,7 @@ namespace Org.BouncyCastle.Crypto.Tls
{
switch (mSelectedCompressionMethod)
{
- case CompressionMethod.NULL:
+ case CompressionMethod.cls_null:
return new TlsNullCompression();
case CompressionMethod.DEFLATE:
diff --git a/crypto/src/crypto/tls/AbstractTlsServer.cs b/crypto/src/crypto/tls/AbstractTlsServer.cs
index 036187c02..47542c796 100644
--- a/crypto/src/crypto/tls/AbstractTlsServer.cs
+++ b/crypto/src/crypto/tls/AbstractTlsServer.cs
@@ -60,7 +60,7 @@ namespace Org.BouncyCastle.Crypto.Tls
protected byte[] GetCompressionMethods()
{
- return new byte[]{ CompressionMethod.NULL };
+ return new byte[] { CompressionMethod.cls_null };
}
protected virtual ProtocolVersion MaximumVersion
@@ -293,7 +293,7 @@ namespace Org.BouncyCastle.Crypto.Tls
{
switch (mSelectedCompressionMethod)
{
- case CompressionMethod.NULL:
+ case CompressionMethod.cls_null:
return new TlsNullCompression();
default:
diff --git a/crypto/src/crypto/tls/AlwaysValidVerifyer.cs b/crypto/src/crypto/tls/AlwaysValidVerifyer.cs
deleted file mode 100644
index e26c6fc3f..000000000
--- a/crypto/src/crypto/tls/AlwaysValidVerifyer.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-using Org.BouncyCastle.Asn1.X509;
-
-namespace Org.BouncyCastle.Crypto.Tls
-{
- /// <remarks>
- /// A certificate verifyer, that will always return true.
- /// <pre>
- /// DO NOT USE THIS FILE UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING.
- /// </pre>
- /// </remarks>
- [Obsolete("Perform certificate verification in TlsAuthentication implementation")]
- public class AlwaysValidVerifyer
- : ICertificateVerifyer
- {
- /// <summary>Return true.</summary>
- public bool IsValid(
- X509CertificateStructure[] certs)
- {
- return true;
- }
- }
-}
diff --git a/crypto/src/crypto/tls/Certificate.cs b/crypto/src/crypto/tls/Certificate.cs
index 12bfa9214..c59616c95 100644
--- a/crypto/src/crypto/tls/Certificate.cs
+++ b/crypto/src/crypto/tls/Certificate.cs
@@ -38,13 +38,6 @@ namespace Org.BouncyCastle.Crypto.Tls
this.mCertificateList = certificateList;
}
- /// <returns>An array which contains the certs, this chain contains.</returns>
- [Obsolete("Use 'GetCertificateList' instead")]
- public virtual X509CertificateStructure[] GetCerts()
- {
- return GetCertificateList();
- }
-
/**
* @return an array of {@link org.bouncycastle.asn1.x509.Certificate} representing a certificate
* chain.
diff --git a/crypto/src/crypto/tls/CompressionMethod.cs b/crypto/src/crypto/tls/CompressionMethod.cs
index e4ee9666f..89c1f5ff4 100644
--- a/crypto/src/crypto/tls/CompressionMethod.cs
+++ b/crypto/src/crypto/tls/CompressionMethod.cs
@@ -7,7 +7,7 @@ namespace Org.BouncyCastle.Crypto.Tls
/// </summary>
public abstract class CompressionMethod
{
- public const byte NULL = 0;
+ public const byte cls_null = 0;
/*
* RFC 3749 2
diff --git a/crypto/src/crypto/tls/DigestAlgorithm.cs b/crypto/src/crypto/tls/DigestAlgorithm.cs
deleted file mode 100644
index 745bea448..000000000
--- a/crypto/src/crypto/tls/DigestAlgorithm.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace Org.BouncyCastle.Crypto.Tls
-{
- /// <summary>RFC 2246</summary>
- /// <remarks>
- /// Note that the values here are implementation-specific and arbitrary. It is recommended not to
- /// depend on the particular values (e.g. serialization).
- /// </remarks>
- [Obsolete("Use MacAlgorithm constants instead")]
- public enum DigestAlgorithm
- {
- NULL,
- MD5,
- SHA,
-
- /*
- * RFC 5246
- */
- SHA256,
- SHA384,
- SHA512,
- }
-}
diff --git a/crypto/src/crypto/tls/ICertificateVerifyer.cs b/crypto/src/crypto/tls/ICertificateVerifyer.cs
deleted file mode 100644
index df5ea51d7..000000000
--- a/crypto/src/crypto/tls/ICertificateVerifyer.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-
-using Org.BouncyCastle.Asn1.X509;
-
-namespace Org.BouncyCastle.Crypto.Tls
-{
- /// <remarks>
- /// This should be implemented by any class which can find out, if a given
- /// certificate chain is being accepted by an client.
- /// </remarks>
- [Obsolete("Perform certificate verification in TlsAuthentication implementation")]
- public interface ICertificateVerifyer
- {
- /// <param name="certs">The certs, which are part of the chain.</param>
- /// <returns>True, if the chain is accepted, false otherwise</returns>
- bool IsValid(X509CertificateStructure[] certs);
- }
-}
diff --git a/crypto/src/crypto/tls/LegacyTlsAuthentication.cs b/crypto/src/crypto/tls/LegacyTlsAuthentication.cs
deleted file mode 100644
index 0c0362c4b..000000000
--- a/crypto/src/crypto/tls/LegacyTlsAuthentication.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-
-namespace Org.BouncyCastle.Crypto.Tls
-{
- /// <summary>
- /// A temporary class to wrap old CertificateVerifyer stuff for new TlsAuthentication.
- /// </summary>
- [Obsolete]
- public class LegacyTlsAuthentication
- : ServerOnlyTlsAuthentication
- {
- protected ICertificateVerifyer verifyer;
-
- public LegacyTlsAuthentication(ICertificateVerifyer verifyer)
- {
- this.verifyer = verifyer;
- }
-
- public override void NotifyServerCertificate(Certificate serverCertificate)
- {
- if (!this.verifyer.IsValid(serverCertificate.GetCertificateList()))
- throw new TlsFatalAlert(AlertDescription.user_canceled);
- }
- }
-}
diff --git a/crypto/src/crypto/tls/LegacyTlsClient.cs b/crypto/src/crypto/tls/LegacyTlsClient.cs
deleted file mode 100644
index fbb9a732e..000000000
--- a/crypto/src/crypto/tls/LegacyTlsClient.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-
-namespace Org.BouncyCastle.Crypto.Tls
-{
- /// <summary>
- /// A temporary class to use LegacyTlsAuthentication
- /// </summary>
- [Obsolete]
- public class LegacyTlsClient
- : DefaultTlsClient
- {
- [Obsolete]
- protected ICertificateVerifyer verifyer;
-
- [Obsolete]
- public LegacyTlsClient(ICertificateVerifyer verifyer)
- {
- this.verifyer = verifyer;
- }
-
- public override TlsAuthentication GetAuthentication()
- {
- return new LegacyTlsAuthentication(verifyer);
- }
- }
-}
\ No newline at end of file
diff --git a/crypto/src/crypto/tls/RecordStream.cs b/crypto/src/crypto/tls/RecordStream.cs
index d05c6c1c2..b71416c10 100644
--- a/crypto/src/crypto/tls/RecordStream.cs
+++ b/crypto/src/crypto/tls/RecordStream.cs
@@ -3,7 +3,7 @@ using System.IO;
namespace Org.BouncyCastle.Crypto.Tls
{
- /// <remarks>An implementation of the TLS 1.0 record layer.</remarks>
+ /// <summary>An implementation of the TLS 1.0 record layer.</summary>
internal class RecordStream
{
private TlsProtocolHandler handler;
@@ -17,8 +17,6 @@ namespace Org.BouncyCastle.Crypto.Tls
private long readSeqNo = 0, writeSeqNo = 0;
private MemoryStream buffer = new MemoryStream();
- private TlsContext context = null;
-
internal RecordStream(
TlsProtocolHandler handler,
Stream inStr,
@@ -33,7 +31,6 @@ namespace Org.BouncyCastle.Crypto.Tls
internal void Init(TlsContext context)
{
- this.context = context;
this.readCipher = new TlsNullCipher(context);
this.writeCipher = this.readCipher;
this.hash = new CombinedHash();
diff --git a/crypto/src/crypto/tls/SecurityParameters.cs b/crypto/src/crypto/tls/SecurityParameters.cs
index de8c6f13a..6a115a911 100644
--- a/crypto/src/crypto/tls/SecurityParameters.cs
+++ b/crypto/src/crypto/tls/SecurityParameters.cs
@@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Crypto.Tls
{
internal int entity = -1;
internal int cipherSuite = -1;
- internal byte compressionAlgorithm = CompressionMethod.NULL;
+ internal byte compressionAlgorithm = CompressionMethod.cls_null;
internal int prfAlgorithm = -1;
internal int verifyDataLength = -1;
internal byte[] masterSecret = null;
diff --git a/crypto/src/crypto/tls/TlsProtocolHandler.cs b/crypto/src/crypto/tls/TlsProtocolHandler.cs
index 21b3c8d47..620c73587 100644
--- a/crypto/src/crypto/tls/TlsProtocolHandler.cs
+++ b/crypto/src/crypto/tls/TlsProtocolHandler.cs
@@ -812,17 +812,6 @@ namespace Org.BouncyCastle.Crypto.Tls
recordStream.WriteMessage(ContentType.handshake, message, 0, message.Length);
}
- /// <summary>Connects to the remote system.</summary>
- /// <param name="verifyer">Will be used when a certificate is received to verify
- /// that this certificate is accepted by the client.</param>
- /// <exception cref="IOException">If handshake was not successful</exception>
- [Obsolete("Use version taking TlsClient")]
- public virtual void Connect(
- ICertificateVerifyer verifyer)
- {
- this.Connect(new LegacyTlsClient(verifyer));
- }
-
public virtual void Connect(TlsClient tlsClient)
{
if (tlsClient == null)
@@ -1090,20 +1079,6 @@ namespace Org.BouncyCastle.Crypto.Tls
}
}
- /// <summary>A Stream which can be used to send data.</summary>
- [Obsolete("Use 'Stream' property instead")]
- public virtual Stream OutputStream
- {
- get { return this.tlsStream; }
- }
-
- /// <summary>A Stream which can be used to read data.</summary>
- [Obsolete("Use 'Stream' property instead")]
- public virtual Stream InputStream
- {
- get { return this.tlsStream; }
- }
-
/// <summary>The secure bidirectional stream for this connection</summary>
public virtual Stream Stream
{
diff --git a/crypto/src/crypto/tls/TlsStreamCipher.cs b/crypto/src/crypto/tls/TlsStreamCipher.cs
index d664b09dd..45f2a9a70 100644
--- a/crypto/src/crypto/tls/TlsStreamCipher.cs
+++ b/crypto/src/crypto/tls/TlsStreamCipher.cs
@@ -21,15 +21,6 @@ namespace Org.BouncyCastle.Crypto.Tls
protected readonly bool usesNonce;
/// <exception cref="IOException"></exception>
- [Obsolete("Use version with additional 'usesNonce' argument")]
- public TlsStreamCipher(TlsContext context, IStreamCipher clientWriteCipher,
- IStreamCipher serverWriteCipher, IDigest clientWriteDigest, IDigest serverWriteDigest,
- int cipherKeySize)
- : this(context, clientWriteCipher, serverWriteCipher, clientWriteDigest, serverWriteDigest, cipherKeySize, false)
- {
- }
-
- /// <exception cref="IOException"></exception>
public TlsStreamCipher(TlsContext context, IStreamCipher clientWriteCipher,
IStreamCipher serverWriteCipher, IDigest clientWriteDigest, IDigest serverWriteDigest,
int cipherKeySize, bool usesNonce)
|