OpenGost icon indicating copy to clipboard operation
OpenGost copied to clipboard

It appears there is a bug in `GostECDsaCertificateExtensions.ReadParameters()`

Open ZzZombo opened this issue 1 year ago • 0 comments

It returns new ECParameters { Curve = curve, Q = publicPoint }; but GostECDsa.ImportParameters() also expects to read CryptoUtils.CloneArray(parameters.D).

However, the issue that brought me there is that it appears that my certificate's public key isn't read correctly. The parameters.D field is null after var publicKey = cert.GetGostECDsaPublicKey()!; var parameters = publicKey.ExportParameters(true); so subsequent attempts to use the results for signing a XML document results in NRE deep within this package's code.

ZzZombo avatar Nov 03 '23 10:11 ZzZombo