question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

КриптопроCSP установдлен Сертификат корректный (но privateKey свойство у него недоступно почему-то), но при попытке подписать сообщение ниже приведенным кодом возникает ошибка: GostCryptoConfig.ProviderType = GostCryptography.Base.ProviderType.CryptoPro_2012_512;

        //Создание объекта для подписи сообщения
        var signedCms = new GostSignedCms(new ContentInfo(message),true);
        
       
        // Создание объект с информацией о подписчике           
        var signer = new CmsSigner(certificate);
        
        var tt = certificate.GetHashAlgorithm();
        //signer.DigestAlgorithm = Oid.FromOidValue("1.2.643.7.1.1.2.2", OidGroup.HashAlgorithm); //GostCryptography.Asn1.Gost.Gost_R3410_2012_256.Gost_R3410_2012_256_Constants.HashAlgorithm.ToOid();
         // Включение информации только о конечном сертификате (только для теста)
         signer.IncludeOption = X509IncludeOption.EndCertOnly;
         
         // Создание подписи для сообщения CMS/PKCS#7
         signedCms.ComputeSignature(signer);

Ошибка: ‘1.2.643.7.1.1.2.2’ is not a known hash algorithm. trace: at Internal.Cryptography.PkcsHelpers.GetDigestAlgorithm(String oidValue, Boolean forVerification) at System.Security.Cryptography.Pkcs.CmsSigner.Sign(ReadOnlyMemory`1 data, String contentTypeOid, Boolean silent, X509Certificate2Collection& chainCerts) at System.Security.Cryptography.Pkcs.SignedCms.ComputeSignature(CmsSigner signer, Boolean silent) at GostCryptography.Pkcs.GostSignedCms.ComputeSignature(CmsSigner signer, Boolean silent) at GostCryptography.Pkcs.GostSignedCms.ComputeSignature(CmsSigner signer)

Что я делаю неверно?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
murtazo96commented, Mar 16, 2021

Когда будет поддержка .NET Core?

0reactions
borgezcommented, Dec 18, 2020

Они её в незапланированное кинули, так что не факт что в 5 будет…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Download .NET (Linux, macOS, and Windows)
NET MAUI, updates for ASP.NET Core and cloud-native development, ARM64 support, and more. ... NET and ASP.NET Core on the Microsoft Artifact Registry....
Read more >
NET (and .NET Core) - introduction and overview
.NET (Core) -- A cross-platform and open source implementation of .NET, rethought for the cloud age while remaining significantly compatible ...
Read more >
.NET Core Overview
NET Core is a new version of .NET Framework, which is a free, open-source, general-purpose development platform maintained by Microsoft.
Read more >
Netcore Cloud - The Most Comprehensive Customer ...
Netcore Cloud's customer experience platform helps marketers increase conversions, user engagement, and retention on websites & apps.
Read more >
.NET - Wikipedia
.NET (pronounced as "dot net"; formerly named .NET Core) is a free and open-source, managed computer software framework for Windows, Linux, and macOS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found