I have been successfully using the very useful new Graph feature of Aspose with version aspose-email-22.7-jdk16.jar.
I just tested Aspose version 23.4, and it starts to return PKIX cert errors, as shown below. How do I hook in a web cert Trust Manager to overcome this?
AsposeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ---> javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target --- End of inner exception stack trace --- [Ljava.lang.StackTraceElement;@5b742bc8 at com.aspose.email.zym.c(SourceFile:197) at com.aspose.email.zyl.a(SourceFile:48) at com.aspose.email.zym.n(SourceFile:73) at com.aspose.email.zyn.listFolders(SourceFile:77)
[this exception is raised at GraphFolderInfoCollection folders = client.listFolders(); ]
@mbeedell
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILJAVA-35194
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The system works fine with 22.7. I just tried my code with 23.4 and this is when the https cert problem showed (I have not tried the other releases).
The Java eMail library does not contain the HttpUtility class. It does have an HttpProxy class. The GraphClient (that I am trying to use) does not have a setSSLContext method, and it’s http proxy is null - so I cant see how to create a proxy against which I can set the requirements. I tried something like this:
mygraphclient.getProxy().setSupportedAuthenticationMethods(HttpAuthenticationMethods.NoAuthentication)
I have just tried this new version (23.7) and is still returns the PKIX error. Is there a new https utils class that I should use? - I cant see any references to this in the release notes.
AsposeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ---> javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target --- End of inner exception stack trace --- [Ljava.lang.StackTraceElement;@5866731 at com.aspose.email.zym.c(SourceFile:200) at com.aspose.email.zyl.a(SourceFile:48) at com.aspose.email.zym.n(SourceFile:73) at com.aspose.email.zyn.listFolders(SourceFile:77) at getNDRusingGraph.run(getNDRusingGraph.groovy:91) Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.aspose.email.zym.c(SourceFile:179) ... 4 more