diff options
Diffstat (limited to 'crypto/src/asn1/cmp')
33 files changed, 84 insertions, 33 deletions
diff --git a/crypto/src/asn1/cmp/CAKeyUpdAnnContent.cs b/crypto/src/asn1/cmp/CAKeyUpdAnnContent.cs index 3cdb128a6..b74bac87a 100644 --- a/crypto/src/asn1/cmp/CAKeyUpdAnnContent.cs +++ b/crypto/src/asn1/cmp/CAKeyUpdAnnContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class CAKeyUpdAnnContent @@ -24,7 +26,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CAKeyUpdAnnContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual CmpCertificate OldWithNew diff --git a/crypto/src/asn1/cmp/CertConfirmContent.cs b/crypto/src/asn1/cmp/CertConfirmContent.cs index f4016d8d8..370a9e7d6 100644 --- a/crypto/src/asn1/cmp/CertConfirmContent.cs +++ b/crypto/src/asn1/cmp/CertConfirmContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class CertConfirmContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CertConfirmContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual CertStatus[] ToCertStatusArray() diff --git a/crypto/src/asn1/cmp/CertOrEncCert.cs b/crypto/src/asn1/cmp/CertOrEncCert.cs index 4c049c180..eb200e1e8 100644 --- a/crypto/src/asn1/cmp/CertOrEncCert.cs +++ b/crypto/src/asn1/cmp/CertOrEncCert.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -34,7 +35,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1TaggedObject) return new CertOrEncCert((Asn1TaggedObject)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public CertOrEncCert(CmpCertificate certificate) diff --git a/crypto/src/asn1/cmp/CertRepMessage.cs b/crypto/src/asn1/cmp/CertRepMessage.cs index c22b079c8..82869784d 100644 --- a/crypto/src/asn1/cmp/CertRepMessage.cs +++ b/crypto/src/asn1/cmp/CertRepMessage.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class CertRepMessage @@ -28,7 +30,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CertRepMessage((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public CertRepMessage(CmpCertificate[] caPubs, CertResponse[] response) diff --git a/crypto/src/asn1/cmp/CertResponse.cs b/crypto/src/asn1/cmp/CertResponse.cs index 80813b8b7..843fd9299 100644 --- a/crypto/src/asn1/cmp/CertResponse.cs +++ b/crypto/src/asn1/cmp/CertResponse.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class CertResponse @@ -45,7 +47,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CertResponse((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public CertResponse( diff --git a/crypto/src/asn1/cmp/CertStatus.cs b/crypto/src/asn1/cmp/CertStatus.cs index 52d5ac504..d437b57b2 100644 --- a/crypto/src/asn1/cmp/CertStatus.cs +++ b/crypto/src/asn1/cmp/CertStatus.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Math; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -43,7 +44,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CertStatus((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual Asn1OctetString CertHash diff --git a/crypto/src/asn1/cmp/CertifiedKeyPair.cs b/crypto/src/asn1/cmp/CertifiedKeyPair.cs index 655dde0c5..c06f00019 100644 --- a/crypto/src/asn1/cmp/CertifiedKeyPair.cs +++ b/crypto/src/asn1/cmp/CertifiedKeyPair.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -45,7 +46,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CertifiedKeyPair((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public CertifiedKeyPair( diff --git a/crypto/src/asn1/cmp/Challenge.cs b/crypto/src/asn1/cmp/Challenge.cs index bee5f96f5..5c78c2a2b 100644 --- a/crypto/src/asn1/cmp/Challenge.cs +++ b/crypto/src/asn1/cmp/Challenge.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -32,7 +33,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new Challenge((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual AlgorithmIdentifier Owf diff --git a/crypto/src/asn1/cmp/CmpCertificate.cs b/crypto/src/asn1/cmp/CmpCertificate.cs index 16ee30059..33356b486 100644 --- a/crypto/src/asn1/cmp/CmpCertificate.cs +++ b/crypto/src/asn1/cmp/CmpCertificate.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -37,7 +38,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1TaggedObject) return new CmpCertificate(AttributeCertificate.GetInstance(((Asn1TaggedObject)obj).GetObject())); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual bool IsX509v3PKCert diff --git a/crypto/src/asn1/cmp/CrlAnnContent.cs b/crypto/src/asn1/cmp/CrlAnnContent.cs index 3dc11d32c..db8ecfa40 100644 --- a/crypto/src/asn1/cmp/CrlAnnContent.cs +++ b/crypto/src/asn1/cmp/CrlAnnContent.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -22,7 +23,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new CrlAnnContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual CertificateList[] ToCertificateListArray() diff --git a/crypto/src/asn1/cmp/ErrorMsgContent.cs b/crypto/src/asn1/cmp/ErrorMsgContent.cs index 2d6353b65..5d2132bb8 100644 --- a/crypto/src/asn1/cmp/ErrorMsgContent.cs +++ b/crypto/src/asn1/cmp/ErrorMsgContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class ErrorMsgContent @@ -35,7 +37,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new ErrorMsgContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public ErrorMsgContent(PkiStatusInfo pkiStatusInfo) diff --git a/crypto/src/asn1/cmp/GenMsgContent.cs b/crypto/src/asn1/cmp/GenMsgContent.cs index 9f042491c..f3142b5c6 100644 --- a/crypto/src/asn1/cmp/GenMsgContent.cs +++ b/crypto/src/asn1/cmp/GenMsgContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class GenMsgContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new GenMsgContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public GenMsgContent(params InfoTypeAndValue[] itv) diff --git a/crypto/src/asn1/cmp/GenRepContent.cs b/crypto/src/asn1/cmp/GenRepContent.cs index 5bdc5550a..3c3573e37 100644 --- a/crypto/src/asn1/cmp/GenRepContent.cs +++ b/crypto/src/asn1/cmp/GenRepContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class GenRepContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new GenRepContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public GenRepContent(params InfoTypeAndValue[] itv) diff --git a/crypto/src/asn1/cmp/InfoTypeAndValue.cs b/crypto/src/asn1/cmp/InfoTypeAndValue.cs index 9b51dba02..0ce6f73ba 100644 --- a/crypto/src/asn1/cmp/InfoTypeAndValue.cs +++ b/crypto/src/asn1/cmp/InfoTypeAndValue.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { /** @@ -69,7 +71,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new InfoTypeAndValue((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public InfoTypeAndValue( diff --git a/crypto/src/asn1/cmp/KeyRecRepContent.cs b/crypto/src/asn1/cmp/KeyRecRepContent.cs index b0352f048..00c4612b9 100644 --- a/crypto/src/asn1/cmp/KeyRecRepContent.cs +++ b/crypto/src/asn1/cmp/KeyRecRepContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class KeyRecRepContent @@ -43,7 +45,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new KeyRecRepContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual PkiStatusInfo Status diff --git a/crypto/src/asn1/cmp/OobCertHash.cs b/crypto/src/asn1/cmp/OobCertHash.cs index 63ddff7c4..cd8192b40 100644 --- a/crypto/src/asn1/cmp/OobCertHash.cs +++ b/crypto/src/asn1/cmp/OobCertHash.cs @@ -2,6 +2,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -41,7 +42,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new OobCertHash((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual AlgorithmIdentifier HashAlg diff --git a/crypto/src/asn1/cmp/PKIBody.cs b/crypto/src/asn1/cmp/PKIBody.cs index 3205a907e..f17eed64d 100644 --- a/crypto/src/asn1/cmp/PKIBody.cs +++ b/crypto/src/asn1/cmp/PKIBody.cs @@ -2,6 +2,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.Pkcs; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -47,7 +48,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1TaggedObject) return new PkiBody((Asn1TaggedObject)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } private PkiBody(Asn1TaggedObject tagged) diff --git a/crypto/src/asn1/cmp/PKIConfirmContent.cs b/crypto/src/asn1/cmp/PKIConfirmContent.cs index 98645766a..d154427a4 100644 --- a/crypto/src/asn1/cmp/PKIConfirmContent.cs +++ b/crypto/src/asn1/cmp/PKIConfirmContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PkiConfirmContent @@ -13,7 +15,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Null) return new PkiConfirmContent(); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public PkiConfirmContent() diff --git a/crypto/src/asn1/cmp/PKIFreeText.cs b/crypto/src/asn1/cmp/PKIFreeText.cs index 571c8d93a..fef525465 100644 --- a/crypto/src/asn1/cmp/PKIFreeText.cs +++ b/crypto/src/asn1/cmp/PKIFreeText.cs @@ -1,6 +1,8 @@ using System; using System.Collections; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PkiFreeText @@ -27,7 +29,7 @@ namespace Org.BouncyCastle.Asn1.Cmp return new PkiFreeText((Asn1Sequence)obj); } - throw new ArgumentException("Unknown object in factory: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Unknown object in factory: " + Platform.GetTypeName(obj), "obj"); } public PkiFreeText( diff --git a/crypto/src/asn1/cmp/PKIHeader.cs b/crypto/src/asn1/cmp/PKIHeader.cs index e758e9f16..577cb45df 100644 --- a/crypto/src/asn1/cmp/PKIHeader.cs +++ b/crypto/src/asn1/cmp/PKIHeader.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -81,7 +82,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PkiHeader((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public PkiHeader( diff --git a/crypto/src/asn1/cmp/PKIMessages.cs b/crypto/src/asn1/cmp/PKIMessages.cs index ddabdf4ae..eb01e544a 100644 --- a/crypto/src/asn1/cmp/PKIMessages.cs +++ b/crypto/src/asn1/cmp/PKIMessages.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PkiMessages @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PkiMessages((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public PkiMessages(params PkiMessage[] msgs) diff --git a/crypto/src/asn1/cmp/PKIStatus.cs b/crypto/src/asn1/cmp/PKIStatus.cs index b03dd3d62..ba757dfcf 100644 --- a/crypto/src/asn1/cmp/PKIStatus.cs +++ b/crypto/src/asn1/cmp/PKIStatus.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Math; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -46,7 +47,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is DerInteger) return new PkiStatusEncodable((DerInteger)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual BigInteger Value diff --git a/crypto/src/asn1/cmp/PKIStatusInfo.cs b/crypto/src/asn1/cmp/PKIStatusInfo.cs index 2463e0081..b19bf7459 100644 --- a/crypto/src/asn1/cmp/PKIStatusInfo.cs +++ b/crypto/src/asn1/cmp/PKIStatusInfo.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Math; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -30,7 +31,7 @@ namespace Org.BouncyCastle.Asn1.Cmp return new PkiStatusInfo((Asn1Sequence)obj); } - throw new ArgumentException("Unknown object in factory: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Unknown object in factory: " + Platform.GetTypeName(obj), "obj"); } public PkiStatusInfo( diff --git a/crypto/src/asn1/cmp/PbmParameter.cs b/crypto/src/asn1/cmp/PbmParameter.cs index 59b1bd7bb..206b89ba1 100644 --- a/crypto/src/asn1/cmp/PbmParameter.cs +++ b/crypto/src/asn1/cmp/PbmParameter.cs @@ -1,6 +1,7 @@ using System; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -28,7 +29,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PbmParameter((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public PbmParameter( diff --git a/crypto/src/asn1/cmp/PollRepContent.cs b/crypto/src/asn1/cmp/PollRepContent.cs index 4045ac7ed..f8bb098a2 100644 --- a/crypto/src/asn1/cmp/PollRepContent.cs +++ b/crypto/src/asn1/cmp/PollRepContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PollRepContent @@ -28,7 +30,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PollRepContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual DerInteger CertReqID diff --git a/crypto/src/asn1/cmp/PollReqContent.cs b/crypto/src/asn1/cmp/PollReqContent.cs index ca2164151..dd9b0c352 100644 --- a/crypto/src/asn1/cmp/PollReqContent.cs +++ b/crypto/src/asn1/cmp/PollReqContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PollReqContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PollReqContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual DerInteger[][] GetCertReqIDs() diff --git a/crypto/src/asn1/cmp/PopoDecKeyChallContent.cs b/crypto/src/asn1/cmp/PopoDecKeyChallContent.cs index 20b173b85..03a13a5d5 100644 --- a/crypto/src/asn1/cmp/PopoDecKeyChallContent.cs +++ b/crypto/src/asn1/cmp/PopoDecKeyChallContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PopoDecKeyChallContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PopoDecKeyChallContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual Challenge[] ToChallengeArray() diff --git a/crypto/src/asn1/cmp/PopoDecKeyRespContent.cs b/crypto/src/asn1/cmp/PopoDecKeyRespContent.cs index 8c322e4ec..73f59b7c1 100644 --- a/crypto/src/asn1/cmp/PopoDecKeyRespContent.cs +++ b/crypto/src/asn1/cmp/PopoDecKeyRespContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class PopoDecKeyRespContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new PopoDecKeyRespContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual DerInteger[] ToDerIntegerArray() diff --git a/crypto/src/asn1/cmp/ProtectedPart.cs b/crypto/src/asn1/cmp/ProtectedPart.cs index db6798fee..ed90708f9 100644 --- a/crypto/src/asn1/cmp/ProtectedPart.cs +++ b/crypto/src/asn1/cmp/ProtectedPart.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class ProtectedPart @@ -22,7 +24,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new ProtectedPart((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public ProtectedPart(PkiHeader header, PkiBody body) diff --git a/crypto/src/asn1/cmp/RevAnnContent.cs b/crypto/src/asn1/cmp/RevAnnContent.cs index 2c3bd5f77..d5d42625c 100644 --- a/crypto/src/asn1/cmp/RevAnnContent.cs +++ b/crypto/src/asn1/cmp/RevAnnContent.cs @@ -2,6 +2,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -35,7 +36,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new RevAnnContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual PkiStatusEncodable Status diff --git a/crypto/src/asn1/cmp/RevDetails.cs b/crypto/src/asn1/cmp/RevDetails.cs index 6bdf5b2e9..7d2a65ab9 100644 --- a/crypto/src/asn1/cmp/RevDetails.cs +++ b/crypto/src/asn1/cmp/RevDetails.cs @@ -2,6 +2,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -27,7 +28,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new RevDetails((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public RevDetails(CertTemplate certDetails) diff --git a/crypto/src/asn1/cmp/RevRepContent.cs b/crypto/src/asn1/cmp/RevRepContent.cs index 47987265a..8e382a60d 100644 --- a/crypto/src/asn1/cmp/RevRepContent.cs +++ b/crypto/src/asn1/cmp/RevRepContent.cs @@ -2,6 +2,7 @@ using System; using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Asn1.Cmp { @@ -39,7 +40,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new RevRepContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public virtual PkiStatusInfo[] GetStatus() diff --git a/crypto/src/asn1/cmp/RevReqContent.cs b/crypto/src/asn1/cmp/RevReqContent.cs index fbf869203..1522d3789 100644 --- a/crypto/src/asn1/cmp/RevReqContent.cs +++ b/crypto/src/asn1/cmp/RevReqContent.cs @@ -1,5 +1,7 @@ using System; +using Org.BouncyCastle.Utilities; + namespace Org.BouncyCastle.Asn1.Cmp { public class RevReqContent @@ -20,7 +22,7 @@ namespace Org.BouncyCastle.Asn1.Cmp if (obj is Asn1Sequence) return new RevReqContent((Asn1Sequence)obj); - throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); + throw new ArgumentException("Invalid object: " + Platform.GetTypeName(obj), "obj"); } public RevReqContent(params RevDetails[] revDetails) |