<?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>nlsimmons.com &#187; SSL</title>
	<atom:link href="http://nlsimmons.com/?feed=rss2&#038;tag=ssl" rel="self" type="application/rss+xml" />
	<link>http://nlsimmons.com</link>
	<description>Professional Blog &#38; Online Resume</description>
	<lastBuildDate>Wed, 10 Jun 2015 15:02:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>Configure SSL for SQL Server Reporting Services 2012</title>
		<link>http://nlsimmons.com/?p=259</link>
		<comments>http://nlsimmons.com/?p=259#comments</comments>
		<pubDate>Fri, 09 Aug 2013 21:16:46 +0000</pubDate>
		<dc:creator><![CDATA[]]></dc:creator>
				<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[Certificates]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://nlsimmons.com/SQLScraps/?p=259</guid>
		<description><![CDATA[In this brief post I will show you how I created a self-signed certificate to be used when configuring SSRS&#8230;]]></description>
				<content:encoded><![CDATA[<p>In this brief post I will show you how I created a self-signed certificate to be used when configuring SSRS 2012 over SSL port 443. <span id="more-259"></span></p>
<h3>Procedure</h3>
<p>First you&#8217;re going to need to get <b>makecert.exe</b> and <b>pvk2pfx.exe</b>. Both of these utilities can be downloaded from Microsoft as part of the Windows Driver Kit. I put these utilities on the server on which I was configuring Reporting Services.</p>
<p>Before beginning, you can use the following command (cmd window) to see if there are any SSL Certificate bindings already present:</p>
<pre>netsh http show sslcert</pre>
<p><br/><br />
If there aren&#8217;t any, you should see output like this:<br />
<img src="http://nlsimmons.com/SQLScraps/wp-content/uploads/2013/08/netsh_initial.png" alt="netsh_initial" width="676" height="339" class="alignnone size-full wp-image-1059" align="center"/></p>
<p>So, on the the Reporting Services server:</p>
<p> 1. Open a command prompt, being sure to run as Administrator<br />
 2. Run makecert.exe as admin, specifying the certificate and private key filenames.  </p>
<pre>makecert -r -pe -n "CN=<SSRS Server>" -eku 1.3.6.1.5.5.7.3.1 -sr localmachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -sv "<Private Key filename>.pvk"  "<Certificate filename>.cer"</pre>
<p><br/><br />
You will need to specify a password for the Private Key:<br/><br />
<img src="http://nlsimmons.com/SQLScraps/wp-content/uploads/2013/08/pk_password.png" alt="pk_password" width="354" height="245" class="alignnone size-full wp-image-1060" align="center" /><br />
 3. Create a PFX file using pvk2pfx.exe, again in the cmd window running as Administrator:</p>
<pre>
"pvk2pfx.exe" -pvk "&lt;Private Key filename&gt;.pvk" -spc "&lt;Certificate filename&gt;.cer" -pfx "&lt;.pfx filename&gt;.pfx" -po "&lt;password used in the above step&gt;"
</pre>
<p><br/><br />
 4. Run MMC from the Start Menu -&gt; Run<br />
 5. Go to File -&gt; Add/Remove Snap-in<br />
 6. Choose &#8220;Computer Account&#8221; -&gt; Next<br />
 7. Make sure &#8220;Local Computer: (the computer this console is running on)&#8221; is checked<br />
 8. Expand Trusted Root Certification Authorities on left<br />
 9. Right click Certificates -&gt; All Tasks -&gt; Import<br />
10. Select PFX file created above<br />
11. Enter password and check &#8220;mark this key as exportable.&#8221;<br />
12. Be sure cert is going into the certificate store &#8220;Trusted Root Certification Authorities&#8221;<br />
13. Repeat steps 8-12, using the &#8220;Personal&#8221; folder instead of &#8220;Trusted Root Certification Authorities&#8221;<br />
14. Open up Reporting Services Configuration Manager and connect to the instance for which the SSL cert will be used<br />
15. Navigate to the Web Service URL portion of the manager<br />
16. Click on Advanced<br />
17. Remove HTTP identities<br />
18. Add the SSL Identity by clicking Add and selecting the certificate imported earlier<br />
19. Choose the correct SSL port and IP Addresses and click Ok<br />
20. Do steps 16-19 in the Report Manager URL</p>
<p>That&#8217;s it!  Now you should be able to run netsh again and get output similar to this:<br />
<img src="http://nlsimmons.com/SQLScraps/wp-content/uploads/2013/08/netsh_complete.png" alt="netsh_complete" width="676" height="340" class="alignnone size-full wp-image-1058" align="center"/></p>
<h3>Problems, Pitfalls, and Errors</h3>
<p>I struggled with setting this up, no thanks to some of the errors I was getting. Here&#8217;s one of my favorites, thrown during the CreateSSLCertificateBinding method: &#8220;An unknown error has occurred in the WMI Provider. Error Code 80070520 &#8212;&gt; System.Runtime.InteropServices.COMException (0x80070520): A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520)&#8221;</p>
<p><img alt="An unknown error has occurred in the WMI Provider. Error Code 80070520 ---&gt; System.Runtime.InteropServices.COMException (0x80070520): A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520)" src="http://nlsimmons.com/SQLScraps/wp-content/uploads/2013/08/ssl_error.jpg" align="center" /><br />
<br/><br />
You get this error when your certificate isn&#8217;t quite set up correctly. This is a real pain, considering makecert will happily create a certificate that SSRS cannot subsequently use. So, even though you get a certificate that can be imported via the Certificates snap-in for MMC and that shows up in SSRS Configuration Manager, SSRS cannot actually bind the SSL certificate!</p>
]]></content:encoded>
			<wfw:commentRss>http://nlsimmons.com/?feed=rss2&#038;p=259</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
