How do I 'ignore' SSL certificate issues from a trusted site and download a .tsv file?

44 views (last 30 days)
I would like to download 50+ .tsv files from the NIH Human Microbiome Project. Here is a url of one example https://portal.hmpdacc.org/files/e4fdfd770c4102d4032c2ca5cab95418. I trust the website, but the website is "not secure" as seen to the left of the url. I would like to use the websave function to import these files. but am getting this error "Error using websave Secure connection to "URL" not established because "SSL certificate problem: certificate has expired". Check your system certificates for expired, missing, or invalid certificates."
This post answer #2 seems like it should work but I am getting the error "unable to resolve 'request.send'.
I would like a simple of a fix as possible and this is a class assignment so it needs to work on my teachers computer as well. Thank you for your help

Answers (1)

Kartik
Kartik on 20 Mar 2023
Hi,
The error message indicates that the SSL certificate of the website you are trying to download from has expired. You can try to bypass the SSL certificate verification by setting the "CertificateFilename" parameter to an empty string in the ‘websave function’. However, this may not be a secure solution as it exposes you to potential security risks.
Here's an example of how to use ‘websave’ with the "CertificateFilename" parameter set to an empty string:
url = 'https://portal.hmpdacc.org/files/e4fdfd770c4102d4032c2ca5cab95418';
filename = 'myfile.tsv';
options = weboptions('CertificateFilename', '');
websave(filename, url, options);
Note that this solution will only work if your computer's firewall or antivirus software is not blocking the download. If you encounter any issues, you may need to contact your system administrator for assistance.

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!