sslexception - JRE 7 SSL Exception UnsupportedOperationException -


i have applet attempts fetch content specific https url. used following sample code:

url url = new url(urllink);  urlconnection urlconn = (urlconnection)url.openconnection(); //https:link urlconn.setdoinput(true); urlconn.setdooutput(true); urlconn.setusecaches(false);  urlconn.setrequestproperty("accept-language","en"); urlconn.setallowuserinteraction(false); urlconn.setrequestproperty("content-length",string.valueof(data.length())); urlconn.setrequestproperty("content-type","application/x-www-form-urlencoded");  dataoutputstream out=new dataoutputstream(urlconn.getoutputstream()); out.writebytes(data); out.flush(); out.close(); 

i intermittently receive following exception:

*** serverhellodone [read] md5 , sha1 hashes:  len = 4 0000: 0e 00 00 00                                        .... awt-eventqueue-2, handling exception: java.lang.unsupportedoperationexception %% invalidated:  [session-6, ssl_rsa_with_rc4_128_md5] awt-eventqueue-2, send tlsv1 alert:  fatal, description = internal_error awt-eventqueue-2, write: tlsv1 alert, length = 2 [raw write]: length = 7 0000: 15 03 01 00 02 02 50                               ......p awt-eventqueue-2, called closesocket() awt-eventqueue-2, called close() awt-eventqueue-2, called closeinternal(true)  javax.net.ssl.sslexception: java.lang.unsupportedoperationexception         @ sun.security.ssl.alerts.getsslexception(unknown source)         @ sun.security.ssl.sslsocketimpl.fatal(unknown source)         @ sun.security.ssl.sslsocketimpl.fatal(unknown source) ..... caused by: java.lang.unsupportedoperationexception         @ javax.crypto.cipherspi.enginewrap(cipherspi.java:870)         @ javax.crypto.cipher.wrap(cipher.java:2417)         @ sun.security.ssl.rsaclientkeyexchange.<init>(unknown source)         @ sun.security.ssl.clienthandshaker.serverhellodone(unknown source)         @ sun.security.ssl.clienthandshaker.processmessage(unknown source)         @ sun.security.ssl.handshaker.processloop(unknown source)         @ sun.security.ssl.handshaker.process_record(unknown source)         @ sun.security.ssl.sslsocketimpl.readrecord(unknown source)         @ sun.security.ssl.sslsocketimpl.performinitialhandshake(unknown source)         ... 33 more 

on checking cipherspi.enginewrap implementation, see following:

protected byte[]  enginewrap(key key)         throws illegalblocksizeexception, invalidkeyexception      {         throw new unsupportedoperationexception();     } 

kindly advice....


Comments