OPCFoundation / UA-.NETStandard-Samples

Other
245 stars 179 forks source link

[GDS Client] Fix Certificate Request when private Key of existing Certificate is not exportable #607

Open romanett opened 1 month ago

romanett commented 1 month ago

Proposed changes

The GDS Client uses a Certificate Signing Request (CSR) when a new CA signed Certificate is requested from the GDS and an older cert exists.

The CSR can be executed however applying the existing private key to the new Certificate fails when the old Certificates private Key is not exportable. This is the case e.g. for many certs in the Windows X509 Certificate Store.

With this fix the GDS Client uses a KeyPair Request instead of a Certificate Signing Request to request a new CA signed Cert from the GDS, when the private key of the existing cert is not exportable.

Related Issues

Types of changes

Checklist

Further comments