title: MATLAB ignore security certifcates
body: <p>I need to access some XML from the internet using MATLAB, and to get it I need to download the security certificate from the website manually and use the following function with the downloaded certificate;</p>
  
  <pre><code>% Title: inportcert
  % Author: MathWorks Support Team
  % Code Version: 1.0
  % Type: MATLAB soruce code https://www.mathworks.com/matlabcentral/answers/uploaded_files/1142/importcert.m
  function importcert(filename)
      if (nargin == 0)
          % If no certificate specified show open file dialog to select
          [filename,path] = uigetfile({'*.cer;*.crt','Certificates 
          (*.cer,*.crt)'},'Select Certificate');
          if (filename==0), return, end
              filename = fullfile(path,filename);
      end
      % Determine Java keytool location and cacerts location
      keytool = fullfile(matlabroot,'sys','java','jre',computer('arch'),'jre','bin','keytool');
      cacerts = fullfile(matlabroot,'sys','java','jre',computer('arch'),'jre','lib','security','cacerts');
      % Create backup of cacerts
      if (~exist([cacerts '.org'],'file'))
         % copyfile(cacerts,[cacerts '.org'])
      end
      % Construct and execute keytool
      command = sprintf('"%s" -import -file "%s" -keystore "%s" -storepass 
      changeit -noprompt',keytool,filename,cacerts);
      dos(command);
  </code></pre>
  
  <p>which will allow me to use the following command;</p>
  
  <pre><code>xmlread('https://finds.org.uk/database/images/index/format/xml');
  </code></pre>
  
  <p>These certificates expire and I would not be able to manually change the certificates at that point so I was wondering if;</p>
  
  <p>A) Can I automatically download the certificate using MATLAB instead of doing it manually </p>
  
  <p>B) Just ignore the certificate completely, security isn't an issue.</p>
  
  <p>C) Preferably do A or B without the need for Admin rights</p>
  
  <p>NOTE: It seems that you need to go through this process if you're using a Windows-based system, using MacOSX or Linux you will not need to import the certificates and can access the page without getting an SSL Handshake error.</p>