internal X509CertificateClaimSet(X509Certificate2 certificate, bool clone) { if (certificate == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("certificate"); // dotnet/wcf#1574 // ORIGINAL CODE: // _certificate = clone ? new X509Certificate2(certificate.Handle) : certificate; _certificate = clone ? certificate.CloneCertificateInternal() : certificate; }
internal X509SecurityToken(X509Certificate2 certificate, string id, bool clone, bool disposable) { if (certificate == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("certificate"); if (id == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("id"); _id = id; // dotnet/wcf#1574 // ORIGINAL CODE: // _certificate = clone ? new X509Certificate2(certificate.Handle) : certificate; _certificate = clone ? certificate.CloneCertificateInternal() : certificate; // if the cert needs to be cloned then the token owns the clone and should dispose it _disposable = clone || disposable; }
internal X509Identity(X509Certificate2 certificate, bool clone, bool disposable) : base(X509, X509) { // dotnet/wcf#1574 // ORIGINAL CODE: // _certificate = clone ? new X509Certificate2(certificate.Handle) : certificate; _certificate = clone ? certificate.CloneCertificateInternal() : certificate; _disposable = clone || disposable; }