title: quantmod - SSL: unable to get local issuer certificate in R
body: <p>I’m trying to use <code>quantmod</code> package in R to get financial data from Yahoo. It works perfectly on my personal laptops (Mac and Win). But I cannot make it work on my working computer (Win7).</p>
  <p>My code is:</p>
  <pre><code>getSymbols(&quot;JPM&quot;, src = &quot;yahoo&quot;)
  </code></pre>
  <p>Please note it only doesn't work on my company laptop.</p>
  <p>Here's the error code:</p>
  <pre><code>Error in curl::curl_download(cu, tmp, handle = h) : 
  SSL certificate problem: unable to get local issuer certificate
  </code></pre>
  <p>I have tried to solve the problems in the following ways:</p>
  <ol>
  <li><p>install <code>httr</code> package</p>
  </li>
  <li><p>Delete <code>curl</code>, <code>quantmod</code> and reinstall</p>
  </li>
  <li><p>Update to the latest version of R, RStudio, <code>curl</code>, <code>httr</code>, <code>RCurl</code> and <code>quantmod</code></p>
  </li>
  <li><p>Install <code>openssl</code> package</p>
  </li>
  <li><p>Set <code>ssl_verifypeer = 0L</code></p>
  </li>
  <li><p>add the following before <code>getSymbols</code></p>
  <p><code>options(download.file.method = &quot;wget&quot;, download.file.extra = c(&quot;--no-check-certificate&quot;))</code></p>
  </li>
  </ol>
  <p>Unfortunately, none of the above works. BTW, fetch data from google finance works but Google only provide ~ 4000 records per request.</p>
  <p>I think our company has some restrictions on SSL but I'm totally fine in accessing websites start with https://</p>
  <p>Also, the following code works:</p>
  <pre><code>library('httr')    
  content(GET('https://www.linkedin.com/in/lillyzhu'))
  </code></pre>
  <p>and</p>
  <pre><code>devtools::install_github
  </code></pre>
  <p>I have spent a week to solve this problem but I didn't make any progress. Now, I'm wondering is that possible to fix it? Any ideas will be helpful!</p>
  <p>Thanks to all the contributors, have a great one!
  Appendix: output from <code>libcurlVersion()</code></p>
  <pre><code>[1] &quot;7.40.0&quot;
  attr(,&quot;ssl_version&quot;)
  [1] &quot;OpenSSL/1.0.0o&quot;
  attr(,&quot;libssh_version&quot;)
  [1] &quot;libssh2/1.4.3&quot;
  attr(,&quot;protocols&quot;)
   [1] &quot;dict&quot;   &quot;file&quot;   &quot;ftp&quot;   
   [4] &quot;ftps&quot;   &quot;gopher&quot; &quot;http&quot;  
   [7] &quot;https&quot;  &quot;imap&quot;   &quot;imaps&quot; 
  [10] &quot;ldap&quot;   &quot;pop3&quot;   &quot;pop3s&quot; 
  [13] &quot;rtmp&quot;   &quot;rtsp&quot;   &quot;scp&quot;   
  [16] &quot;sftp&quot;   &quot;smtp&quot;   &quot;smtps&quot; 
  [19] &quot;telnet&quot; &quot;tftp&quot;  
  </code></pre>
  <p>Please feel free to let me know if you need any additional information of my laptop.</p>
  <p>UPDATE: I test the function on my company's laptop without logging in VPN, it works. So any idea to make it work inside VPN?</p>