0

I am getting this error in rest apex callout: java.security.cert.CertificateException: No name matching da1.camso.co found.

Not sure why I am getting this any certificate I have to or they to add from server side

> HttpRequest req = new HttpRequest();   
> req.setEndpoint('https://da1.camso.co:50001/RESTAdapter/sold_to/refresh');
> req.setMethod('GET'); String username = '***'; String password = '**';
> Blob headerValue = Blob.valueOf(username + ':' + password); String
> authorizationHeader = 'BASIC ' +
> EncodingUtil.base64Encode(headerValue); req.setHeader('Authorization',
> authorizationHeader);  Http http = new Http(); HTTPResponse res =
> http.send(req); System.debug(res.getBody());

I guess this is certificate issue...What are the steps I have follow from salesforce side?? Do I need to download self-signed certificate and give it to client??

1

Looks like your endpoint server has no valid certificate. Consider checking in browser. enter image description here

Make sure that you are using valid certificate.

  • Thanks for answer ...What are next steps I have to follow for valid certificate in salesforce – Salesforce Learner Mar 30 '16 at 7:23
  • You need to get target server with a certificate which is signed by one of the below listed authority to which salesforce trusts. developer.salesforce.com/page/… – Kiran Machhewar Mar 30 '16 at 7:42
  • Thanks again can I download Self-signed certificate and give it to client.?Hence certificate will be valid in that case. – Salesforce Learner Mar 30 '16 at 12:16
  • 1
    That is not how it works. In case of two way SSL you might need to create a self sign certificate. But here scenario is different, salesforce is not able to trust other party. In order to make sure that salesforce trusts the other party, a certificate needs to be created and needs to be signed by trusted authority. In your case this job has to be done by client. In salesforce you dont need to do anything. Your client has existing certificate just ask them to get a valid certificate signed by any of the listed trusted CA. – Kiran Machhewar Mar 31 '16 at 4:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.