【问题标题】:SignedXml.CheckSIgnature NullReferenceException after updating System.Security.Cryptography.Xml from 4.7.0 to 5.0.0将 System.Security.Cryptography.Xml 从 4.7.0 更新到 5.0.0 后 SignedXml.CheckSIgnature NullReferenceException
【发布时间】:2022-01-20 15:30:17
【问题描述】:

在将 System.Security.Cryptography.Xml 从 4.7.0 更新到 5.0.0 或 6.0.0 后,我的代码没有其他更改,我在 IsKeyTheCorrectAlgorithm 中得到了一个 NullReferenceException。使用的证书是使用 CNG、CAPI 和 OpenSSL 创建的 SHA1 和 SHA256 自签名证书。

【问题讨论】:

    标签: c# .net .net-5


    【解决方案1】:

    经过数周的搜索,我终于找到了这个模糊的 GitHub 问题,指出了解决方案(但没有确认问题或修复问题):https://github.com/dotnet/runtime/issues/55383

    解决方案是删除对CryptoConfig.AddAlgorithm 的调用,这显然不再需要。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-04
      • 2015-09-01
      • 1970-01-01
      • 2019-03-14
      相关资源
      最近更新 更多