title: Configuring Vagrant CA Certificates
body: <p>I am experiencing problems executing Vagrant commands behind a corporate proxy server and self-signed CA certificates.  I have configured environment variables HTTP_PROXY, HTTPS_PROXY, and HTTP_NO_PROXY variables.</p>
  
  <p>I have a Java key store containing all of the corporate certificates.  I have used the -exportcert option of the keytool command with numerous options.  I have utilized the openssl command also with numerous options and placed the resulting files in multiple locations within the embedded Ruby directories within the Vagrant installation without any success.</p>
  
  <p>I have read a lot of sites containing information about configuring Ruby and curl but have not had any success in getting Vagrant commands to work.  All of the posts I have located focus on Ruby and curl options that I do not understand how to utilize with Vagrant which includes Ruby as an embedded component of Vagrant.</p>
  
  <p>Please provide instructions on how to correctly export certificates from the Java key store and optionally convert them and place the resulting files so that Vagrant will successfully be able to communicate through the corporate proxy to the internet.</p>
  
  <p>Vagrant 1.9.5 on Windows 7</p>
  
  <p>Vagrant installation directory C:\Apps\Vagrant\</p>
  
  <pre><code>C:\WorkArea&gt; vagrant plugin install vagrant.proxyconf
  
  ERROR:  SSL verification error at depth 3: self signed certificate in certificate chain (19)
  ERROR:  Root certificate is not trusted (/C=US/O=xxx xxx/OU=xxx xxx Certification Authority/CN=xxx xxx Root Certification Authority 01 G2)  
  SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
  
  C:\WorkArea&gt; vagrant up
  
  Bringing machine 'default' up with 'virtualbox' provider...
  ==&gt; default: Box 'puppetlabs/ubuntu-16.04-64-puppet' could not be found. Attempting to find and install...
      default: Box Provider: virtualbox
      default: Box Version: &gt;= 0
  The box 'puppetlabs/ubuntu-16.04-64-puppet' could not be found or
  could not be accessed in the remote catalog. If this is a private
  box on HashiCorp's Atlas, please verify you're logged in via
  `vagrant login`. Also, please double-check the name. The expanded
  URL and error message are shown below:
  URL: ["https://atlas.hashicorp.com/puppetlabs/ubuntu-16.04-64-puppet"]
  Error: SSL certificate problem: self signed certificate in certificate chain
  More details here: http://curl.haxx.se/docs/sslcerts.html
  curl performs SSL certificate verification by default, using a "bundle"
  of Certificate Authority (CA) public keys (CA certs). If the default
  bundle file isn't adequate, you can specify an alternate file
  using the --cacert option.
  If this HTTPS server uses a certificate signed by a CA represented in
  the bundle, the certificate verification probably failed due to a
  problem with the certificate (it might be expired, or the name might
  not match the domain name in the URL).
  If you'd like to turn off curl's verification of the certificate, use
  the -k (or --insecure) option.
  </code></pre>