I have built j2me midlet for getting secure connection with server using ssl protocol. I have signed midlet with "Thawte Certificate" and sent "Thawte Premium Server CA" to server in PEM format(Which I have downloaded from Thawte Website ).Checking on WTK emulator it throws "java.io.IOException: getNextMsg refill failed" and "java.io.IOException: error 10054 during TCP read".While checking on S40 6th edition emulator it throws "error occured whilst opening connection" same thing in mobile Nokia x3-02 , is there settings required on nokia device or any certficate issue on server side???
piece of code is given here.. Kindly reply soon...
String urlSecure = "ssl://server ip : port";
SecurityInfo securityInfo = null;
Certificate certificate = null;
SecureConnection secureConnection = null;
HttpsConnection httpsConnection = null;
InputStream inputStream = null;
// httpsConnection=(HttpsConnection) Connector.open(urlSecure);
secureConnection = (SecureConnection) Connector.open(urlSecure);
// securityInfo = httpsConnection.getSecurityInfo();
securityInfo = secureConnection.getSecurityInfo();
certificate = securityInfo.getServerCertificate();
logger.log(certificate.getIssuer() + ""
+ certificate.getSigAlgName() + ""
String subject = certificate.getSubject();
String s = "Server certificate subject: \n" + subject;
s += "\n Issuer:" + certificate.getIssuer() + "\n SigAlgName:"
+ certificate.getSigAlgName() + "\n SerialNumber:"
Alert a = new Alert("Result", s, null, null);