title: SSL certificate issue in intellij with gradle
body: <p>I have a gradle-managed project which I have been working on for the last few years. The code is published to an artifactory instance, which was migrated, company-wide, to AWS recently.</p>
  
  <p>Ever since then I have been facing the following issue whenever I try to do a gradle sync for the project, rendering development impossible:</p>
  
  <p>javax.net.ssl.SSLPeerUnverifiedException: Certificate for artifactory.domain.us doesn't match any of the subject alternative names: [*.domain.space]</p>
  
  <p>I have tried the following:</p>
  
  <p>Updating the intellij IDE to the latest version</p>
  
  <p>Using local gradle distribution instead of built in wrapper (latest version) </p>
  
  <p>Updating my jdk from 8 to 10 and then going back to 8</p>
  
  <p>Copying the certificate of artifactory.domain.us from the browser to the jre's cacerts keystore using the keytool</p>
  
  <p>Enabling and disabling various JVM and gradle VM related to tls and ssl ignore</p>
  
  <p>Since no other developer in my team is facing this issue, it is probably a bad configuration from my end, but I can't figure out what. Please help! </p>