function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mhlangano Khumalo 7Mhlangano Khumalo 7 

System.CalloutException: IO Exception: No subject alternative names present

I've created an Apex class that makes a callout to an external SOAP-based web service. The web service provider has whitelisted Salesforce IP ranges and I'm getting an error. "System.CalloutException: IO Exception: No subject alternative names present"

I think it has to do with the certificate because looking at the debug logs, certificate info like clientCertName_x in not populated when the call is made.(see yellow highlights in the image below). 
My teammate says it's because the endpoint URL (which points to dev environment) is an IP address & not a fully qualified URL with a publicly signed certificate securing it.
Debug logs:
User-added image
Please advice on what the issue is and list the steps to resolve it.
I found this solution and I think perhaps it's what I need also.
Please advice.
I think your server is using the certificate to identify the salesfoce client. You need to use certificate when making the callout and make sure that Common Name on the certificate matches with the common name on the server.