<?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>BLOGS@DiGiTSS &#187; OpenSSL</title>
	<atom:link href="http://blogs.digitss.com/category/apache/openssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitss.com</link>
	<description>DiGiTSS Team&#039;s Programming experience with PHP, MySQL, Ajax, Javascript, jQuery, C# and Microsoft technologies</description>
	<lastBuildDate>Sat, 13 Aug 2011 06:26:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Generating 2048-bit CSR with OpenSSL</title>
		<link>http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/</link>
		<comments>http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 13:37:27 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[csr]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=321</guid>
		<description><![CDATA[As computer processing power is increasing everyday, so breaking 1024-bit private key algorithms will be possible by 2011. So we will need to generate minimum 2048-bit RSA Private Keys for new SSL Certificates or renewals.]]></description>
			<content:encoded><![CDATA[<p>As computer processing power is increasing everyday, so breaking 1024-bit private key algorithms will be possible by 2011. So we will need to generate minimum <strong>2048-bit RSA Private Keys</strong> for new <strong>SSL Certificates</strong> or renewals.</p>
<p>I have recently faced similar case while I had given older CSR which I gave last year for the renewal to GoDaddy and it didn't worked due to security reasons.</p>
<p>We need to simply regenerate <strong>Private Key</strong> and <strong>CSR</strong> with the help of following <strong>OpenSSL</strong> command:</p>
<pre class="apache"> openssl req -nodes -newkey rsa:<span style="color: #ff0000;">2048</span> -keyout new-digitss.key -out new-digitss.csr</pre>
<p>This will generate 2048-bit key file and after that it will ask few basic information about the entity being certified. <strong>Private Key</strong> file generated with above command won't have secret pass-phrase so it won't be a problem deploying them on Windows based Apache server setups or either on Linux platforms. But if you really want to have pass-phrase then please refer to a <a title="How to generate Certificate Signing Request (CSR) file with Apache OpenSSL" href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" target="_self">previous post</a> and replace it with <strong>2048</strong> or <strong>4096</strong> instead of <strong>1024</strong> which is being used in commands or just remove the "-nodes" from the above command which will ask for a pass-phrase.</p>
<p>Removing the "-nodes" option from the above mentioned <strong>openssl</strong> command will ask for a pass-phrase and encrypt the private key. This can increase security, but please note that the pass-phrase will be required each time Apache is started. In that case you need to get a un-secure private key for your Windows based Apache setup. It is as simple as writing following line of command on <strong>OpenSSL</strong>.</p>
<pre class="apache"> rsa -in digitss.key -out unsecured.digitss.key</pre>
<p>Above <strong>OpenSSL</strong> command will give unsecured private key which will have pass-phrase removed and so can be used with <strong>Windows based Apache setups</strong>.</p>
<p><span style="text-decoration: underline;">More References:</span></p>
<p>For more detailed information on CSR generation please refer following post: (Just use 2048 or 4096 instead of 1024 to make it work)<br />
<a title="How to generate Certificate Signing Request (CSR) file with Apache OpenSSL" href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" target="_self">http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/</a></p>
<p>See GoDaddy Help for detailed reason on: <a title="Why does my CSR need to be 2048 bit length?" href="http://help.godaddy.com/article/5619" target="_blank">Why does my CSR need to be 2048 bit length?</a></p>
<p>CSR Generation Instructions for Rest of the Web-Servers: <a title="Certificate Signing Request (CSR) Generation Instructions" href="http://help.godaddy.com/topic/746/article/5343" target="_blank">Certificate Signing Request (CSR) Generation Instructions</a><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/installing-apache-on-windows-2008/" rel="bookmark" title="December 6, 2009">Installing Apache on Windows 2008</a></li>
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
</ul>
<p><!-- Similar Posts took 17.094 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RSA server certificate CommonName (CN) does NOT match server name!?</title>
		<link>http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/</link>
		<comments>http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 18:32:16 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=245</guid>
		<description><![CDATA[SSL Library Error: 185073780 error:0B080074:x509 certificate]]></description>
			<content:encoded><![CDATA[<p><strong>Problem installing SSL certificate: SSL Library Error: 185073780 error:0B080074:x509 certificate </strong></p>
<p>While configuring SSL for one of my Client I got this error and it took me little while to figure it out that what went wrong with the configuration. Initially I thought that there must be something wrong with the generated certificate as I have generated CSR myself and given it to client and client gave back me Certificate files.</p>
<p>But I was wrong as I was using LogMeIn to connect to the client's Windows 2003 Web-Server and using remote clipboard (Copy+Paste). Something went wrong while pasting that file on the remote Web server. So I transferred files directly and then it worked well without any problem.</p>
<blockquote><p>
[Mon Jun 01 03:22:49 2009] [warn] RSA server certificate CommonName (CN) `portal.client.com' does NOT match server name!?<br />
[Mon Jun 01 03:22:49 2009] [error] Unable to configure RSA server private key<br />
[Mon Jun 01 03:22:49 2009] [error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
</p></blockquote>
<p>Reference URL that helped me find the answer is below:</p>
<p>http://www.howtoforge.com/forums/showthread.php?t=22493</p>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/" rel="bookmark" title="December 6, 2009">Generating 2048-bit CSR with OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/browsers/this-download-has-been-blocked-by-your-security-zone-policy/" rel="bookmark" title="October 25, 2008">This download has been blocked by your security zone policy</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
<li><a href="http://blogs.digitss.com/virtualization/vmware-workstation-this-virtual-machine-appears-to-be-in-use/" rel="bookmark" title="October 10, 2009">VMWare Workstation: This virtual machine appears to be in use.</a></li>
</ul>
<p><!-- Similar Posts took 60.632 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</title>
		<link>http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/</link>
		<comments>http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 19:57:46 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[csr]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-files-with-apache-openssl/</guid>
		<description><![CDATA[When it comes to use SSL over apache, OpenSSL is there for us to do everything we want. XAMPP and WAMP both comes with OpenSSL compiled version of Apache, so it becomes quite handy to use it. But how to get SSL certificate for your website?For getting SSL certificate you need to ask your hosting [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to use SSL over apache, OpenSSL is there for us to do everything we want. <a title="XAMPP" href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> and <a title="WampServer" href="http://www.wampserver.com/en/" target="_blank">WAMP</a> both comes with OpenSSL compiled version of Apache, so it becomes quite handy to use it. But how to get SSL certificate for your website?For getting SSL certificate you need to ask your hosting company if you are running on shared server and don't have access to apache installation directory and config files. Most of the hosting companies will do this for you with some amount of fee. Fee/cost depends on the kind of certificate you are requesting and for the period of time. For example www.domain.com certificates will be quite cheaper then *.domain.com.</p>
<p>Now if you are running and managing your own webserver and you have to get certificate(s) for your company/client or your own website then first requirement is to generate "Certificate Signing Request" - CSR file, which you need to send to Certificate Authority to sign and give back to you as CRT file. This tutorial is not meant for Apache expert but for those who have not much experience SSL and Apache stuff.</p>
<p>Generation of CSR files with Apache on OpenSSL is quite simple and it is matter of typing few commands and we are done. You need to follow similar commands on OpenSSL prompt whether you are running Apache over Windows or Linux. Here is the routine which we need to follow to get our .CSR file ready.</p>
<p>If you have your Apache setup ready with OpenSSL then goto BIN directory under your Apache's installation directory. If you are on Windows machine then it could be under D:\Program Files\Apache\bin and if it is Linux you know better where to find it. Open Command Prompt and goto Apache's BIN directory and then type "openssl" over there. You will get OpenSSL prompt immediately. You may need not to goto Apache/Bin directory if that path is set in your system variables, you can just type openssl and you will get the prompt like below.<span id="more-63"></span><br />
<img src="http://blogs.digitss.com/wp-content/uploads/2008/04/openssl_prompt.PNG" alt="OpenSSL Prompt" /><br />
<!--adsense--><br />
Now, first of all we need to generate RSA Private key for our server. This key will be Triple-DES encrypted and PEM formatted.  Type in following command to get encrypted private key on OpenSSL prompt.</p>
<pre class="apache">OpenSSL genrsa -des3 -out digitss.key <span style="color: #ff0000;">1024</span></pre>
<p>You can keep it my_server.key or something like that. Once you type in above command it will ask for pass-phrase, please keep a note of that pass-phrase at some secure place. Also, take backup of your private key file at some secure place. Here is the screen-shot(s) visualizing above command over windows command-line.</p>
<p><img src="http://blogs.digitss.com/wp-content/uploads/2008/04/private_key.PNG" alt="Generate Priavat Key" /><br />
<!--adsense--><br />
If you will try to see contents of that file it would look something similar to what I have got here.<br />
<img src="http://blogs.digitss.com/wp-content/uploads/2008/04/priavate_key_contents.PNG" alt="Priavate Key contents" /><br />
<!--adsense--><br />
To see something which is more readable type in following line and it will ask you pass-phrase which you previously specified.</p>
<pre class="apache">OpenSSL rsa -noout -text -in digitss.key
Enter pass phrase for digitss.key:
Private-Key: <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">1024</span> bit<span style="color: #66cc66;">&#41;</span>
modulus:
<span style="color: #ff0000;">00</span>:c6:<span style="color: #ff0000;">54</span>:<span style="color: #ff0000;">39</span>:f5:c5:ae:5a:ef:f5:<span style="color: #ff0000;">53</span>:9c:<span style="color: #ff0000;">13</span>:c9:<span style="color: #ff0000;">86</span>:
<span style="color: #ff0000;">27</span>:c5:<span style="color: #ff0000;">19</span>:9f:<span style="color: #ff0000;">25</span>:ab:a5:<span style="color: #ff0000;">96</span>:5a:2e:f3:c0:5b:b0:c5:
<span style="color: #ff0000;">02</span>:a6:e0:<span style="color: #ff0000;">53</span>:a8:fa:<span style="color: #ff0000;">34</span>:e1:8f:<span style="color: #ff0000;">55</span>:b4:ee:<span style="color: #ff0000;">57</span>:e3:<span style="color: #ff0000;">54</span>:
<span style="color: #ff0000;">65</span>:<span style="color: #ff0000;">70</span>:6a:f0:0c:4d:b1:ed:9f:<span style="color: #ff0000;">31</span>:<span style="color: #ff0000;">38</span>:<span style="color: #ff0000;">51</span>:3c:e1:<span style="color: #ff0000;">99</span>:
fe:<span style="color: #ff0000;">82</span>:6c:0d:3d:a5:d3:6e:<span style="color: #ff0000;">01</span>:8c:<span style="color: #ff0000;">89</span>:cc:f1:<span style="color: #ff0000;">97</span>:c0:
<span style="color: #ff0000;">95</span>:0e:<span style="color: #ff0000;">80</span>:1a:c7:0a:ac:<span style="color: #ff0000;">56</span>:<span style="color: #ff0000;">15</span>:<span style="color: #ff0000;">27</span>:cd:<span style="color: #ff0000;">08</span>:<span style="color: #ff0000;">32</span>:e0:2c:
<span style="color: #ff0000;">39</span>:<span style="color: #ff0000;">00</span>:<span style="color: #ff0000;">77</span>:2f:d1:<span style="color: #ff0000;">83</span>:4f:2e:ff:ea:<span style="color: #ff0000;">50</span>:fb:<span style="color: #ff0000;">26</span>:6c:fd:
dd:ea:<span style="color: #ff0000;">38</span>:3b:ec:c0:f7:d3:c6:c2:<span style="color: #ff0000;">23</span>:<span style="color: #ff0000;">20</span>:<span style="color: #ff0000;">12</span>:<span style="color: #ff0000;">40</span>:bf:
1b:<span style="color: #ff0000;">94</span>:<span style="color: #ff0000;">59</span>:d8:d6:<span style="color: #ff0000;">34</span>:8d:7c:dd
publicExponent: <span style="color: #ff0000;">65537</span> <span style="color: #66cc66;">&#40;</span>0x10001<span style="color: #66cc66;">&#41;</span>
privateExponent:
<span style="color: #ff0000;">23</span>:5b:b8:c9:9c:<span style="color: #ff0000;">68</span>:ad:<span style="color: #ff0000;">45</span>:c2:<span style="color: #ff0000;">93</span>:<span style="color: #ff0000;">19</span>:6c:5d:ad:<span style="color: #ff0000;">51</span>:
<span style="color: #ff0000;">31</span>:ce:<span style="color: #ff0000;">83</span>:<span style="color: #ff0000;">95</span>:0f:b9:<span style="color: #ff0000;">01</span>:c9:2a:3d:c2:b9:<span style="color: #ff0000;">96</span>:<span style="color: #ff0000;">16</span>:<span style="color: #ff0000;">49</span>:
<span style="color: #ff0000;">96</span>:be:bf:ab:8c:<span style="color: #ff0000;">90</span>:<span style="color: #ff0000;">08</span>:f6:a8:ed:0c:e1:<span style="color: #ff0000;">16</span>:<span style="color: #ff0000;">62</span>:<span style="color: #ff0000;">61</span>:
<span style="color: #ff0000;">83</span>:5d:4d:<span style="color: #ff0000;">56</span>:a4:<span style="color: #ff0000;">33</span>:<span style="color: #ff0000;">68</span>:8d:cd:<span style="color: #ff0000;">14</span>:a1:<span style="color: #ff0000;">47</span>:1d:<span style="color: #ff0000;">61</span>:7b:
<span style="color: #ff0000;">02</span>:7d:<span style="color: #ff0000;">89</span>:0e:<span style="color: #ff0000;">77</span>:f9:0b:b9:<span style="color: #ff0000;">89</span>:<span style="color: #ff0000;">02</span>:a5:e1:0a:ba:<span style="color: #ff0000;">66</span>:
f2:<span style="color: #ff0000;">25</span>:dc:<span style="color: #ff0000;">06</span>:7e:<span style="color: #ff0000;">74</span>:b2:c7:6a:be:1a:e1:6f:fb:b7:
e2:2d:b5:f2:ca:a8:ec:<span style="color: #ff0000;">27</span>:9e:<span style="color: #ff0000;">81</span>:<span style="color: #ff0000;">25</span>:7e:8a:2d:6c:
<span style="color: #ff0000;">94</span>:6f:f5:ca:f3:4e:bc:3d:1e:e9:5d:<span style="color: #ff0000;">74</span>:<span style="color: #ff0000;">47</span>:<span style="color: #ff0000;">59</span>:8c:
f7:<span style="color: #ff0000;">29</span>:d8:8e:9c:d2:e0:<span style="color: #ff0000;">01</span>
prime1:
<span style="color: #ff0000;">00</span>:f4:<span style="color: #ff0000;">85</span>:<span style="color: #ff0000;">25</span>:2e:6c:<span style="color: #ff0000;">02</span>:<span style="color: #ff0000;">79</span>:<span style="color: #ff0000;">02</span>:<span style="color: #ff0000;">58</span>:c9:ec:<span style="color: #ff0000;">29</span>:a8:<span style="color: #ff0000;">11</span>:
<span style="color: #ff0000;">33</span>:9e:db:bf:<span style="color: #ff0000;">84</span>:0a:a2:<span style="color: #ff0000;">87</span>:f9:2b:<span style="color: #ff0000;">82</span>:f5:a0:<span style="color: #ff0000;">04</span>:<span style="color: #ff0000;">59</span>:
<span style="color: #ff0000;">69</span>:bb:f7:d3:6a:d8:ee:6d:<span style="color: #ff0000;">74</span>:0e:bb:<span style="color: #ff0000;">62</span>:<span style="color: #ff0000;">01</span>:8e:bf:
5f:<span style="color: #ff0000;">85</span>:d8:3d:de:e9:<span style="color: #ff0000;">12</span>:<span style="color: #ff0000;">86</span>:c9:<span style="color: #ff0000;">20</span>:de:7c:cf:4c:f2:
6a:1b:<span style="color: #ff0000;">40</span>:e2:<span style="color: #ff0000;">01</span>
prime2:
<span style="color: #ff0000;">00</span>:cf:a3:ea:a4:<span style="color: #ff0000;">39</span>:<span style="color: #ff0000;">10</span>:6c:4e:3c:<span style="color: #ff0000;">58</span>:b1:8e:f0:<span style="color: #ff0000;">17</span>:
<span style="color: #ff0000;">33</span>:ea:1f:9d:0c:be:0a:bd:3b:d5:<span style="color: #ff0000;">80</span>:<span style="color: #ff0000;">76</span>:<span style="color: #ff0000;">70</span>:e3:e4:
<span style="color: #ff0000;">54</span>:4f:1a:8f:8a:ab:<span style="color: #ff0000;">00</span>:d5:<span style="color: #ff0000;">64</span>:e6:8a:e7:<span style="color: #ff0000;">24</span>:<span style="color: #ff0000;">12</span>:2b:
3e:<span style="color: #ff0000;">97</span>:b9:<span style="color: #ff0000;">24</span>:<span style="color: #ff0000;">96</span>:b5:f4:<span style="color: #ff0000;">31</span>:eb:ae:6d:fa:<span style="color: #ff0000;">83</span>:b2:<span style="color: #ff0000;">32</span>:
<span style="color: #ff0000;">92</span>:8b:<span style="color: #ff0000;">06</span>:<span style="color: #ff0000;">62</span>:dd
exponent1:
<span style="color: #ff0000;">00</span>:b4:<span style="color: #ff0000;">40</span>:d2:bf:fd:ef:<span style="color: #ff0000;">74</span>:b5:3e:2e:dc:<span style="color: #ff0000;">61</span>:<span style="color: #ff0000;">78</span>:fc:
<span style="color: #ff0000;">34</span>:<span style="color: #ff0000;">77</span>:9f:<span style="color: #ff0000;">16</span>:f7:<span style="color: #ff0000;">87</span>:bf:<span style="color: #ff0000;">78</span>:ed:3e:1e:<span style="color: #ff0000;">34</span>:<span style="color: #ff0000;">63</span>:d9:d0:
f0:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">00</span>:<span style="color: #ff0000;">49</span>:6b:d1:<span style="color: #ff0000;">97</span>:ee:4e:4d:e4:<span style="color: #ff0000;">59</span>:b1:<span style="color: #ff0000;">99</span>:
<span style="color: #ff0000;">72</span>:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">80</span>:e7:5b:<span style="color: #ff0000;">44</span>:<span style="color: #ff0000;">05</span>:dc:<span style="color: #ff0000;">46</span>:b8:6c:4b:<span style="color: #ff0000;">25</span>:a6:5b:
ad:cc:<span style="color: #ff0000;">99</span>:<span style="color: #ff0000;">70</span>:<span style="color: #ff0000;">01</span>
exponent2:
<span style="color: #ff0000;">00</span>:b8:a7:<span style="color: #ff0000;">83</span>:<span style="color: #ff0000;">41</span>:ec:<span style="color: #ff0000;">65</span>:<span style="color: #ff0000;">88</span>:8b:c2:ea:f5:6c:b2:<span style="color: #ff0000;">63</span>:
<span style="color: #ff0000;">33</span>:<span style="color: #ff0000;">98</span>:9f:e8:a0:ae:<span style="color: #ff0000;">59</span>:0a:<span style="color: #ff0000;">94</span>:ad:<span style="color: #ff0000;">78</span>:<span style="color: #ff0000;">02</span>:dc:be:2e:
3e:<span style="color: #ff0000;">34</span>:<span style="color: #ff0000;">12</span>:e0:d8:<span style="color: #ff0000;">66</span>:de:e4:e7:<span style="color: #ff0000;">48</span>:<span style="color: #ff0000;">86</span>:fa:ab:7f:<span style="color: #ff0000;">64</span>:
e9:d3:<span style="color: #ff0000;">30</span>:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">33</span>:d6:<span style="color: #ff0000;">38</span>:<span style="color: #ff0000;">86</span>:<span style="color: #ff0000;">34</span>:9b:f8:be:<span style="color: #ff0000;">32</span>:<span style="color: #ff0000;">64</span>:<span style="color: #ff0000;">44</span>:
c9:<span style="color: #ff0000;">41</span>:cd:ba:<span style="color: #ff0000;">19</span>
coefficient:
7c:9a:fa:<span style="color: #ff0000;">80</span>:<span style="color: #ff0000;">72</span>:8a:<span style="color: #ff0000;">74</span>:<span style="color: #ff0000;">11</span>:7b:f0:<span style="color: #ff0000;">32</span>:d0:e4:b3:<span style="color: #ff0000;">44</span>:
cd:d4:2c:4e:6b:<span style="color: #ff0000;">37</span>:<span style="color: #ff0000;">38</span>:<span style="color: #ff0000;">68</span>:9a:6e:cd:ae:f0:9f:<span style="color: #ff0000;">54</span>:
<span style="color: #ff0000;">31</span>:a5:f6:f7:c8:<span style="color: #ff0000;">16</span>:f3:1a:4a:5c:d3:6b:<span style="color: #ff0000;">60</span>:a1:7d:
f5:a2:6c:b2:ab:<span style="color: #ff0000;">12</span>:1d:1c:5c:dd:<span style="color: #ff0000;">63</span>:<span style="color: #ff0000;">57</span>:d5:c0:be:
a3:d1:<span style="color: #ff0000;">37</span>:<span style="color: #ff0000;">67</span>
OpenSSL</pre>
<p>Although it is hardly readable but makes more sense then previous screenshot.</p>
<p>Later on we need to specify path of this file in our httpd-ssl.conf when we get CRT file signed by Authority and we are setting up SSL over our webserver. It is required to have unsecured version of this file as with Windows Apache + OpenSSL setup it's not possible to specify "pass-phrase" (which we have given earlier) and it will give some weired error while setting up SSL and apache will refuse to start and generate errors in log for that.<br />
So to get Unsecured version of this file type following command:</p>
<pre class="apache">OpenSSL rsa -in digitss.key -out unsecured.digitss.key
Enter pass phrase for digitss.key:
writing RSA key
OpenSSL</pre>
<p>Here, digitss.key is the file which we have previously generated and it is encrypted (3-DES), and -out file is the one which will be generated based on our request in non-encrypted form. During this process it will ask for pass-phrase as usual.</p>
<p>Now let's move to final step which is generation of CSR file using RSA private key. Following command will generate Certificate Signing Request file for us which will be PEM formatted. Key in following command:</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr</pre>
<p>If you are running over Windows then probably you will get error which I have faced during this. It would be something similar to following:</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr
Unable to load config info <span style="color: #00007f;">from</span> /usr/local/ssl/openssl.cnf</pre>
<p>In that case we need to specify one more parameter in this command and we are done.</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr -config openssl.cnf</pre>
<p>Here, in this command we are making request for generation of CSR file with our private key generated previously and here we have specified configuration file as "openssl.cnf" as one more parameter. If this file doesn't exist in apache/bin directory then either move it there or specify full path. After keying in above command it will prompt you with few parameters/questions and that's it we are done.<br />
Here is the list of question you need to answer as in you type above command to generate CSR file. Provided for your reference just as an example.</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr -config openssl.cnf
Enter pass phrase for digitss.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter <span style="color: #7f007f;">'.'</span>, the field will be left blank.
-----
Country Name <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">2</span> letter code<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span>AU<span style="color: #66cc66;">&#93;</span>:US
State or Province Name <span style="color: #66cc66;">&#40;</span>full name<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span>Some-State<span style="color: #66cc66;">&#93;</span>:Newyork
Locality Name <span style="color: #66cc66;">&#40;</span>eg, city<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:Bellrose
Organization Name <span style="color: #66cc66;">&#40;</span>eg, company<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span>Internet Widgits Pty Ltd<span style="color: #66cc66;">&#93;</span>:DiGiTSS Inc
Organizational Unit Name <span style="color: #66cc66;">&#40;</span>eg, section<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:DiGiTSS
Common Name <span style="color: #66cc66;">&#40;</span>eg, YOUR name<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:www.digitss.com
Email Address <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:dharmavir@digitss.com
Please enter the following <span style="color: #7f007f;">'extra'</span> attributes
to be sent with your certificate request
A challenge password <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:password
An optional company name <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:blogs@DiGiTSS
OpenSSL</pre>
<p>We are almost done, now we need to send this generated CSR file to a Certifying Authority (CA) for signing, they will send back us Real Certificate CRT file with the help of which we can setup SSL over our webserver running Apache and OpenSSL. We can either send it to <a title="Verisign" href="http://digitalid.verisign.com/server/apacheNotice.htm" target="_blank">Verisign,</a> <a title="Thawte Consulting" href="http://www.thawte.com/ssl-digital-certificates/buy-ssl-certificates" target="_blank">Thawte Consulting</a>,  <a title="CertiSign Certificadora Digital Ltd" href="http://www.certisign.com" target="_blank">CertiSign Certificadora Digital Ltd</a> or  <a title="GoDaddy" href="http://www.godaddy.com/" target="_blank">GoDaddy</a>.<br />
<!--adsense--><br />
Please note that I have used all commands on Linux server as well and they will work same as they they work on Windows.</p>
<p>For more advance options or more help you can refer to <a title="modssl home" href="http://www.modssl.org" target="_blank">www.modssl.org</a>'s <a title="ModSSL FAQs" href="http://www.modssl.org/docs/2.8/ssl_faq.html" target="_blank">FAQ section</a>.<br />
Have your comments on this post.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/" rel="bookmark" title="December 6, 2009">Generating 2048-bit CSR with OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
<li><a href="http://blogs.digitss.com/php/php-downloading-a-file-from-secure-website-https-using-curl/" rel="bookmark" title="October 25, 2008">PHP &#8211; Downloading a File from Secure website (https) using CURL</a></li>
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
</ul>
<p><!-- Similar Posts took 4.627 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.808 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-08-13 12:31:27 -->

