1

I am new to how to use Janrain service, currently, I am getting certification-related issue.

I tried as mentioned in the below link, but it could not solve.

Certificate for <localhost> doesn't match any of the subject alternative names

here basUrl is "https://rpxnow.com/api/v2/"

    http.request(baseUrl, GET, TEXT) { req ->
            uri.path = 'auth_info'
            uri.query = [format: 'json', apiKey: apiKey, token: token]
            headers.'User-Agent' = "Mozilla/5.0 Firefox/3.0.4"
            headers.Accept = 'application/json'
            log.debug("Janrain Auth URL:" + uri)
            response.success = { resp, reader ->
                assert resp.statusLine.statusCode == 200
                jsonResponse = reader.text
                JSONObject jsonObj = new JSONObject(jsonResponse)
                jsonResponse = grails.converters.JSON.parse(jsonResponse)
            }
            log.debug("Response:" + response)
        }

Expected: it should give 200 status

Actual:

javax.net.ssl.SSLException: Certificate for doesn't match any of the subject alternative names: [*.janrain.com, *.rpxstaging.com, *.rpxtesting.com, *.janrainbackplane.com, *.janrainsso.com, *.rpxnow.com, *.rpxtraining.com, *.janrainconsole.com, *.engage-dev.janrain.com]

  • Please [edit] your question to include the full source code you have, see: [mcve]. Also add the complete URL you are trying to open to your question. – Progman Jul 27 '19 at 07:13
  • it solved by taking the reference of below I don't know which version of the Apache HttpClient you were using but versions 4.4.1 and 4.5.1 had a bug where the SNI didn't work correctly. This was fixed in 4.5.3 https://issues.apache.org/jira/browse/HTTPCLIENT-1726links, https://stackoverflow.com/questions/39762760/javax-net-ssl-sslexception-certificate-doesnt-match-any-of-the-subject-alterna?rq=1 – kambalapalli Mahesh Jul 27 '19 at 08:08

0 Answers0