diff options
Diffstat (limited to 'crypto/src/asn1/pkcs/CertificationRequest.cs')
-rw-r--r-- | crypto/src/asn1/pkcs/CertificationRequest.cs | 14 |
1 files changed, 5 insertions, 9 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"); |