RTC Login with Java API when RTC Server uses SSL Certificates
Hello,
I have to login into our RTC server via java API,
So my question is how should be the code to login when RTC access has ssl certicates?
Following is part of the code I currently have (it is groovy) where first I check if URL is recheable and then performs the connection.
def loginRTC(repositoryUri, user, passwd, mon = null){
println "\tChecking if specified address '" + repositoryUri + "' with provided user '" + user + "' and password '" + passwd + "' is reachable...."
def urlIsReachable(Uri, timeout = 0, username = "", password = ""){
def conn = Uri.toURL().openConnection()
|
One answer
I could find a solution that works for my case:
My script is a groovy script which is run by an application under tomcat. This script tries to connect into RTC but the RTC server has self SSL Certicates.
Regards.
PS: Also as Joseph Mao mentioned in the prior comment, maybe the certificate could be imported directly to the Java database certificate <JAVA_HOME>/lib/security/cacerts instead of a custom database certificate as I did, with that maybe it would not be necessary to specify the path in the CATALINA_OPTS of tomcat, since <JAVA_HOME>/lib/security/cacerts is the default one.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Did you add SSL certificate into your <JAVA_HOME>/lib/security/cacerts file?
Thanks a lot for the comment.
I could figure out a solution similar but adding the certificate in another path.
I will detail the explanation in the following response.
Thank you very much.