Created
September 11, 2018 08:02
-
-
Save filipnavara/6ac04403ae4a2ab687d6440ca4388919 to your computer and use it in GitHub Desktop.
cms nosig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ContentInfo ci = new ContentInfo(new byte[1]); | |
SignedCms cms = new SignedCms(ci); | |
var cert = new System.Security.Cryptography.X509Certificates.X509Certificate2(@"C:\Users\Filip Navara\Documents\Certs\ica2.crt"); | |
CmsSigner signer = new CmsSigner(SubjectIdentifierType.NoSignature, cert); | |
signer.DigestAlgorithm = new Oid("2.16.840.1.101.3.4.2.1"); // SHA256 | |
cms.ComputeSignature(signer); | |
MIGbBgkqhkiG9w0BBwKggY0wgYoCAQExDzANBglghkgBZQMEAgEFADAQBgkqhkiG9w0BBwGgAwQBADFiMGACAQEwHDAXMRUwEwYDVQQDEwxEdW1teSBTaWduZXICAQAwDQYJYIZIAWUDBAIBBQAwDAYIKwYBBQUHBgIFAAQgbjQLnP+zepicpUTmu3gKLHiQHT+zNzh2hRGjBhevoB0= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment