shriny


Hi,

Has anyone successfully updated to adcenter API V3, it seems there is new certificate for the url

adcenterapi.microsoft.com added to the certificate,

I imported the certificate into my keystore but was getting the following error.

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)

at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)

at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)

Please let me know If anyone has come accross same issue

Is there any implementation change compared to the previous version

Thanks

Sri





Re: API V3 SSLException - unable to find valid certification path to requested target

nsharma


Have you saved all the three certificates in your keystore - Microsoft internet Authority, Microsoft Secure Server Authority, and GTE CyberTrustRoot.

I was facing the same proble, but when i included all three certifictaes, I am not seeing the problem.

I still another certificate problem on every other call to MSN API:

fault:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed

Sometimes the request suceed, but every other call, it returns with this exception.

If anyone know how to fix it, please explain.

Thanks,
NS





Re: API V3 SSLException - unable to find valid certification path to requested target

Walter Poupore - MSFT

Hi,

If you import the end certificate, do you still receive the error

That is, the end or site certificate for adcenterapi.microsoft.com (the last certificate in the chain). Try importing that, and see if that resolves your issue.

Thank you.

Walter Poupore - MSFT






Re: API V3 SSLException - unable to find valid certification path to requested target

shriny

Hi

I am getting the error when trying to download the report zip file.

I have added all the certificates including end certificate to the keystore.

Please provide sample code for report download from url for V3 if changed.

6:46:49 ERROR Error in submitting MSN request

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)

URL u = new URL(url);

URLConnection conn = u.openConnection();

conn.connect();






Re: API V3 SSLException - unable to find valid certification path to requested target

nsharma

I have imported these three certificates - Microsoft internet Authority, Microsoft Secure Server Authority, and GTE CyberTrustRoot.

Is there any other end certificate that I need to import Can you please give me the name of the certificates that are required to make API work.

Thanks,
NS




Re: API V3 SSLException - unable to find valid certification path to requested target

Ludo-R

Did you have a look at that : http://msdn2.microsoft.com/en-us/library/aa982776.aspx