Skip to content

Change to use of X509Certificate2 copy constructor #1574

@iamjasonp

Description

@iamjasonp

Currently, in various areas in the WCF codebase, we have code like the following to clone an X509Certificate2

    new X509Certificate2(certificate.Handle)

In Linux only - the private key does not get copied along.

Additionally, the copy constructor is not yet part of netstandard1.1. The copy constructor is slated to be added in netstandard2 (per dotnet/corefx#12214, dotnet/corefx#12240)

In the meantime, we do some calisthenics to achieve the copy (and hence have scenarios listed in #1295 work) but we do not want to have this live in our codebase forever. This issue tracks:

  • Removal of the self-copy code we added (in the codebase, such instances are annotated with this bug number)
  • Change code to use the X509Certificate2 copy constructor when it becomes available

Metadata

Metadata

Assignees

Labels

bugThis is a product bug.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions