diff options
author | Peter Dettman <peter.dettman@gmail.com> | 2022-06-21 18:57:52 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@gmail.com> | 2022-06-21 18:57:52 +0700 |
commit | 84a1abd2bb12af82623c136243240e52a88e0bf4 (patch) | |
tree | 5a9828c8785a54c5b293ba484bdd0e2f2431600f /crypto/src/asn1/pkcs | |
parent | Update copyright (diff) | |
download | BouncyCastle.NET-ed25519-84a1abd2bb12af82623c136243240e52a88e0bf4.tar.xz |
ObsoleteAttribute cleanup
Diffstat (limited to 'crypto/src/asn1/pkcs')
-rw-r--r-- | crypto/src/asn1/pkcs/CertificationRequest.cs | 14 | ||||
-rw-r--r-- | crypto/src/asn1/pkcs/PBES2Parameters.cs | 4 | ||||
-rw-r--r-- | crypto/src/asn1/pkcs/PKCSObjectIdentifiers.cs | 12 | ||||
-rw-r--r-- | crypto/src/asn1/pkcs/RSAPrivateKeyStructure.cs | 4 |
4 files changed, 7 insertions, 27 deletions
diff --git a/crypto/src/asn1/pkcs/CertificationRequest.cs b/crypto/src/asn1/pkcs/CertificationRequest.cs index 98caa2268..8c4248d36 100644 --- a/crypto/src/asn1/pkcs/CertificationRequest.cs +++ b/crypto/src/asn1/pkcs/CertificationRequest.cs @@ -24,13 +24,11 @@ namespace Org.BouncyCastle.Asn1.Pkcs public static CertificationRequest GetInstance( object obj) { - if (obj is CertificationRequest) + if (obj == null) + return null; + if (obj is CertificationRequest) return (CertificationRequest)obj; - - if (obj != null) - return new CertificationRequest((Asn1Sequence)obj); - - return null; + return new CertificationRequest(Asn1Sequence.GetInstance(obj)); } protected CertificationRequest() @@ -47,9 +45,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs this.sigBits = signature; } - [Obsolete("Use 'GetInstance' instead")] - public CertificationRequest( - Asn1Sequence seq) + internal CertificationRequest(Asn1Sequence seq) { if (seq.Count != 3) throw new ArgumentException("Wrong number of elements in sequence", "seq"); diff --git a/crypto/src/asn1/pkcs/PBES2Parameters.cs b/crypto/src/asn1/pkcs/PBES2Parameters.cs index fc6904eed..66e4755c8 100644 --- a/crypto/src/asn1/pkcs/PBES2Parameters.cs +++ b/crypto/src/asn1/pkcs/PBES2Parameters.cs @@ -24,9 +24,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs this.scheme = encScheme; } - [Obsolete("Use GetInstance() instead")] - public PbeS2Parameters( - Asn1Sequence seq) + private PbeS2Parameters(Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); diff --git a/crypto/src/asn1/pkcs/PKCSObjectIdentifiers.cs b/crypto/src/asn1/pkcs/PKCSObjectIdentifiers.cs index 6c7fed442..8b74e8099 100644 --- a/crypto/src/asn1/pkcs/PKCSObjectIdentifiers.cs +++ b/crypto/src/asn1/pkcs/PKCSObjectIdentifiers.cs @@ -129,9 +129,6 @@ namespace Org.BouncyCastle.Asn1.Pkcs public static readonly DerObjectIdentifier Pkcs9AtFriendlyName = new DerObjectIdentifier(Pkcs9 + ".20"); public static readonly DerObjectIdentifier Pkcs9AtLocalKeyID = new DerObjectIdentifier(Pkcs9 + ".21"); - [Obsolete("Use X509Certificate instead")] - public static readonly DerObjectIdentifier X509CertType = new DerObjectIdentifier(Pkcs9 + ".22.1"); - public const string CertTypes = Pkcs9 + ".22"; public static readonly DerObjectIdentifier X509Certificate = new DerObjectIdentifier(CertTypes + ".1"); public static readonly DerObjectIdentifier SdsiCertificate = new DerObjectIdentifier(CertTypes + ".2"); @@ -261,15 +258,6 @@ namespace Org.BouncyCastle.Asn1.Pkcs /** PKCS#9: 1.2.840.113549.1.9.16.2.40 <a href="https://tools.ietf.org/html/rfc7030">RFC7030</a>*/ public static readonly DerObjectIdentifier IdAACommunityIdentifiers = IdAAOid.Branch("40"); - [Obsolete("Use 'IdAAEtsSigPolicyID' instead")] - public static readonly DerObjectIdentifier IdAASigPolicyID = IdAAEtsSigPolicyID; - [Obsolete("Use 'IdAAEtsCommitmentType' instead")] - public static readonly DerObjectIdentifier IdAACommitmentType = IdAAEtsCommitmentType; - [Obsolete("Use 'IdAAEtsSignerLocation' instead")] - public static readonly DerObjectIdentifier IdAASignerLocation = IdAAEtsSignerLocation; - [Obsolete("Use 'IdAAEtsOtherSigCert' instead")] - public static readonly DerObjectIdentifier IdAAOtherSigCert = IdAAEtsOtherSigCert; - // // id-spq OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840) // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-spq(5)} diff --git a/crypto/src/asn1/pkcs/RSAPrivateKeyStructure.cs b/crypto/src/asn1/pkcs/RSAPrivateKeyStructure.cs index 738a97eb4..119ee98de 100644 --- a/crypto/src/asn1/pkcs/RSAPrivateKeyStructure.cs +++ b/crypto/src/asn1/pkcs/RSAPrivateKeyStructure.cs @@ -52,9 +52,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs this.coefficient = coefficient; } - [Obsolete("Use 'GetInstance' method(s) instead")] - public RsaPrivateKeyStructure( - Asn1Sequence seq) + private RsaPrivateKeyStructure(Asn1Sequence seq) { BigInteger version = ((DerInteger)seq[0]).Value; if (version.IntValue != 0) |