OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.97k stars 950 forks source link

PEM private key should use PKCS#8, not PKCS#5 #695

Closed mregen closed 5 years ago

mregen commented 5 years ago

The GDS sample can create a public private key pair with PEM as private key. But the key uses PKCS#5 format.

see -> https://github.com/Azure/azure-iiot-opc-vault-service/issues/44

also PEM password support should be added..currently always returns a unprotected PEM.

PEM is created in the CertificateFactory. The exposed function should be changed to support password and return the PKCS#8.

mregen commented 5 years ago

Note: Adding PKCS#8 w. encryped password turned out to be quite a task, because the Bouncy Castle PemWriter doesn't support it natively. Postponed.