<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>things &#38; stuff &#187; Authenticode</title>
	<atom:link href="http://www.curlybrace.com/words/category/technology/authenticode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.curlybrace.com/words</link>
	<description>Pictures.  Now with more words!</description>
	<lastBuildDate>Mon, 05 Jul 2010 21:47:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Demise of CAPICOM</title>
		<link>http://www.curlybrace.com/words/2008/10/15/the-demise-of-capicom/</link>
		<comments>http://www.curlybrace.com/words/2008/10/15/the-demise-of-capicom/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 06:43:01 +0000</pubDate>
		<dc:creator>Jeff Fitzsimons</dc:creator>
				<category><![CDATA[Authenticode]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[CAPICOM]]></category>
		<category><![CDATA[code signing]]></category>

		<guid isPermaLink="false">http://www.curlybrace.com/words/?p=266</guid>
		<description><![CDATA[CAPICOM, a COM-based wrapper for the CryptoAPI library, is deprecated and on its way out. However, Microsoft has no time line for phasing it out, nor have they provided sufficient documentation of alternatives. Many CAPICOM pages contain a confusing, bright-red header along the lines of: [The SignedCode object is available for use in the operating [...]]]></description>
			<content:encoded><![CDATA[<p>CAPICOM, a COM-based wrapper for the CryptoAPI library, is deprecated and on its way out.  However, Microsoft has no time line for phasing it out, nor have they provided sufficient documentation of alternatives.</p>
<p>Many CAPICOM pages contain a confusing, bright-red header along the lines of:</p>
<blockquote><p><span style="color:#FF0000">[The SignedCode object is available for use in the operating systems listed in the Requirements section. Instead, use Platform Invocation Services (PInvoke) to call the Win32 API SignerSignEx, SignerTimeStampEx, and WinVerifyTrust functions to sign content with an Authenticode digital signature. For information about PInvoke, see Platform Invoke Tutorial. The .NET and CryptoAPI via P/Invoke: Part 1 and .NET and CryptoAPI via P/Invoke: Part 2 subsections of Extending .NET Cryptography with CAPICOM and P/Invoke may also be helpful.]</span></p></blockquote>
<p>Note that this alarming paragraph seems to begin by simply telling you that this API is supported on the operating systems listed later.  It does <b>not</b> state that the API will not be available on later OSes, but <i>why</i> place this here otherwise?  The next sentence, beginning with, &#8220;Instead, &#8230;&#8221; seems to be contrasting with something, yet makes absolutely no sense in this context.</p>
<p>Finally, this paragraph instructs us to investigate <a href="http://msdn.microsoft.com/en-us/library/aa387734(VS.85).aspx">SignerSignEx</a>, and <a href="http://msdn.microsoft.com/en-us/library/cc300159(VS.85).aspx">SignerTimeStampEx</a>, which are supplied by the mssign32.dll, have no header file, and absolutely no example code.  This is what I find most irksome, they document each and every function and structure, yet each page says, &#8220;there is no header file, so copy and paste the declaration given here.&#8221;  Well, why not simply provide an mssign.h file on blogs.msdn, or similar?  And why, oh why, is there not a single line of sample code?</p>
<h3>Follow-up</h3>
<p>I have provided a basic header file for mssign32.dll, <a href="http://www.curlybrace.com/words/?p=271">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curlybrace.com/words/2008/10/15/the-demise-of-capicom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stripping an Authenticode Signature</title>
		<link>http://www.curlybrace.com/words/2008/09/12/stripping-an-authenticode-signature/</link>
		<comments>http://www.curlybrace.com/words/2008/09/12/stripping-an-authenticode-signature/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 21:39:25 +0000</pubDate>
		<dc:creator>Jeff Fitzsimons</dc:creator>
				<category><![CDATA[Authenticode]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.curlybrace.com/words/?p=297</guid>
		<description><![CDATA[We needed to modify the resources of an installer and then apply an Authenticode signature. Unfortunately, it already had a signature on it, and modifying the resources of an executable with a signature results in a corrupted signature. The Microsoft signing tools cannot recover from this situation, so: It is not possible to re-sign a [...]]]></description>
			<content:encoded><![CDATA[<p>We needed to modify the resources of an installer and then apply an Authenticode signature.  Unfortunately, it already had a signature on it, and modifying the resources of an executable with a signature results in a corrupted signature.  The Microsoft signing tools cannot recover from this situation, so:</p>
<blockquote><p><b>It is not possible to re-sign a file after modifying its resources.</b></p></blockquote>
<p>However, it is possible to remove the existing signature, modify the binary, and then apply a new signature.  There are two approaches (which almost certainly amount to the same thing):</p>
<ol>
<li />Use delcert.exe from the <a href="http://forum.xda-developers.com/showthread.php?p=2508061">this XDA Forum post</a> (note, this is <b>not</b> the same as the <a href="http://technet.microsoft.com/en-us/sms/bb676787.aspx">SMS Server 2003</a> tool ccmdelcert.exe, which deletes all SMS certificates on a machine).
<li />Write an application which calls <a href="http://msdn.microsoft.com/en-us/library/ms680214(VS.85).aspx">ImageRemoveCertificate</a>.
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.curlybrace.com/words/2008/09/12/stripping-an-authenticode-signature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mssign32.dll</title>
		<link>http://www.curlybrace.com/words/2008/09/11/mssign32dll/</link>
		<comments>http://www.curlybrace.com/words/2008/09/11/mssign32dll/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 02:48:19 +0000</pubDate>
		<dc:creator>Jeff Fitzsimons</dc:creator>
				<category><![CDATA[Authenticode]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.curlybrace.com/words/?p=271</guid>
		<description><![CDATA[With CAPICOM deprecated, MSDN suggests using the mssign32.dll functions. There are two fundamental problems with this: No example code whatsoever is provided. No header file is provided. Well, at least I can do something about #2. Here is a minimal version of a header file for mssign32.dll. It includes direct function declarations, as well as [...]]]></description>
			<content:encoded><![CDATA[<p>With CAPICOM deprecated, MSDN suggests using the mssign32.dll functions.  There are two fundamental problems with this:</p>
<ol>
<li />No example code whatsoever is provided.
<li />No header file is provided.
</ol>
<p>Well, at least I can do <b>something</b> about #2.  <a href="http://www.curlybrace.com/projects/Authenticode/mssign32.h">Here is a minimal version of a header file for mssign32.dll</a>.  It includes direct function declarations, as well as function pointer typedefs.</p>
<p>The function pointers can be used with <tt>LoadLibrary</tt>/<tt>GetProcAddress</tt> to dynamically call the functions, as in:</p>
<blockquote><pre>SignerSignPtr pSignerSign =
    (SignerSignPtr)GetProcAddress(hModule, "SignerSign");</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.curlybrace.com/words/2008/09/11/mssign32dll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
