Skip to content

Commit

Permalink
2004-10-27 Sebastien Pouliot <sebastien@ximian.com>
Browse files Browse the repository at this point in the history
	* AuthenticodeFormatter.cs: Fix NullReferenceException from signcode
	tool when no URL is specified on the command line.

svn path=/branches/mono-1-0/mcs/; revision=35354
  • Loading branch information
Sebastien Pouliot committed Oct 27, 2004
1 parent 6a4e763 commit e544a1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -186,7 +186,14 @@ private byte[] Header (byte[] fileHash, string hashAlgorithm)

pkcs7.SignerInfo.Certificate = certs [0];
pkcs7.SignerInfo.Key = rsa;
pkcs7.SignerInfo.AuthenticatedAttributes.Add (Attribute (spcSpOpusInfo, Opus (description, url.ToString ())));

ASN1 opus = null;
if (url == null)
Attribute (spcSpOpusInfo, Opus (description, null));
else
Attribute (spcSpOpusInfo, Opus (description, url.ToString ()));
pkcs7.SignerInfo.AuthenticatedAttributes.Add (opus);

pkcs7.SignerInfo.AuthenticatedAttributes.Add (Attribute (contentType, ASN1Convert.FromOid (spcIndirectDataContext)));
pkcs7.SignerInfo.AuthenticatedAttributes.Add (Attribute (spcStatementType, new ASN1 (0x30, ASN1Convert.FromOid (commercialCodeSigning).GetBytes ())));

Expand Down
5 changes: 5 additions & 0 deletions mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog
@@ -1,3 +1,8 @@
2004-10-27 Sebastien Pouliot <sebastien@ximian.com>

* AuthenticodeFormatter.cs: Fix NullReferenceException from signcode
tool when no URL is specified on the command line.

2004-09-07 Sebastien Pouliot <sebastien@ximian.com>

* AuthenticodeBase.cs: Merge optimizations from HEAD.
Expand Down

0 comments on commit e544a1c

Please sign in to comment.