This repository was archived by the owner on Jul 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 646
This repository was archived by the owner on Jul 9, 2023. It is now read-only.
BCCertificateMaker.withPrivateKey throws an error on Xamarin.Mac #509
Copy link
Copy link
Closed
Description
Certificate creation on macOS is failing with
2018-10-18 10:42:38.5073 ERROR CryptographicException: Input data cannot be coded as a valid certificate.
2018-10-18 10:42:38.5073 ERROR at Mono.Security.X509.X509Certificate.Parse (System.Byte[] data) [0x00322] in <4728449b5ce44efe9ac502d1c5fe0103>:0
at Mono.Security.X509.X509Certificate..ctor (System.Byte[] data) [0x00030] in <4728449b5ce44efe9ac502d1c5fe0103>:0
at System.Security.Cryptography.X509Certificates.X509Certificate2ImplMono.Import (System.Byte[] rawData, System.String password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) [0x00041] in <b6aee1c1093b4534ac71cf24f60ab740>:0
at System.Security.Cryptography.X509Certificates.X509Helper2.Import (System.Byte[] rawData, System.String password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags, System.Boolean disableProvider) [0x0000e] in <b6aee1c1093b4534ac71cf24f60ab740>:0
at System.Security.Cryptography.X509Certificates.X509Certificate2.Import (System.Byte[] rawData, System.String password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) [0x00000] in <b6aee1c1093b4534ac71cf24f60ab740>:0
at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor (System.Byte[] rawData, System.String password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) [0x00011] in <b6aee1c1093b4534ac71cf24f60ab740>:0
at Titanium.Web.Proxy.Network.Certificate.BCCertificateMaker.withPrivateKey (Org.BouncyCastle.X509.X509Certificate certificate, Org.BouncyCastle.Crypto.AsymmetricKeyParameter privateKey) [0x00067] in <913ab39b4f64465daa8b748144da91cf>:0
at Titanium.Web.Proxy.Network.Certificate.BCCertificateMaker.generateCertificate (System.String hostName, System.String subjectName, System.String issuerName, System.DateTime validFrom, System.DateTime validTo, System.Int32 keyStrength, System.String signatureAlgorithm, Org.BouncyCastle.Crypto.AsymmetricKeyParameter issuerPrivateKey) [0x0018e] in <913ab39b4f64465daa8b748144da91cf>:0
at Titanium.Web.Proxy.Network.Certificate.BCCertificateMaker.makeCertificateInternal (System.Boolean isRoot, System.String hostName, System.String subjectName, System.DateTime validFrom, System.DateTime validTo, System.Security.Cryptography.X509Certificates.X509Certificate2 signingCertificate) [0x0001b] in <913ab39b4f64465daa8b748144da91cf>:0
at Titanium.Web.Proxy.Network.Certificate.BCCertificateMaker.makeCertificateInternal (System.String subject, System.Boolean isRoot, System.Boolean switchToMtaIfNeeded, System.Security.Cryptography.X509Certificates.X509Certificate2 signingCert, System.Threading.CancellationToken cancellationToken) [0x0003a] in <913ab39b4f64465daa8b748144da91cf>:0
at Titanium.Web.Proxy.Network.Certificate.BCCertificateMaker.MakeCertificate (System.String sSubjectCn, System.Boolean isRoot, System.Security.Cryptography.X509Certificates.X509Certificate2 signingCert) [0x00000] in <913ab39b4f64465daa8b748144da91cf>:0
at Titanium.Web.Proxy.Network.CertificateManager.makeCertificate (System.String certificateName, System.Boolean isRootCertificate) [0x0002f] in <913ab39b4f64465daa8b748144da91cf>:0
at Titanium.Web.Proxy.Network.CertificateManager.CreateCertificate (System.String certificateName, System.Boolean isRootCertificate) [0x000e0] in <913ab39b4f64465daa8b748144da91cf>:0
2018-10-18 10:42:38.5073 ERROR NotSupportedException: Undefined length encoding.
2018-10-18 10:42:38.5073 ERROR at Mono.Security.ASN1..ctor (System.Byte[] data) [0x0004d] in <4728449b5ce44efe9ac502d1c5fe0103>:0
edit: Got a PR coming here in a minute
Metadata
Metadata
Assignees
Labels
No labels