<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>About stuff &#187; CERTENROLL</title>
	<atom:link href="http://dgiakoumakis.wordpress.com/tag/certenroll/feed/" rel="self" type="application/rss+xml" />
	<link>http://dgiakoumakis.wordpress.com</link>
	<description>Just another weblog for geeks...</description>
	<lastBuildDate>Fri, 18 Jan 2008 11:00:41 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dgiakoumakis.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5003c598556767e16f4ed095d37654ab?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>About stuff &#187; CERTENROLL</title>
		<link>http://dgiakoumakis.wordpress.com</link>
	</image>
			<item>
		<title>Certificate Web Request/Enrollment on Windows Vista/Server 2008</title>
		<link>http://dgiakoumakis.wordpress.com/2008/01/02/certificate-web-requestenrollment-on-windows-vistaserver-2008/</link>
		<comments>http://dgiakoumakis.wordpress.com/2008/01/02/certificate-web-requestenrollment-on-windows-vistaserver-2008/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 12:57:14 +0000</pubDate>
		<dc:creator>dgiakoumakis</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[CERTENROLL]]></category>
		<category><![CDATA[Certificate]]></category>
		<category><![CDATA[Enrollment]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Vista Longhorn]]></category>

		<guid isPermaLink="false">http://dgiakoumakis.wordpress.com/2008/01/02/certificate-web-requestenrollment-on-windows-vistaserver-2008/</guid>
		<description><![CDATA[I noticed recently while being part in the development of a web-banking system, that Windows Vista and Windows Server 2008 (Longhorn) are using a different resource DLL when it comes to certificate web enrollment. From a file point of view we have CERTENROLL.DLL on Vista &#38; Longhorn while previous versions of Windows use XENROLL.DLL. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dgiakoumakis.wordpress.com&blog=2430309&post=4&subd=dgiakoumakis&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="margin:0;">I noticed recently while being part in the development of a web-banking system, that Windows Vista and Windows Server 2008 (Longhorn) are using a different resource DLL when it comes to certificate web enrollment. From a file point of view we have CERTENROLL.DLL on Vista &amp; Longhorn while previous versions of Windows use XENROLL.DLL. The above means that any code previously written that uses XENROLL no longer works on Vista/Longhorn clients.</p>
<p class="MsoNormal" style="margin:0;">&nbsp;</p>
<p class="MsoNormal" style="margin:0;">It also means that the Windows 2000/2003 certificate authority web enrollment pages will not allow Vista and Longhorn clients to enroll a certificate. What you will have to do is replace your Windows 2003 CA web certificate pages with the ones from Longhorn. Those can be found in the <a href="http://www.microsoft.com/windowsserver2008/default.mspx">Longhorn beta</a> VHD provided by Microsoft. More information about this can be found <a href="http://support.microsoft.com/kb/922706">here</a>.</p>
<p class="MsoNormal" style="margin:0;">&nbsp;</p>
<p class="MsoNormal" style="margin:0;">Here is a javascript code example on how to use CERTENROLL.</p>
<p class="MsoNormal" style="margin:0;">&nbsp;</p>
<p class="MsoNormal" style="margin:0;"><span id="more-4"></span></p>
<p class="MsoNormal" style="margin:0;">&nbsp;</p>
<p> <code></code>&lt;%<br />
&#8216; Certificate Enrollment Example<br />
&#8216; Dimitris Giakoumakis 2007</p>
<p>&#8216; Browser detection. Use CertEnroll if Windows Longhorn/Vista<br />
Dim sBrowser</p>
<p>sBrowser = Request.ServerVariables(&#8220;HTTP_USER_AGENT&#8221;)<br />
If 0  InStr(sBrowser, &#8220;Windows NT&#8221;) Then<br />
numChar = InStr(Mid(sBrowser, InStr(sBrowser, &#8220;Windows NT&#8221;)+11), &#8220;.&#8221;)-1<br />
If CInt(Mid(sBrowser, InStr(sBrowser, &#8220;Windows NT&#8221;)+11,numChar)) &gt;= 6 Then<br />
bLongHorn = True<br />
End If<br />
End If</p>
<p>If bLongHorn = True Then<br />
%&gt;</p>
<p>// Distinguished name variables<br />
// for more RDN keys refer to http://msdn2.microsoft.com/en-us/library/aa377051.asp<br />
var sCN = &#8220;GR&#8221;; // Common name<br />
var sO = &#8220;Organisation&#8221;; // Organisation name<br />
var sOU = &#8220;OrganisationUnit&#8221;; // Organisational Unit<br />
var sL = &#8220;Locality&#8221;; // Locality<br />
var sS = &#8220;Attika&#8221;; // State<br />
var sC = &#8220;GR&#8221;; // Country<br />
var sCertificate = null;</p>
<p>sDistinguishedName = &#8220;c=&#8221; + sC + &#8220;;o=&#8221; + sO + &#8220;;ou=&#8221; + sOU + &#8220;;cn=&#8221; + &#8220;Dimitris Giakoumakis;&#8221;;</p>
<p>// Initialization of the ActiveX component<br />
var classFactory = new ActiveXObject(&#8220;X509Enrollment.CX509EnrollmentWebClassFactory&#8221;);</p>
<p>// Declaration of the objects<br />
var objEnroll = classFactory.CreateObject(&#8220;X509Enrollment.CX509Enrollment&#8221;);<br />
var objPrivateKey = classFactory.CreateObject(&#8220;X509Enrollment.CX509PrivateKey&#8221;);<br />
var objRequest = classFactory.CreateObject(&#8220;X509Enrollment.CX509CertificateRequestPkcs10&#8243;);<br />
var objDN = classFactory.CreateObject(&#8220;X509Enrollment.CX500DistinguishedName&#8221;);</p>
<p>// Specify the name of the cryptographic provider.<br />
objPrivateKey.ProviderName = &#8220;Microsoft Enhanced RSA and AES Cryptographic Provider&#8221;;</p>
<p>// X509PrivateKeyUsageFlags<br />
// Specify a value that identifies the specific purpose for which a private key can be used.<br />
//<br />
// typedef enum {<br />
// XCN_NCRYPT_ALLOW_USAGES_NONE = 0,<br />
// XCN_NCRYPT_ALLOW_DECRYPT_FLAG = 0&#215;1,<br />
// XCN_NCRYPT_ALLOW_SIGNING_FLAG = 0&#215;2,<br />
// XCN_NCRYPT_ALLOW_KEY_AGREEMENT_FLAG = 0&#215;4,<br />
// XCN_NCRYPT_ALLOW_ALL_USAGES = 0xffffff<br />
// } X509PrivateKeyUsageFlags;<br />
objPrivateKey.KeySpec = &#8220;1&#8243;;</p>
<p>// X509ProviderType<br />
// Specification of the cryptographic standards and algorithms<br />
//<br />
// typedef enum X509ProviderType {<br />
// XCN_PROV_NONE = 0,<br />
// XCN_PROV_RSA_FULL = 1,<br />
// XCN_PROV_RSA_SIG = 2,<br />
// XCN_PROV_DSS = 3,<br />
// XCN_PROV_FORTEZZA = 4,<br />
// XCN_PROV_MS_EXCHANGE = 5,<br />
// XCN_PROV_SSL = 6,<br />
// XCN_PROV_RSA_SCHANNEL = 12,<br />
// XCN_PROV_DSS_DH = 13,<br />
// XCN_PROV_EC_ECDSA_SIG = 14,<br />
// XCN_PROV_EC_ECNRA_SIG = 15,<br />
// XCN_PROV_EC_ECDSA_FULL = 16,<br />
// XCN_PROV_EC_ECNRA_FULL = 17,<br />
// XCN_PROV_DH_SCHANNEL = 18,<br />
// XCN_PROV_SPYRUS_LYNKS = 20,<br />
// XCN_PROV_RNG = 21,<br />
// XCN_PROV_INTEL_SEC = 22,<br />
// XCN_PROV_REPLACE_OWF = 23,<br />
// XCN_PROV_RSA_AES = 24<br />
// } X509ProviderType;<br />
objPrivateKey.ProviderType = &#8220;24&#8243;;</p>
<p>// Initialization of the certificate request by using an IX509PrivateKey (objPravateKey)<br />
objRequest.InitializeFromPrivateKey(1, objPrivateKey, &#8220;&#8221;);</p>
<p>// Initializing the X.500 distinguished name<br />
objDN.Encode(sDistinguishedName, 0);</p>
<p>// Specifing the X.500 distinguished name using the Subject property of IX509CertificateRequestPkcs10<br />
objRequest.Subject = objDN;</p>
<p>// Initializing the enrollment object (objEnroll) using the existing certificate request object.<br />
objEnroll.InitializeFromRequest(objRequest);</p>
<p>// Retrieving the encoded certificate request object<br />
sCertificate = objEnroll.CreateRequest(1);</p>
<p>document.write(sCertificate);</p>
<p class="MsoNormal">For more information refer to the <a href="http://msdn2.microsoft.com/en-us/library/aa374850.aspx" target="_blank">certificate enrollment API</a> at MSDN.</p>
<p class="MsoNormal">If you have any questions please feel free to post a comment.<span style="font-size:10pt;font-family:'Courier New';"><br />
</span><br />
<a href="http://www.addthis.com/bookmark.php" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" alt="AddThis Social Bookmark Button" border="0" height="16" width="125" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dgiakoumakis.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dgiakoumakis.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dgiakoumakis.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dgiakoumakis.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dgiakoumakis.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dgiakoumakis.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dgiakoumakis.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dgiakoumakis.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dgiakoumakis.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dgiakoumakis.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dgiakoumakis.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dgiakoumakis.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dgiakoumakis.wordpress.com&blog=2430309&post=4&subd=dgiakoumakis&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dgiakoumakis.wordpress.com/2008/01/02/certificate-web-requestenrollment-on-windows-vistaserver-2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4094d8d873228c9e0e2a13c222125b67?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dgiakoumakis</media:title>
		</media:content>

		<media:content url="http://s3.addthis.com/button1-bm.gif" medium="image">
			<media:title type="html">AddThis Social Bookmark Button</media:title>
		</media:content>
	</item>
	</channel>
</rss>