title: Error specifying OpenSSL config file
body: <p>I'm trying to install an SSL certificate on an EC2 Load Balancer.  Following this guide: <a href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html" rel="nofollow">http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html</a></p>
  
  <ul>
  <li>I have OpenSSL installed (in Windows)</li>
  <li>running command-prompt as admin</li>
  <li>I'm on the step "Before you use OpenSSL commands, you must configure the operating system so that it has information about the location of the OpenSSL install point."</li>
  </ul>
  
  <blockquote>
    <p>set OpenSSL_HOME= C:\OpenSSL-Win32</p>
    
    <p>set OpenSSL_CONFIG= C:\OpenSSL-Win32\bin\openssl.cfg</p>
    
    <p>set Path=%Path%;%OpenSSL_HOME%\bin</p>
  </blockquote>
  
  <ul>
  <li>Does it matter what directory I'm "in" when I run those commands?</li>
  <li>The Amazon guide says to "set OpenSSL_CONFIG= ..." but I've seen in multiple examples that it should be "set OpenSSL_CONF= ..." so is it "CONFIG" or "CONF"?</li>
  <li>After that it says to:</li>
  </ul>
  
  <blockquote>
    <p>openssl genrsa 2048 > your-private-key-filename.pem</p>
  </blockquote>
  
  <ul>
  <li>so, I CD to "C:\OpenSSL-Win32\bin" and then I run "openssl genrsa 2048 > new_key.pem"</li>
  <li>At this point 1 of 2 things happens.<br>
  <ul>
  <li>If I used "OpenSSL_CONFIG" like it says in the guide, then I get the warning: "WARNING: can't open config file: /usr/local/ssl/openssl.cnf" however the .pem file DOES get created anyways.</li>
  <li>If I used "OpenSSL_CONF" then I get the following error:</li>
  </ul></li>
  </ul>
  
  <blockquote>
    <p>4848:error:0200107B:system library:fopen:Unknown error:.\crypto\bio\bss_file.c:169:fopen('C:\OpenSSL-Win32\bin\openssl.cfg','rb')
    4848:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c:174:
    4848:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\conf\conf_def.c:199:</p>
  </blockquote>
  
  <ul>
  <li><p>Then I move on to the step to create a CSR, and I get a similar situation</p>
  
  <ul>
  <li><p>If I used "OpenSSL_CONFIG" then I get this error:</p>
  
  <blockquote>
    <p>WARNING: can't open config file: /usr/local/ssl/openssl.cnf
    Unable to load config info from /usr/local/ssl/openssl.cnf</p>
  </blockquote></li>
  <li><p>If I used "OpenSSL_CONF" then I get this error:</p>
  
  <blockquote>
    <p>4848:error:0200107B:system library:fopen:Unknown error:.\crypto\bio\bss_file.c:1
    69:fopen(' C:\OpenSSL-Win32\bin\openssl.cfg','rb')
    4848:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c
    :174:
    4848:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\con
    f\conf_def.c:199:</p>
  </blockquote></li>
  </ul></li>
  </ul>
  
  <p>I am totally stuck at this point.  I'm unable to create the CSR no matter what I do.  Can anyone see what I'm doing wrong?</p>
  
  <p>I'm pretty sure that the Amazon guide is incorrect. "set OpenSSL_CONFIG" doesn't seem to have any effect.  But "set OpenSSL_CONF" definitely does have an effect.  This makes me wonder what else is incorrect or missing in the Amazon guide...</p>
  
  <p>EDIT:
  well... I just skipped the first three steps where you set openssl_home, openssl_config and the path, and everything worked fine.  so... not sure what the point of those steps are, because they certainly didn't help.</p>