Hello,
I am using nClient library to connect to Universal Messaging Realm, using SSL protocol, but I am getting error that fSSLSocketDriver in method createSocket calls javax deprecated method getPeerCertificateChain
Caused by: java.lang.UnsupportedOperationException: This method is deprecated and marked for removal. Use the getPeerCertificates() method instead.
at java.base/javax.net.ssl.SSLSession.getPeerCertificateChain(SSLSession.java:295)
at com.pcbsys.foundation.drivers.fSSLSocketDriver.createSocket(fSSLSocketDriver.java:131)
Caused by: java.io.IOException: java.lang.UnsupportedOperationException: This method is deprecated and marked for removal. Use the getPeerCertificates() method instead.
at com.pcbsys.foundation.drivers.fSSLSocketDriver.createSocket(fSSLSocketDriver.java:145)
at com.pcbsys.foundation.drivers.fSocketDriver.init(fSocketDriver.java:60)
at com.pcbsys.foundation.drivers.fSSLSocketDriver.<init>(fSSLSocketDriver.java:66)
at com.pcbsys.foundation.drivers.fDriverFactory.attemptConnection(fDriverFactory.java:290)
... 10 more
We switched to Java 17 and this problem occurs. Is there any solution for that ? Our code looks like this:
nRealm umServerRealm = new nRealm(serverRealmName, connections);
nSessionAttributes sessionAttributes = new nSessionAttributes(umServerRealm);
sessionAttributes.setName(clientId + "_" + pidHost);
sessionAttributes.setKeystore(keyStore, Decode.decrypt(encryptedPass));
sessionAttributes.setTruststore(trustStore, null);
nSessionFactory.create(sessionAttributes, new UMReconnectHandler(), umUser, Decode.decrypt(umPass));
Thank you for any answer,
Peter