title: Some clients accept SSL cert; others reject it
body: <p>Some HTTP clients accept this certificate, and others do not. What could make the difference?</p>
  
  <p>Java rejects it.</p>
  
  <pre><code>((javax.net.ssl.HttpsURLConnection)new java.net.URL("https://www.lucidpress.com")
      .openConnection())
      .getInputStream()
  </code></pre>
  
  <blockquote>
    <p>javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: <strong>No subject 
    alternative DNS name matching www.lucidpress.com found.</strong>     at
    sun.security.ssl.Alerts.getSSLException(Alerts.java:192)  at
    sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1715)     at
    sun.security.ssl.Handshaker.fatalSE(Handshaker.java:257)  at
    sun.security.ssl.Handshaker.fatalSE(Handshaker.java:251)  at
    sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1168)
      at
    sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:153)
      at sun.security.ssl.Handshaker.processLoop(Handshaker.java:609)     at
    sun.security.ssl.Handshaker.process_record(Handshaker.java:545)   at
    sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:963)     at
    sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
      at
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
      at
    sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
      at
    sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
      at
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
      at
    sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
      at
    sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)</p>
  </blockquote>
  
  <p>Python requests rejects it.</p>
  
  <pre><code>import requests
  requests.get('https://www.lucidpress.com')
  
  Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt;   File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 55, in get
      return request('get', url, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 44, in request
      return session.request(method=method, url=url, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 456, in request
      resp = self.send(prep, **send_kwargs)   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 559, in send
      r = adapter.send(request, **kwargs)   File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 382, in send
      raise SSLError(e, request=request) requests.exceptions.SSLError: hostname 'www.lucidpress.com' doesn't match either of '*.lucidchart.com', 'lucidchart.com'
  </code></pre>
  
  <p>cURL accepts it.</p>
  
  <pre><code>$ curl -v https://www.lucidpress.com
  </code></pre>
  
  <blockquote>
    <ul>
    <li>About to connect() to www.lucidpress.com port 443 (#0)</li>
    <li>Trying 54.236.129.63... connected</li>
    <li>successfully set certificate verify locations:</li>
    <li>CAfile: none   CApath: /etc/ssl/certs</li>
    <li>SSLv3, TLS handshake, Client hello (1):</li>
    <li>SSLv3, TLS handshake, Server hello (2):</li>
    <li>SSLv3, TLS handshake, CERT (11):</li>
    <li>SSLv3, TLS handshake, Server key exchange (12):</li>
    <li>SSLv3, TLS handshake, Server finished (14):</li>
    <li>SSLv3, TLS handshake, Client key exchange (16):</li>
    <li>SSLv3, TLS change cipher, Client hello (1):</li>
    <li>SSLv3, TLS handshake, Finished (20):</li>
    <li>SSLv3, TLS change cipher, Client hello (1):</li>
    <li>SSLv3, TLS handshake, Finished (20):</li>
    <li>SSL connection using DHE-RSA-AES256-SHA</li>
    <li>Server certificate:</li>
    <li>subject: OU=Domain Control Validated; <strong>CN=*.lucidpress.com</strong></li>
    <li>start date: 2014-05-12 16:20:34 GMT</li>
    <li>expire date: 2015-07-09 22:19:45 GMT</li>
    <li><strong>subjectAltName: www.lucidpress.com matched</strong></li>
    <li>issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=<a href="http://certs.godaddy.com/repository/">http://certs.godaddy.com/repository/</a>; CN=Go Daddy Secure
    Certificate Authority - G2</li>
    <li>SSL certificate verify ok.</li>
    </ul>
  </blockquote>
  
  <p>wget rejects it.</p>
  
  <pre><code>wget https://www.lucidpress.com
  </code></pre>
  
  <blockquote>
    <p>--2014-08-09 19:55:41--  <a href="https://www.lucidpress.com/">https://www.lucidpress.com/</a> Resolving www.lucidpress.com (www.lucidpress.com)... 107.23.98.6, 54.236.129.63,
    54.88.154.168 Connecting to www.lucidpress.com (www.lucidpress.com)|107.23.98.6|:443... connected. <strong>ERROR: no
    certificate subject alternative name matches  requested host name</strong>
    'www.lucidpress.com'. To connect to www.lucidpress.com insecurely, use
    '--no-check-certificate'.</p>
  </blockquote>
  
  <p>Chrome, FF, and IE accept it.</p>
  
  <p>Why is the behavior different?</p>