Closed saadwardany closed 2 years ago
Please check your token using token manager. If login succeeded, try to run our program as administrator.
I can login by token manager as in next screen shoot https://files.fm/f/rgpjpg2qt and i tried by administrator but the same issue
Can you check the Windows Event Viewer under the category of “Application”.
I fix this issue , just you need to change this line cms.ComputeSignature(signer); to cms.ComputeSignature(signer,false);
To check the recommended fix, please update the publish folder by https://github.com/bassemAgmi/EInvoicingSigner/blob/master/publishUpdatedFile.rar . If is it ok, please tell us to commit the change
I updated the publish folder but it did not work the token working fine with another lib
D:\EInvoicing>D:\EInvoicing\publish/EInvoicingSigner.exe D:\EInvoicing 10182735 "Egypt Trust"
First argument D:\EInvoicing
Second argument 10182735
Third argument Egypt Trust
Unhandled exception. Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: An internal error occurred.
at Internal.Cryptography.CngCommon.TrySignHash(SafeNCryptKeyHandle keyHandle, ReadOnlySpan1 hash, Span
1 signature, AsymmetricPaddingMode paddingMode, Void* pPaddingInfo, Int32& bytesWritten)
at System.Security.Cryptography.RSACng.TrySignHash(ReadOnlySpan1 hash, Span
1 destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, Int32& bytesWritten)
at System.Security.Cryptography.Pkcs.CmsSignature.RSAPkcs1CmsSignature.Sign(ReadOnlySpan1 dataHash, HashAlgorithmName hashAlgorithmName, X509Certificate2 certificate, AsymmetricAlgorithm key, Boolean silent, String& signatureAlgorithm, Byte[]& signatureValue) at System.Security.Cryptography.Pkcs.CmsSignature.Sign(ReadOnlySpan
1 dataHash, HashAlgorithmName hashAlgorithmName, X509Certificate2 certificate, AsymmetricAlgorithm key, Boolean silent, String& oid, ReadOnlyMemory1& signatureValue) 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 TokenSigner.SignWithCMS(String serializedJson) in D:\work\Workspace\EInvoicingSigner\EInvoicingSigner\Signer.cs:line 185
at TokenSigner.Main(String[] args) in D:\work\Workspace\EInvoicingSigner\EInvoicingSigner\Signer.cs:line 76
To check the recommended fix, please update the publish folder by https://github.com/bassemAgmi/EInvoicingSigner/blob/master/publishUpdatedFile.rar . If is it ok, please tell us to commit the change
It's Binary file bro !! can you provide the source code or upgrade the repo please
The repository has been updated. You are welcome to take a fork and submit changes to the original repository with pull requests.
i was have this problem the problem in epass2003 driver change the version you use download another one
Notes : there is Error in ePass if you use Windows Server 2016
D:\EInvoicing>D:\EInvoicing\publish/EInvoicingSigner.exe D:\EInvoicing 10182735 "Egypt Trust Sealing CA" First argument D:\EInvoicing Second argument 10182735 Third argument Egypt Trust Sealing CA Unhandled exception. Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: An internal error occurred. at Internal.Cryptography.CngCommon.TrySignHash(SafeNCryptKeyHandle keyHandle, ReadOnlySpan
1 hash, Span
1 signature, AsymmetricPaddingMode paddingMode, Void* pPaddingInfo, Int32& bytesWritten) at System.Security.Cryptography.RSACng.TrySignHash(ReadOnlySpan1 hash, Span
1 destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, Int32& bytesWritten) at System.Security.Cryptography.Pkcs.CmsSignature.RSAPkcs1CmsSignature.Sign(ReadOnlySpan1 dataHash, HashAlgorithmName hashAlgorithmName, X509Certificate2 certificate, AsymmetricAlgorithm key, Boolean silent, String& signatureAlgorithm, Byte[]& signatureValue) at System.Security.Cryptography.Pkcs.CmsSignature.Sign(ReadOnlySpan
1 dataHash, HashAlgorithmName hashAlgorithmName, X509Certificate2 certificate, AsymmetricAlgorithm key, Boolean silent, String& oid, ReadOnlyMemory1& signatureValue) 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 System.Security.Cryptography.Pkcs.SignedCms.ComputeSignature(CmsSigner signer) at TokenSigner.SignWithCMS(String serializedJson) at TokenSigner.Main(String[] args)this error appear