OpenGost
OpenGost copied to clipboard
It appears there is a bug in `GostECDsaCertificateExtensions.ReadParameters()`
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.