|
![]() |
PKCS8-Encrypted-DSS works but PKCS8-Encrypted-PEM-DSS fail |
Chee Yang Chau 2018-04-26 10:41:00 Registered user |
I use TstDSSKey to generate a key pair. I can save the private key to both format: PKCS8-Encrypted-DSS and PKCS8-Encrypted-PEM-DSS.
However, when I try to load the private key in format PKCS8-Encrypted-PEM-DSS, it fail: var K: iDLPrivateKey; F: tDSIDLPrivateKeyFormatList; P: iSecretKey; S: TStream; begin S := TFileStream.Create('c:\key.txt', fmOpenRead); F := tDSIDLPrivateKeyFormatList.Create(nil); try F.SelectedOptionNames := 'PKCS8-Encrypted-PEM-DSS'; P := tSecretKey.CreateStr(PAnsiChar('password')); Result := Assigned(F.LoadFromStream(P, S, K)); finally F.Free; S.Free; end; end; Reading from key of format PKCS8-Encrypted-DSS works fine. |
Henrick Wibell Hellström 2018-04-26 16:15:58 Registered user |
Thank you for the report. I will look into it.
|