Closed VladislavChastnokov closed 1 year ago
The only difference is CryptoPro CSP version, exception happens on machine with CSP 5.0
Hello! Thank you for the feedback. Which .NET version do you use?
4.5.2 and above
I can suggest the next options:
Thumbprint
to search)Certificate that is used is the only one in the user storage, code checked line by line, there aren't anything missing that would prevent it from working at a glance, exception is somewhere deep in the library, i don't even understand what it means and where to begin to look to fix it
Issue is rather critical, as this is used in signing and sending important data, i need to get it working by april
Could you create a test that reproduces the issue? Also specify .NET and CSP versions, the certificate properties. As I understand CryptoPro CSP 4.* works well?
Issue resolved by reinstalling CryptoPro, possibly got broken by VipNet Client update (both on the same machine)
I'm getting an exception while trying to sign some data "Индекс за пределами диапазона. Индекс должен быть положительным числом, а его размер не должен превышать размер коллекции. Имя параметра: index" в System.Security.Cryptography.X509Certificates.X509ChainElementCollection.get_Item(Int32 index) в System.Security.Cryptography.Pkcs.PkcsUtils.CreateBagOfCertificates(CmsSigner signer) в System.Security.Cryptography.Pkcs.SignedCms.Sign(CmsSigner signer, Boolean silent) в System.Security.Cryptography.Pkcs.SignedCms.ComputeSignature(CmsSigner signer, Boolean silent) в GostCryptography.Pkcs.GostSignedCms.ComputeSignature(CmsSigner signer, Boolean silent) в GostCryptography.Pkcs.GostSignedCms.ComputeSignature(CmsSigner signer)
Same code works on test machine, but fails on production, same certificate