public void Add(X509Certificate2 certificate) { if (certificate == null) { throw new ArgumentNullException(nameof(certificate)); } if (_storePal == null) { throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen); } _storePal.Add(certificate.Pal); }
public void Add(X509Certificate2 certificate) { if (certificate == null) { throw new ArgumentNullException(nameof(certificate)); } if (_storePal == null) { throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen); } if (certificate.Handle == IntPtr.Zero) { throw new CryptographicException(SR.Cryptography_InvalidHandle, "pCertContext"); } _storePal.Add(certificate.Pal); }