Skip to content

Commit

Permalink
Remvoe obsoleted code
Browse files Browse the repository at this point in the history
  • Loading branch information
fszlin committed Jul 18, 2021
1 parent bdc033c commit dc21144
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 115 deletions.
7 changes: 0 additions & 7 deletions src/Certes/Acme/Resource/AuthorizationStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ public enum AuthorizationStatus
[EnumMember(Value = "pending")]
Pending,

/// <summary>
/// The processing status.
/// </summary>
[Obsolete("Use ChallengeStatus.Processing instead.")]
[EnumMember(Value = "processing")]
Processing,

/// <summary>
/// The valid status.
/// </summary>
Expand Down
20 changes: 0 additions & 20 deletions src/Certes/Acme/Resource/Challenge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ public class Challenge
[JsonProperty("error")]
public AcmeError Error { get; set; }

/// <summary>
/// Gets or sets the errors.
/// </summary>
/// <value>
/// The errors.
/// </value>
[JsonProperty("errors")]
[Obsolete("Use Challenge.Error instead.")]
public IList<object> Errors { get; set; }

/// <summary>
/// Gets or sets the token.
/// </summary>
Expand All @@ -73,15 +63,5 @@ public class Challenge
/// </value>
[JsonProperty("token")]
public string Token { get; set; }

/// <summary>
/// Gets or sets the key authorization.
/// </summary>
/// <value>
/// The key authorization.
/// </value>
[JsonProperty("keyAuthorization")]
[Obsolete("Removed from ACME server.")]
public string KeyAuthorization { get; set; }
}
}
9 changes: 0 additions & 9 deletions src/Certes/Jws/AccountKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ public KeyAlgorithm Algorithm
}
}

/// <summary>
/// Gets the JSON web key.
/// </summary>
/// <value>
/// The JSON web key.
/// </value>
[Obsolete]
public object Jwk => JsonWebKey;

/// <summary>
/// Gets the JSON web key.
/// </summary>
Expand Down
9 changes: 0 additions & 9 deletions src/Certes/Jws/IAccountKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ public interface IAccountKey
/// <returns>The hash.</returns>
byte[] ComputeHash(byte[] data);

/// <summary>
/// Gets the JSON web key.
/// </summary>
/// <value>
/// The JSON web key.
/// </value>
[Obsolete("Use JsonWebKey instead.")]
object Jwk { get; }

/// <summary>
/// Gets the JSON web key.
/// </summary>
Expand Down
28 changes: 0 additions & 28 deletions src/Certes/Pkcs/CertificationRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,6 @@ public IList<string> SubjectAlternativeNames
}
}

/// <summary>
/// Initializes a new instance of the <see cref="CertificationRequestBuilder"/> class.
/// </summary>
/// <param name="keyInfo">The key information.</param>
/// <exception cref="System.NotSupportedException">
/// If the provided key is not one of the supported <seealso cref="KeyAlgorithm"/>.
/// </exception>
[Obsolete]
public CertificationRequestBuilder(KeyInfo keyInfo)
: this(KeyFactory.FromDer(keyInfo.PrivateKeyInfo))
{
}

/// <summary>
/// Initializes a new instance of the <see cref="CertificationRequestBuilder"/> class.
/// </summary>
Expand Down Expand Up @@ -137,21 +124,6 @@ public byte[] Generate()
return csr.GetDerEncoded();
}

/// <summary>
/// Exports the key used to generate the CSR.
/// </summary>
/// <returns>
/// The key data.
/// </returns>
[Obsolete]
public KeyInfo Export()
{
return new KeyInfo
{
PrivateKeyInfo = Key.ToDer()
};
}

private Pkcs10CertificationRequest GeneratePkcs10()
{
var x509 = new X509Name(attributes.Select(p => p.Id).ToArray(), attributes.Select(p => p.Value).ToArray());
Expand Down
6 changes: 0 additions & 6 deletions src/Certes/Pkcs/ICertificationRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,5 @@ public interface ICertificationRequestBuilder
/// </summary>
/// <returns>The CSR data.</returns>
byte[] Generate();

/// <summary>
/// Exports the key used to generate the CSR.
/// </summary>
/// <returns>The key data.</returns>
KeyInfo Export();
}
}
17 changes: 0 additions & 17 deletions src/Certes/Pkcs/SignatureAlgorithm.cs

This file was deleted.

1 change: 0 additions & 1 deletion test/Certes.Tests/Acme/Resource/ChallengeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class ChallengeTests
public void CanGetSetProperties()
{
var entity = new Challenge();
entity.VerifyGetterSetter(e => e.Errors, new object[0]);
entity.VerifyGetterSetter(e => e.Error, new AcmeError());
entity.VerifyGetterSetter(e => e.Status, ChallengeStatus.Invalid);
entity.VerifyGetterSetter(e => e.Token, "certes");
Expand Down
9 changes: 0 additions & 9 deletions test/Certes.Tests/Jws/AccountKeyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ namespace Certes.Jws
{
public class AccountKeyTests
{
[Fact]
public void CanGetSetProperties()
{
var key = new AccountKey();
#pragma warning disable 0612
Assert.Equal(key.Jwk, key.JsonWebKey);
#pragma warning restore 0612
}

[Fact]
public void CreateWithNull()
{
Expand Down
9 changes: 0 additions & 9 deletions test/Certes.Tests/Pkcs/CertificationRequestBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ namespace Certes.Pkcs
{
public class CertificationRequestBuilderTests
{
[Fact]
public async Task CanCreateCsrWithKey()
{
var key = await Helper.LoadkeyV1();
#pragma warning disable 0612
new CertificationRequestBuilder(key.Export());
#pragma warning restore 0612
}

[Fact]
public void CanCreateCsrWithSignatureKey()
{
Expand Down

0 comments on commit dc21144

Please sign in to comment.