Autodiscover and SSL Issues (Java)

Hello,

We are currently using the Aspose.Email with Java to make a call to an Exchange Autodiscover service in order to return a users EWS URL. The Exchange environment is an internal one and we are using a Windows AD Certification authority to issue the SSL certificates to the Exchange servers/Autodiscover.

Testing through a web browser, we get prompted for our domain credentials and the Autodiscover XML returns with no issue. We have also tested Java code to try and establish a secure connection to the autodiscover service, and this also works. Note that we made sure to add our internal CA to the testing machines Java Keystore.

Regardless what we try though, Aspose does not seem to trust the root certificate. We would like to know if anyone else has run into this issue, or what keystore Aspose may be trying to reference when making the SSL call.

Error we are getting:
Caused by: class com.aspose.email.system.exceptions.IOException: The authentication or decryption has failed. —> class com.aspose.email.internal.fb.a: Invalid certificate received from server.

Wireshark Trace:
TLSv1 61 Alert (Level: Warning, Description: Unknown CA)

Based on the above, everything points to the certificate not being trusted. But as mentioned earlier, every other test outside of our Aspose code trust the root cert and chain to the Autodiscover URL.

Thanks in advance,
Eric

1 Like

@EEngland,

We have internally discussed the issue shared by you. Unfortunately, we may not be able to check Autodiscover service on the not trusted certificate now. But I can suggest Aspose.Email for Java 19.5.1 hotfix release with some fixes to check the issue on your side.

Hello @mudassir.fayyaz,

I appreciate the replay…it looks like that Hotfix resolved our issue. We tried to use the hotfix with our current license file and it did not work. Do you know when these changes will be rolled into the next release? Or is there a different method using the hotfix along with the supported release with our license file?

Thank you,
Eric

@EEngland,

I have observed your comments. I like to inform that there is no other way to use hotfix. Can you please share issue in details which you are facing on use of hotfix. Please share details if you facing any exception on use of hotfix.

Hello @Adnan.Ahmad,

We removed the Maven dependency on 19.4 and added the HotFix Jar directly as a library within Eclipse. When we run our code, we get the following exception:

Exception in thread “main” class com.aspose.email.system.exceptions.InvalidOperationException: Failed to set license. Details: The license has expired.
com.aspose.email.License.a(SourceFile:353)
com.aspose.email.License.setLicense(SourceFile:304)
com.technicallycreative.AutodiscoverTest.main(AutodiscoverTest.java:50)
at com.aspose.email.License.a(SourceFile:353)
at com.aspose.email.License.setLicense(SourceFile:304)
at com.technicallycreative.AutodiscoverTest.main(AutodiscoverTest.java:50)

We just renewed the license, and the new license file worked with out any issues with the previous 19.4 version of the jar.

Thank you,
Eric

@EEngland,

I have observed your following comments and its good to hear that hotfix has resolved the issue on your end.The official release will be rolled as Aspose.Email for Java 19.6, which will be available for download by end of June. If your license subscription is not working with new release or hotfix, you need to renew your subscription on your end.