public X509Certificate ToX509Certificate() { if (handle == IntPtr.Zero) { throw new ObjectDisposedException("SecCertificate"); } var impl = new X509CertificateImplApple(handle, false); return(new X509Certificate(impl)); }
internal X509Certificate2 GetCertificate(int index) { if (handle == IntPtr.Zero) { throw new ObjectDisposedException("SecTrust"); } if (index < 0 || index >= Count) { throw new ArgumentOutOfRangeException("index"); } var ptr = SecTrustGetCertificateAtIndex(handle, (IntPtr)index); var impl = new X509CertificateImplApple(ptr, false); return(new X509Certificate2(impl)); }