diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-21 23:40:59 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-21 23:40:59 +0700 |
commit | 6a939bee94f82fb515144304e81ddbb44c36eda4 (patch) | |
tree | 5ee407d9380b9afdd77c0528f2f5445a83977a94 /crypto/src/openssl | |
parent | Factor out IsEnumType method (diff) | |
download | BouncyCastle.NET-ed25519-6a939bee94f82fb515144304e81ddbb44c36eda4.tar.xz |
Add Platform method for getting the type name of an object
Diffstat (limited to 'crypto/src/openssl')
-rw-r--r-- | crypto/src/openssl/MiscPemGenerator.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/src/openssl/MiscPemGenerator.cs b/crypto/src/openssl/MiscPemGenerator.cs index 443e446f7..22ae1eae1 100644 --- a/crypto/src/openssl/MiscPemGenerator.cs +++ b/crypto/src/openssl/MiscPemGenerator.cs @@ -3,7 +3,6 @@ using System.Collections; using System.IO; using Org.BouncyCastle.Asn1; -using Org.BouncyCastle.Asn1.Cms; using Org.BouncyCastle.Asn1.CryptoPro; using Org.BouncyCastle.Asn1.Pkcs; using Org.BouncyCastle.Asn1.X509; @@ -127,7 +126,7 @@ namespace Org.BouncyCastle.OpenSsl } else { - throw new PemGenerationException("Object type not supported: " + obj.GetType().FullName); + throw new PemGenerationException("Object type not supported: " + Platform.GetTypeName(obj)); } return new PemObject(type, encoding); @@ -185,7 +184,7 @@ namespace Org.BouncyCastle.OpenSsl if (type == null || keyData == null) { // TODO Support other types? - throw new PemGenerationException("Object type not supported: " + obj.GetType().FullName); + throw new PemGenerationException("Object type not supported: " + Platform.GetTypeName(obj)); } @@ -250,7 +249,7 @@ namespace Org.BouncyCastle.OpenSsl } else { - throw new ArgumentException("Cannot handle private key of type: " + akp.GetType().FullName, "akp"); + throw new ArgumentException("Cannot handle private key of type: " + Platform.GetTypeName(akp), "akp"); } return info.ParsePrivateKey().GetEncoded(); |