Skip to content

Commit 3ec85df

Browse files
authored
Merge pull request #2016 from EPPlusSoftware/bug/issue2015-v8
Fixes issue 2015
2 parents 231e073 + b3ec106 commit 3ec85df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/EPPlus/Vba/Signatures/ProjectSignUtil.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ private static ContentInfo CreateContentInfo(byte[] hash, MemoryStream ms, EPPlu
8383
bw.Write(1);// format
8484
}
8585
bw.Write((byte)0x30); //Constructed Type (DigestInfo)
86-
bw.Write((byte)0x20); //Length DigestInfo
86+
bw.Write((byte)(hashAlgorithmBytes.Length + 6)); //Length DigestInfo
8787
bw.Write((byte)0x30); //Constructed Type (Algorithm)
88-
bw.Write((byte)(hashAlgorithmBytes.Length+7)); //length AlgorithmIdentifier
88+
bw.Write((byte)(hashAlgorithmBytes.Length + 2)); //length AlgorithmIdentifier
8989

90-
WriteOid(bw, hashAlgorithmBytes); //Hash Algorithem
90+
WriteOid(bw, hashAlgorithmBytes); //Hash Algorithm
9191

9292
bw.Write((byte)0x05); //Null type identifier
9393
bw.Write((byte)0x00); //Null length

0 commit comments

Comments
 (0)