File tree Expand file tree Collapse file tree 5 files changed +28
-0
lines changed Expand file tree Collapse file tree 5 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 7596
7596
RelPath = " test\data\cms\sigs\PSSSignDataSHA512Enc.sig"
7597
7597
BuildAction = " EmbeddedResource"
7598
7598
/>
7599
+ <File
7600
+ RelPath = " test\data\cms\sigs\rawsha256nonull.p7m"
7601
+ BuildAction = " EmbeddedResource"
7602
+ />
7603
+ <File
7604
+ RelPath = " test\data\cms\sigs\SignedMSPkcs7.sig"
7605
+ BuildAction = " EmbeddedResource"
7606
+ />
7599
7607
<File
7600
7608
RelPath = " test\data\crypto\SHA3TestVectors.txt"
7601
7609
BuildAction = " EmbeddedResource"
Original file line number Diff line number Diff line change 1046
1046
<EmbeddedResource Include =" data\cms\sigs\PSSSignDataSHA512.sig" />
1047
1047
<EmbeddedResource Include =" data\cms\sigs\PSSSignDataSHA512Enc.sig" />
1048
1048
<EmbeddedResource Include =" data\cms\sigs\counterSig.p7m" />
1049
+ <EmbeddedResource Include =" data\cms\sigs\rawsha256nonull.p7m" />
1050
+ <EmbeddedResource Include =" data\cms\sigs\SignedMSPkcs7.sig" />
1049
1051
<EmbeddedResource Include =" data\hc256\hc128\ecrypt_HC-128.txt" />
1050
1052
<EmbeddedResource Include =" data\hc256\hc256\ecrypt_HC-256_128K_128IV.txt" />
1051
1053
<EmbeddedResource Include =" data\hc256\hc256\ecrypt_HC-256_128K_256IV.txt" />
Original file line number Diff line number Diff line change @@ -672,6 +672,24 @@ public void TestSha1WithRsaAndAttributeTable()
672
672
VerifySignatures ( s , hash ) ;
673
673
}
674
674
675
+ [ Test ]
676
+ public void TestRawSha256MissingNull ( )
677
+ {
678
+ byte [ ] document = GetInput ( "rawsha256nonull.p7m" ) ;
679
+
680
+ CmsSignedData s = new CmsSignedData ( document ) ;
681
+
682
+ IX509Store certStore = s . GetCertificates ( "Collection" ) ;
683
+ foreach ( SignerInformation signerInformation in s . GetSignerInfos ( ) . GetSigners ( ) )
684
+ {
685
+ ICollection certCollection = certStore . GetMatches ( signerInformation . SignerID ) ;
686
+ foreach ( X509Certificate cert in certCollection )
687
+ {
688
+ Assert . IsTrue ( signerInformation . Verify ( cert ) , "raw sig failed" ) ;
689
+ }
690
+ }
691
+ }
692
+
675
693
[ Test ]
676
694
public void TestSha1WithRsaEncapsulated ( )
677
695
{
You can’t perform that action at this time.
0 commit comments