<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article How to Setup a SSL Certificate on a View Connection Server and Security Gateway in Horizon Documents</title>
    <link>https://communities.vmware.com/t5/Horizon-Documents/How-to-Setup-a-SSL-Certificate-on-a-View-Connection-Server-and/ta-p/2783832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;H2&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; &lt;/H2&gt;&lt;P&gt;Add this to the system path:&lt;/P&gt;&lt;P&gt;C:\Program Files\Vmware\Vmware View\Server\jre\bin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step2:&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't try and make the CSR yourself, just go to this site and have one auto created:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.digicert.com/easy-csr/keytool.htm"&gt;https://www.digicert.com/easy-csr/keytool.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should return a keytool command like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore star_gunnarberger_com.jks -dname "CN=*.gunnarberger.com,OU=Information Technology, O=GunnarBerger.com, L=Athens, ST=Georgia, C=US" &amp;amp;&amp;amp; keytool -certreq -alias server -file star_gunnarberger_com.csr -keystore star_gunnarberger_com.jks &amp;amp;&amp;amp; echo Your certificate signing request is in star_gunnarberger_com.csr.&amp;nbsp; Your keystore file is star_gunnarberger_com.jks. Thanks for using the DigiCert keytool CSR helper.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The keytool command I used above was for a wildcard cert so it was *.gunnarberger.com, had I wanted view.gunnarberger.com the tool would have been different (I just wanted to explain why my example has a astrick in it). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you execute this command you will have to type in a password for this file 3 or 4 times.&amp;nbsp; For simplicity just keep the password the same throughout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The command you just issued is going to give you a CSR file and a JKS (Java Keystore).&amp;nbsp; I put both of these files into a directory on the root of my hard drive. &lt;STRONG&gt;C:\cert&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step 3: &lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll need to go to your CA of your choice and upload the CSR.&amp;nbsp; I used &lt;A href="http://www.rapidssl.com/"&gt;http://www.rapidssl.com/&lt;/A&gt; because its cheap and I'm cheap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All CAs have different steps you have to take before they will generate a cert.&amp;nbsp; The more expensive the cert, the longer it takes (becuase it means that did more to make sure you are you.)&amp;nbsp; With RapidSSL, it took about 15 minutes, so they probably aren't the best CA in the world.&amp;nbsp; Eventually they will email you a link to download your cert which you will need to make sure and download this in &lt;STRONG&gt;PKCS7 &lt;/STRONG&gt;format or (.p7s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I you should have a file called &lt;STRONG&gt;&amp;lt;filename&amp;gt;.p7s&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I go right ahead and drop that file to the same &lt;STRONG&gt;C:\cert&lt;/STRONG&gt; directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the C:\cert directory you should now have three files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;filename&amp;gt;.cer&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;filename&amp;gt;.p7s&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;STRONG&gt;Step 4:&lt;/STRONG&gt;&lt;/H2&gt;&lt;P&gt;Now that you have all three of these you need to execute the following command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; keytool -import -alias server -trustcacerts -file &amp;lt;filename&amp;gt;.p7s -keystore &amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a screen shot of me executing this command.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper" image-alt="Capture.JPG"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/35886i7BD955F7F5591784/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you don't get "Certificate reply was installed in keystore" I don't know what to tell you, call someone.&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step 5:&lt;/H2&gt;&lt;P&gt;Finally, we need to get the View Connection Server to actually use the cert we just added to TomCat.&amp;nbsp; Thankfully this is pretty easy.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Copy the &lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; file into the following directory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Program Files\Vmware\VMware View\Server\sslgateway\conf\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step 6:&lt;/H2&gt;&lt;P&gt;While you are in that directory use notepad to create a new file that is called locked.properties&lt;/P&gt;&lt;P&gt;Inside that file put the following (again using notepad)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;keyfile=&amp;lt;name of keyfile&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV id="_mcePaste"&gt;&lt;STRONG&gt;keypass=&amp;lt;password&amp;gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;STRONG&gt;storetype=jks&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;H2&gt;Step 7: &lt;/H2&gt;&lt;DIV&gt;Restart the &lt;STRONG&gt;VMware View Connection Server &lt;/STRONG&gt;Service&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;H2&gt;Troubleshoot:&lt;/H2&gt;&lt;DIV&gt;It takes a few minutes for this to come back, even after the service says it is up.&amp;nbsp; It always takes just enough time for me to freak out and think I broke something.&amp;nbsp; So to ease my mind I learned to just look at the log file, so go ahead and open the following directory:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;C:\ProgramData\VMware\VDM\logs\&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Inside that directory you will find a log file called, &lt;STRONG&gt;log-&amp;lt;DATE&amp;gt;.txt&lt;/STRONG&gt; look for todays date.&amp;nbsp; Open that file and go to the very bottom.&amp;nbsp; Also, you can just search for "SSL" that tends to bring you to the line you are lookig for.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;11:41:00,292 INFO&amp;nbsp; &amp;lt;Thread-1&amp;gt; [m] The Secure Gateway Server is using SSL certificate store &lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; with password of 8 characters &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;NOTE: If you don't see your jks file but instead see &lt;STRONG&gt;vdm.p12&lt;/STRONG&gt;, then it didn't work, this is the default certificate.&amp;nbsp; I had this happen on a couple servers and I ended up just rebooting the server and after the reboot it worked... no idea why, its Windows what more can I say.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;H2&gt;Additional Server:&lt;/H2&gt;&lt;DIV&gt;So you have more than one server to do, well good news, all you have to do is take the &lt;STRONG&gt;locked.propertie&lt;/STRONG&gt;s file and the &lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; file and copy them to the new server.&amp;nbsp; Start at &lt;STRONG&gt;Step 5&lt;/STRONG&gt; above and work your way down.&amp;nbsp; You can repeat this over and over, if you use a wildcard cert at least, or if you are sharing a name like view.domain.com in your cert and just want to have that on each server.&amp;nbsp; Just make sure your DNS is setup correctly and you should be good.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jan 2012 22:21:32 GMT</pubDate>
    <dc:creator>gunnarb</dc:creator>
    <dc:date>2012-01-12T22:21:32Z</dc:date>
    <item>
      <title>How to Setup a SSL Certificate on a View Connection Server and Security Gateway</title>
      <link>https://communities.vmware.com/t5/Horizon-Documents/How-to-Setup-a-SSL-Certificate-on-a-View-Connection-Server-and/ta-p/2783832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;H2&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; &lt;/H2&gt;&lt;P&gt;Add this to the system path:&lt;/P&gt;&lt;P&gt;C:\Program Files\Vmware\Vmware View\Server\jre\bin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step2:&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't try and make the CSR yourself, just go to this site and have one auto created:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.digicert.com/easy-csr/keytool.htm"&gt;https://www.digicert.com/easy-csr/keytool.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should return a keytool command like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore star_gunnarberger_com.jks -dname "CN=*.gunnarberger.com,OU=Information Technology, O=GunnarBerger.com, L=Athens, ST=Georgia, C=US" &amp;amp;&amp;amp; keytool -certreq -alias server -file star_gunnarberger_com.csr -keystore star_gunnarberger_com.jks &amp;amp;&amp;amp; echo Your certificate signing request is in star_gunnarberger_com.csr.&amp;nbsp; Your keystore file is star_gunnarberger_com.jks. Thanks for using the DigiCert keytool CSR helper.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The keytool command I used above was for a wildcard cert so it was *.gunnarberger.com, had I wanted view.gunnarberger.com the tool would have been different (I just wanted to explain why my example has a astrick in it). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you execute this command you will have to type in a password for this file 3 or 4 times.&amp;nbsp; For simplicity just keep the password the same throughout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The command you just issued is going to give you a CSR file and a JKS (Java Keystore).&amp;nbsp; I put both of these files into a directory on the root of my hard drive. &lt;STRONG&gt;C:\cert&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step 3: &lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll need to go to your CA of your choice and upload the CSR.&amp;nbsp; I used &lt;A href="http://www.rapidssl.com/"&gt;http://www.rapidssl.com/&lt;/A&gt; because its cheap and I'm cheap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All CAs have different steps you have to take before they will generate a cert.&amp;nbsp; The more expensive the cert, the longer it takes (becuase it means that did more to make sure you are you.)&amp;nbsp; With RapidSSL, it took about 15 minutes, so they probably aren't the best CA in the world.&amp;nbsp; Eventually they will email you a link to download your cert which you will need to make sure and download this in &lt;STRONG&gt;PKCS7 &lt;/STRONG&gt;format or (.p7s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I you should have a file called &lt;STRONG&gt;&amp;lt;filename&amp;gt;.p7s&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I go right ahead and drop that file to the same &lt;STRONG&gt;C:\cert&lt;/STRONG&gt; directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the C:\cert directory you should now have three files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;filename&amp;gt;.cer&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;filename&amp;gt;.p7s&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;STRONG&gt;Step 4:&lt;/STRONG&gt;&lt;/H2&gt;&lt;P&gt;Now that you have all three of these you need to execute the following command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; keytool -import -alias server -trustcacerts -file &amp;lt;filename&amp;gt;.p7s -keystore &amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a screen shot of me executing this command.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper" image-alt="Capture.JPG"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/35886i7BD955F7F5591784/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you don't get "Certificate reply was installed in keystore" I don't know what to tell you, call someone.&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step 5:&lt;/H2&gt;&lt;P&gt;Finally, we need to get the View Connection Server to actually use the cert we just added to TomCat.&amp;nbsp; Thankfully this is pretty easy.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Copy the &lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; file into the following directory:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Program Files\Vmware\VMware View\Server\sslgateway\conf\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Step 6:&lt;/H2&gt;&lt;P&gt;While you are in that directory use notepad to create a new file that is called locked.properties&lt;/P&gt;&lt;P&gt;Inside that file put the following (again using notepad)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;keyfile=&amp;lt;name of keyfile&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV id="_mcePaste"&gt;&lt;STRONG&gt;keypass=&amp;lt;password&amp;gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;STRONG&gt;storetype=jks&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;H2&gt;Step 7: &lt;/H2&gt;&lt;DIV&gt;Restart the &lt;STRONG&gt;VMware View Connection Server &lt;/STRONG&gt;Service&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;H2&gt;Troubleshoot:&lt;/H2&gt;&lt;DIV&gt;It takes a few minutes for this to come back, even after the service says it is up.&amp;nbsp; It always takes just enough time for me to freak out and think I broke something.&amp;nbsp; So to ease my mind I learned to just look at the log file, so go ahead and open the following directory:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;C:\ProgramData\VMware\VDM\logs\&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Inside that directory you will find a log file called, &lt;STRONG&gt;log-&amp;lt;DATE&amp;gt;.txt&lt;/STRONG&gt; look for todays date.&amp;nbsp; Open that file and go to the very bottom.&amp;nbsp; Also, you can just search for "SSL" that tends to bring you to the line you are lookig for.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;11:41:00,292 INFO&amp;nbsp; &amp;lt;Thread-1&amp;gt; [m] The Secure Gateway Server is using SSL certificate store &lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; with password of 8 characters &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;NOTE: If you don't see your jks file but instead see &lt;STRONG&gt;vdm.p12&lt;/STRONG&gt;, then it didn't work, this is the default certificate.&amp;nbsp; I had this happen on a couple servers and I ended up just rebooting the server and after the reboot it worked... no idea why, its Windows what more can I say.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;H2&gt;Additional Server:&lt;/H2&gt;&lt;DIV&gt;So you have more than one server to do, well good news, all you have to do is take the &lt;STRONG&gt;locked.propertie&lt;/STRONG&gt;s file and the &lt;STRONG&gt;&amp;lt;filename&amp;gt;.jks&lt;/STRONG&gt; file and copy them to the new server.&amp;nbsp; Start at &lt;STRONG&gt;Step 5&lt;/STRONG&gt; above and work your way down.&amp;nbsp; You can repeat this over and over, if you use a wildcard cert at least, or if you are sharing a name like view.domain.com in your cert and just want to have that on each server.&amp;nbsp; Just make sure your DNS is setup correctly and you should be good.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 22:21:32 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Horizon-Documents/How-to-Setup-a-SSL-Certificate-on-a-View-Connection-Server-and/ta-p/2783832</guid>
      <dc:creator>gunnarb</dc:creator>
      <dc:date>2012-01-12T22:21:32Z</dc:date>
    </item>
  </channel>
</rss>

