-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASN1 corrupted data when using EnvelopedCms to decrypt on Debian Stretch #26000
Comments
@bartonjs is that new code in 2.1? |
@karelz Yep, in 2.0 and prior it would have been PlatformNotSupportedException |
Looks like a deserializer problem reading implicitly tagged indefinite length octet strings (missed passing |
This is a misleading callstack, since it misses the inlined call to the overload that didn't take |
@samdearden Do you mind if I use your file for a compat test going forward? |
@bartonjs Go ahead, its just a test file. |
This is fixed in master, and the fixed has merged into the release branch for the post-RC1 build. |
I am using EnvelopedCms in the 2.1 preview 2 to decrypt a file that was encrypted using BouncyCastle.
Using EnvelopedCms to decode & decrypt the file under Windows works without error.
Running the same code under Debian stretch (microsoft/dotnet:2.1.300-preview2-sdk-stretch docker image) on the call to EnvelopedCms.Decode I get the following error:
System.Security.Cryptography.CryptographicException: Unable to set field EncryptedContentInfo on type System.Security.Cryptography.Pkcs.Asn1.EnvelopedDataAsn. ---> System.Security.Cryptography.CryptographicException: Unable to set field EncryptedContent on type System.Security.Cryptography.Pkcs.Asn1.EncryptedContentInfoAsn. ---> System.Security.Cryptography.CryptographicException: ASN1 corrupted data.
I have attached the encrypted data and the full stack trace.
encrypted.zip
stack trace.txt
The text was updated successfully, but these errors were encountered: