FATAL Alert:HANDSHAKE_FAILURE
Hi I have been sucessfully using a URLConnection to talk https to a web server via a proxy until migrating the code to the weblogic 8.1 server. I keep getting the follwoing error:
javax.net.ssl.SSLHandshakeException: FATAL Alert:HANDSHAKE_FAILURE - The
handshake handler was unable to negotiate an acceptable set of security
parameters.
at
com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknow
n Source)
at
com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknow
n Source)
Is there anything to do with the weblogi security policy? Any suggestion or advice is appreciated.
Thanks,
This looks like a bug. I'd open a support case.
Pavel.
"Chi mok" <[email protected]> wrote:
>
Hi Pavel, thanks for the suggestion. I started the weblogic with the
parameters.
I got a lot of information including the following:
<Feb 11, 2004 8:55:18 AM EST> <Debug> <TLS> <000000> <SSLManager: loaded
20 trusted
CAs from C:\j2sdk1.4.2_01\jre\lib\security\cacerts>
<Feb 11, 2004 8:55:18 AM EST> <Debug> <TLS> <000000> <clientInfo settings
applied>
<Feb 11, 2004 8:55:18 AM EST> <Debug> <TLS> <000000> <SSLIOContextTable.findContext(is):
1870936>
<Feb 11, 2004 8:55:18 AM EST> <Debug> <TLS> <000000> <write SSL_20_RECORD>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <33059805 readRecord()>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <33059805 SSL3/TLS
MAC>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <33059805 received
HANDSHAKE>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <HANDSHAKEMESSAGE:
ServerHello>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <33059805 readRecord()>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <33059805 SSL3/TLS
MAC>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <33059805 received
HANDSHAKE>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <HANDSHAKEMESSAGE:
Certificate>
<Feb 11, 2004 8:55:19 AM EST> <Debug> <TLS> <000000> <Exception during
handshake,
stack trace follows
java.lang.NullPointerException
at com.certicom.tls.record.handshake.ClientStateReceivedServerHello.handle(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown
Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown
Source)
at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown
Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown
Source)
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:98)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:288)
By any chance if you can give me more idea about what is going on?
Thanks again.
chi
"Pavel" <[email protected]> wrote:
"security parameters" here refers to the SSL handshake parameters.
It might be that the client and the server could not agree on the cipher
algorithm.
Try running with the SSL debug on, this should output more information:
-Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true
Pavel.
Chi Mok <[email protected]> wrote:
Hi I have been sucessfully using a URLConnection to talk https to aweb
server via a proxy until migrating the code to the weblogic 8.1 server.
I keep getting the follwoing error:
javax.net.ssl.SSLHandshakeException: FATAL Alert:HANDSHAKE_FAILURE
The
handshake handler was unable to negotiate an acceptable set of security
parameters.
at
com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknow
n Source)
at
com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknow
n Source)
Is there anything to do with the weblogi security policy? Any suggestion
or advice is appreciated.
Thanks,
Similar Messages
-
Received fatal alert: handshake_failure!!
Hi all,
I have to connect with a server via mutual authentication. I have to received a server certificate and send my client certificate, which I have stored in cacerts.
This certificate is a class 3 certificate from verisign.
If I try to connect from IE directly as:
https://195.235.160.165/GPP/WLServer
I have no problem, but when I try to connect from my servlet
MY CODE
com.sun.net.ssl.SSLContext ctx = com.sun.net.ssl.SSLContext.getInstance("SSL");
URL url = new URL("https://195.235.160.165/GPP/WLServer");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
com.sun.net.ssl.HttpsURLConnection urlConn = (com.sun.net.ssl.HttpsURLConnection) conn;
urlConn.setDoOutput(true);
com.sun.net.ssl.KeyManagerFactory _kmFactory = null;;
com.sun.net.ssl.TrustManagerFactory _tmFactory = null;
//Establecemos los certificados
//Cliente
String _clientCertStoreFile = "C:\\certificados\\cacerts.jks";
String _serverCertStoreFile = "C:\\certificados\\keystore.jks";
String _clientCertStorePswd = "changeit";
String _serverCertStorePswd = "changeit";
InputStream _clientCertInputStream = null;
InputStream _serverCertInputStream = null;
String TRUST_STORE = "javax.net.ssl.trustStore";
String TRUST_STORE_PASSWORD = "javax.net.ssl.trustStorePassword";
String KEY_STORE = "javax.net.ssl.keyStore";
String KEY_STORE_PASSWORD = "javax.net.ssl.keyStorePassword";
log.debug("set client side cert ...");
if (_clientCertStoreFile != null)
InputStream retInputStream = null;
try{
retInputStream = new FileInputStream(_clientCertStoreFile);
catch (FileNotFoundException fnfe)
retInputStream = this.getClass().getResourceAsStream(_clientCertSto reFile);
log.debug("The input stream is: " + retInputStream);
_clientCertInputStream = retInputStream;
try
if (_clientCertInputStream != null)
log.debug("setting client side cert ...");
KeyStore clientCertKeyStore = KeyStore.getInstance(KeyStore.getDefaultType());
clientCertKeyStore.load(_clientCertInputStream, _clientCertStorePswd.toCharArray());
_kmFactory = com.sun.net.ssl.KeyManagerFactory.getInstance(com. sun.net.ssl.KeyManagerFactory.getDefaultAlgorithm( ));
kmFactory.init(clientCertKeyStore, clientCertStorePswd.toCharArray());
else
log.debug("nothing to set for the client cert!");
catch (IOException ioe)
ioe.printStackTrace();
catch (KeyStoreException kse)
kse.printStackTrace();
catch (NoSuchAlgorithmException nsae)
nsae.printStackTrace();
catch (java.security.cert.CertificateException ce)
ce.printStackTrace();
catch (UnrecoverableKeyException uke)
uke.printStackTrace();
//Servidor
log.debug("set server side cert ...");
if (_serverCertStoreFile != null)
log.debug("read server side cert ...");
InputStream retInputStream = null;
try{
retInputStream = new FileInputStream(_serverCertStoreFile);
catch (FileNotFoundException fnfe)
retInputStream = this.getClass().getResourceAsStream(_serverCertSto reFile);
_serverCertInputStream = retInputStream;
if (_serverCertInputStream != null)
try
log.debug("setting server side cert ...");
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(_serverCertInputStream, _serverCertStorePswd.toCharArray());
_tmFactory = com.sun.net.ssl.TrustManagerFactory.getInstance(co m.sun.net.ssl.TrustManagerFactory.getDefaultAlgori thm());
_tmFactory.init(trustStore);
catch (IOException ioe)
ioe.printStackTrace();
catch (KeyStoreException kse)
kse.printStackTrace();
instance");
catch (NoSuchAlgorithmException nsae)
nsae.printStackTrace();
catch (java.security.cert.CertificateException ce)
ce.printStackTrace();
else
log.debug("Nothing to set for the server cert");
if (_kmFactory != null){
if (_tmFactory != null){
//ctx.init(_kmFactory.getKeyManagers(), _tmFactory.getTrustManagers(), null);
ctx.init(new com.sun.net.ssl.X509KeyManager[]{}, trustAllCerts, new java.security.SecureRandom());
else{
ctx.init(_kmFactory.getKeyManagers(), null, null);
else{
if (_tmFactory != null){
ctx.init(null, _tmFactory.getTrustManagers(), null);
else{
return;
urlConn.setHostnameVerifier(new HostnameVerifier() {
public boolean verify(String hostname, String session)
// I don't care if the certificate doesn't match host name
System.out.println("hotname: "+hostname);
return true;
urlConn.setSSLSocketFactory(ctx.getSocketFactory() );
urlConn.setDefaultSSLSocketFactory(ctx.getSocketFa ctory());
BufferedReader in = new BufferedReader(
new InputStreamReader(
urlConn.getInputStream()));
//Creates a writer with the encoding parameter as "UTF-8"
Writer out_ = new OutputStreamWriter(response.getOutputStream(), "UTF-8" );
log.debug("Creating writer");
String inputLine;
String fichero_in = "";
while ((inputLine = in.readLine()) != null){
if(inputLine.length()!=0){
System.out.println(inputLine);
fichero_in = inputLine;
out_.write(inputLine);
in.close();
//Sets the Content-Type header
response.setContentType("application/xml; charset=utf-8");
//response.setContentType("text/html; charset=UTF-8");
//Sends the response XML to the client
out_.write(fichero_in);
out_.flush();
response.sendRedirect(response.encodeRedirectURL("out_"));Sorry for not to be clearer and not to use formatting tips (I didn�t know about it) and finally sorry for my bad English!!
As regards the errors:
[LocationServlet] Error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure : com.deimos.dat.servlet.LocationServlet.processRequest(LocationServlet.java:397)
It appears when the servlet try to getInputStream from the HttpsUrlConnection because the handshake hasn�t been done properly.
BufferedReader in = new BufferedReader(
new InputStreamReader(
urlConn.getInputStream())
Thanks in advance!! -
SSLHandshakeException: Received fatal alert :handshake_failure
Hola forum,
I'm having a bit of a problem with ssl sockets currently. Please bear with me as this is my first run at using ssl sockets for anything and I've done a fair bit of searching on google already.
Here's the code I'm using:
(kindly ignore any typos as they are the result of having to manually type the code in - the code resides on a seperate system).
int port = 443;
String hostname = "hostname";
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager(){
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateExcpetion{}
public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException{}
public X509Certificate[] getAcceptedIssuers(){
return new X509Certificate[0];
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, trustAllCerts, new SecureRandom());
SSLSocketFactory factory = sslContext.getSocketFactory();
SSLSocket socket = (SSLSocket)factory.getSocketFactory(hostname, port);
socket.setUseClientMode9true);
socket.startHandshake();
...this throws the following exception from startHandshake():
javax.net.ssl.SSLHandhakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Uknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at testcode.main(testcode.java 62)Any insight? I would be most appreciative. Thanks!ejp thanks for the reply - unfortunately I have 0 control over the server that I am attempting to establish a connection to and I don't think I can get them to do much of anything (just getting their server certificate was some work).
Could this exception be caused by the server requiring client validation? I checked the various socket settings (forget the property names) but none of them indicated that client validation was required.
Let me know if just the debug on the client side would be helpful and I'll type it in.
--edit, alright here are what I think the relevant parts of the debugging info from the client side(bear with me as this has to be hand transcribed-). Please let me know if more is needed-
found key for : key alias
chain[0] = [
addiing as trusted cert:
adding as trusted cert:
trigger seeding of SecureRandom
done seeding SecureRandom
dexport control - checking the cipher suites
export control - no cached value available...
export control - storing legal entry into cache...
%% No cached client session
** ClientHello, TLSv1
RandomCookie:...
Session ID: {}
Cipher Suites: ...
Compression Methods: { 0 }
main, WRITE: TLSv1 Handshake. length = 73
main, WRITE: SSLv2 client hello message, length = 98
main, READ: TLSv1 Handshake, length = 74
***ServerHello, TSLv1
RandomCookie: ...
Cipher Suite: ...
COmpression Method: 0
%% Created: ...
**SSL_RSA_WITH_RC4_128_MD5
main, READ: TLSv1 Handshake, length = 2702
*** Certificate chain
chain [0] = ...
[2] : ...
[3] : ...
[4] : ...
[5] : ...
chain [1] = ...
[2] : ...
[3] : ...
[4] : ...
[5] : ...
chain[2] =...
[2]: ...
Found trusted certificate:
main, READ: TLSv1 Handshake, length = 278
*** CertificateRequest
Cert Types: RSA, DSS,
Cert Authorities:
*** ServerHelloDone
*** Certificate chain
*** ClientKeyExchange, RSA PreMasterSecret, TLSv1
Random Secret: ...
main, WRITE: TLSv! Handshake, length = 141
SESSION KEYGEN:
PreMaster Secret:
CONNECTION KEYGEN:
Client Nonce:
Server Nonce:
Master Secret:
Client MAC write Secret:
Server MAC write Secret:
Client write key:
Server write key:
...no IV for cipher
main, WRITe: TLSv1 Change Cipher spec, length = 1
*** Finished
verify_data: ...
main, WRITE: TLSv1 Handshake, length = 32
main, waiting for close_notify or alert: state 1
main, Exception while waiting for close java.net.SocketException: Software caused connection abort: recv failed main, handling exception: java.net.SocketException: Software caused connection abort: recv failed
java.net.SocketException: Software caused connection abort: recv failed
at java.netSocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.interal.ssl.InputRecord.readFully(Uknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLCoketImpl.waitForClose(Unknown Source)
at com.sun.net.ssl.internal.ssl.HanshakeOutStream.flush(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.sendChagneCipherSpec(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFInish(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(Unknown Source)
at com.sun.net.ssl.internal.ssl.CLientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.internal.ssl.SLSocketImpl.startHandshake(Unknown Source)
at https.TestSSLSockets.main(TestSSLSockets.java:104)thanks again!
Message was edited by:
cjmose -
Https Issue:SSLHandshakeException:Received fatal alert:bad_certificate
hi experts,
My scenario is Proxy to AS2. In AS2 receiver I have https protocol. I have put SSL Certificate(keystore) value.
Let say
View- x
Certificate name- cer
then I have given
TRUSTED\x\cer
in SSL Certificate(keystore) field of AS2 receiver channel.
Let me know weather it is correct.
Second field in Communication channel is "Private key for Client Authentication". I have kept it as blank.
I am getting an error in AS2 Receiver Channel saying:-
Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate # , SEEBURGER AS2: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate #
My certificate has not expired yet.
Please help me in this matter.
Thanks
Jaideephi experts,
Please look into the below matter and help me to resolve it.
Thanks
Jaideep -
SSL: Received fatal alert: certificate_unknown Problem
Hi all, first I read this thread http://forums.sun.com/thread.jspa?threadID=5385002 but I didnt help me so i startad a new one.
I´m doing a client, server and thread implementation with ssl, i copied certifcates and keystores on the directories and so on.
Here is the error on the server, just when a client conects:
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at org.tockit.comunication.ServerThread.run(ServerThread.java:55)
at java.lang.Thread.run(Unknown Source)Here is the code of the client, server and server thread, i cant find the error as i follow some tutorials and it worked:
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import citic.android.remoteir.ComConstants;
import citic.android.remoteir.SendMessage;
public class Client {
public static void main(String[] args)
// Se crea el cliente y se le manda pedir el fichero.
Client cf = new Client();
BufferedReader in = null;
BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
String userInput;
cf.pide("rup", "localhost", 27960, 0, 20);
public void pide(String query, String servidor, int puerto, int startIndex, int count)
try
// Se abre el socket.
SSLSocketFactory sslsocketfactory = (SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket = (SSLSocket)sslsocketfactory.createSocket(servidor,puerto);
ObjectOutputStream oos = new ObjectOutputStream(socket
.getOutputStream());
SendMessage mensaje = new SendMessage();
mensaje.queryTerms = query;
mensaje.startIndex = startIndex;
mensaje.count = count;
oos.writeObject(mensaje);
ObjectInputStream ois = new ObjectInputStream(socket
.getInputStream());
ComConstants mensajeRecibido;
Object mensajeAux;
String mensa = null;
do
mensajeAux = ois.readObject();
// Si es del tipo esperado, se trata
if (mensajeAux instanceof ComConstants)
mensajeRecibido = (ComConstants) mensajeAux;
System.out.println("Client has Search Results");
String test;
test = new String(
mensajeRecibido.fileContent, 0,
mensajeRecibido.okBytes);
if (mensa == null) {
mensa = test;
else {
mensa += test;
System.out.println("client mierda" + test);
} else
System.err.println("Mensaje no esperado "
+ mensajeAux.getClass().getName());
break;
} while (!mensajeRecibido.lastMessage);
SaxParser sap = new SaxParser(mensa);
ois.close();
socket.close();
} catch (Exception e)
e.printStackTrace();
package org.tockit.comunication;
import java.io.*;
import java.net.*;
import java.security.KeyStore;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocket;
public class Server {
public static void main(String[] args) throws IOException {
ServerSocket serverSocket = null;
boolean listening = true;
System.out.println("Indroduzca valor del puerto");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader (isr);
int port;
try
String texto = br.readLine();
int valor = Integer.parseInt(texto);
port = valor;
try {
System.setProperty("javax.net.ssl.keyStore","C:\\Program Files\\Java\\jre6\\bin\\remoteir.ks");
System.setProperty("javax.net.ssl.keyStorePassword","aquabona");
SSLServerSocketFactory sslServerSocketfactory = (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
SSLServerSocket sslServerSocket = (SSLServerSocket)sslServerSocketfactory.createServerSocket(port);
System.out.println("Arracando servidor en " + port);
while (listening){
SSLSocket cliente = (SSLSocket)sslServerSocket.accept();
System.out.println("Aceptado cliente");
Runnable nuevoServer = new ServerThread(cliente);
Thread hilo = new Thread(nuevoServer);
hilo.start();
} catch (IOException e) {
System.err.println("Could not listen on port:" + port);
System.exit(-1);
catch (Exception e)
e.printStackTrace();
}The line at at org.tockit.comunication.ServerThread.run(ServerThread.java:55) is marked with ERRRROOOOOORRRRR and serverThread cod is posted on the fisrt reply post.
All this code works in absence of SSL (regular sockets).
I have another question related to the SSLSockets in the method of the serverThread, will my SSLSockets in the serverThread´s methods work to comunicate with other servers as i try to do?
Thanks!And this is a method like the ones i asked on #1, sorry about this but i cant post more than 7500 characters
private void enviaFicheroMultiple(String query, ObjectOutputStream oos, int startIndex, int count, ArrayList<String> ips, ArrayList<String> ports, SearcherValue value)
try
String finalString = "";
String tempFinal = "";
QueryWithResult[] outputLine;
QueryWithResult[] finalResults = new QueryWithResult[1];
Operations op = new Operations();
boolean enviadoUltimo=false;
ComConstants mensaje = new ComConstants();
mensaje.queryTerms = query;
outputLine = op.processInput(query, value);
int i = 0;
boolean firstRun = true;
while (i < ips.size()) {
String ip = ips.get(i);
int port = Integer.parseInt(ports.get(i));
try
SSLSocketFactory sslsocketfactory = (SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket = (SSLSocket)sslsocketfactory.createSocket(ip,port);
ObjectOutputStream ooos = new ObjectOutputStream(socket
.getOutputStream());
SendMessage message = new SendMessage();
message.numDoc = value.numDoc;
message.docFreq = value.docFreq;
message.queryTerms = query;
message.startIndex = startIndex;
message.count = count;
message.multiple = false;
message.ips = null;
message.ports = null;
message.value = true;
message.docFreq = value.docFreq;
message.numDoc = value.numDoc;
ooos.writeObject(message);
ObjectInputStream ois = new ObjectInputStream(socket
.getInputStream());
QueryWithResult[] qwr = (QueryWithResult[]) ois.readObject();
int size = qwr.length;
int num=0;
boolean kk = true;
int pos = 0;
if(firstRun) {
finalResults = new QueryWithResult[size];
finalResults = qwr;
System.out.println("lenght" + finalResults.length);
} else {
QueryWithResult[] old = finalResults;
finalResults = new QueryWithResult[old.length + size];
int y =0;
while(y < old.length){
finalResults[y] = old[y];
y++;
int l = old.length;
int k = qwr.length;
while(l < finalResults.length){
finalResults[l] = qwr[0];
l++;
firstRun = false;
ois.close();
socket.close();
} catch (Exception e)
e.printStackTrace();
i++;
QueryWithResult[] old = finalResults;
finalResults = new QueryWithResult[old.length + outputLine.length];
int y =0;
while(y < old.length){
finalResults[y] = old[y];
y++;
int l = old.length;
int k = outputLine.length;
while(l < finalResults.length){
finalResults[l] = outputLine[0];
l++;
XmlConverter xce = new XmlConverter(finalResults, startIndex, count);
String serialized = xce.runConverter();
finalString = serialized + tempFinal;
finalString = finalString.trim();
System.out.println("Final String " + finalString);
byte mybytearray[] = finalString.getBytes();
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(mybytearray);
BufferedInputStream bis = new BufferedInputStream(byteArrayInputStream);
int readed = bis.read(mensaje.fileContent,0,4000);
while (readed > -1)
mensaje.okBytes = readed;
if (readed < ComConstants.MAX_LENGTH)
mensaje.lastMessage = true;
enviadoUltimo=true;
else
mensaje.lastMessage = false;
oos.writeObject(mensaje);
if (mensaje.lastMessage)
break;
mensaje = new ComConstants();
mensaje.queryTerms = query;
readed = bis.read(mensaje.fileContent);
if (enviadoUltimo==false)
mensaje.lastMessage=true;
mensaje.okBytes=0;
oos.writeObject(mensaje);
oos.close();
} catch (Exception e)
e.printStackTrace();
} -
SSLHandShakeException's fatal alert certificate_unknown
Trying to connect RMI SSL Client with RMI non-SSL Server with and getting following exception. How should i check SSLHandShakeException's fatal alert certificate_unknown in the code ? Also I am setting SSL properties(keystore, truststore, passwords) using System.setPropertiy()
*** ServerHelloDone
RMI TCP Connection(11)-10.229.194.39, WRITE: TLSv1 Handshake, length = 659
RMI TCP Connection(11)-10.229.194.39, READ: TLSv1 Alert, length = 2
RMI TCP Connection(11)-10.229.194.39, RECV TLSv1 ALERT: fatal, certificate_unknown
RMI TCP Connection(11)-10.229.194.39, called closeSocket()
RMI TCP Connection(11)-10.229.194.39, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
RMI TCP Connection(11)-10.229.194.39, called close()
RMI TCP Connection(11)-10.229.194.39, called closeInternal(true)
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
RMI TCP Connection(12)-10.229.194.39, setSoTimeout(7200000) called
RMI TCP Connection(12)-10.229.194.39, READ: SSL v2, contentType = Handshake, translated length = 73
*** ClientHello, TLSv1
RandomCookie: GMT: 1360739234 bytes = { 103, 192, 214, 126, 21, 70, 8, 98, 28, 38, 177, 79, 93, 98, 219, 3, 14, 199, 232, 12, 186, 102, 148, 116, 240, 107, 25, 14 }
Session ID: {}890918 wrote:
Trying to connect RMI SSL Client with RMI non-SSL Server with and getting following exception.What you have posted is not an exception, it is an SSL debug trace, and you could not possibly have got it by connecting to a non-SSL server. -
Received fatal alert: certificate_unknown
i am making a SSL client server application.
i got this exception
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1657)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:932)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
how can i solve it?thanks my all helpers..
i made new certificate.
some more details are under
1. SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) SLServerSocketFactory.getDefault();
2. SSLServerSocket server= null;
3. server= (SSLServerSocket) sslserversocketfactory.createServerSocket(4444);
4. SSLSocket socket = (SSLSocket) server.accept();
5. System.out.print(socket.getInetAddress().getLocalHost());
6. ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());Exception through at *6* line from server side
complete stack trace
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1657)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:932)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
at java.io.ObjectOutputStream.<init>(ObjectOutputStream.java:226)
at NPBClientGUI.Connect.ConnectMe(Connect.java:87)
at NPBClientGUI.Connect.btnConnectActionPerformed(Connect.java:226)
at NPBClientGUI.Connect.access$200(Connect.java:42)
at NPBClientGUI.Connect$2.actionPerformed(Connect.java:175)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6134)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5899)
at java.awt.Container.processEvent(Container.java:2023)
at java.awt.Component.dispatchEventImpl(Component.java:4501)
at java.awt.Container.dispatchEventImpl(Container.java:2081)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
at java.awt.Container.dispatchEventImpl(Container.java:2067)
at java.awt.Window.dispatchEventImpl(Window.java:2458)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Edited by: Muneer_Ahmed on May 8, 2009 12:27 PM -
Webcenter Spaces Events Service configuration: FATAL Alert BAD CERTIFICATE
Hello,
I have a simple requirement to connect the events taskflow from an exchange server that is https and has a confirmed security certificate. I use the wsdl path for the events service and add it to my webcenter spaces service configuration -> Personal Events configuration.
Then I ran into this error.
javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.
So, I downloaded the .crt file from Chrome (in per format) and used the keytool to upload the certificate exception into the cacerts file inside jdk and jrocket folders. I restart the managed server running WebCenter Spaces. This had no effect on the error.
Is there anything else that I should do?
Thanks,
PradyumnaI have the same problem. Did You resolve it?
-
WLS 10.3.3 not supporting SHA2 cert at provider end . (wild card certificate cannot be imported to trusted certs)
During integration from OSB 11g we face below exception :
General runtime error: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received
Regards,
AnithaEnable -Dssl.debug=true java option and capture the logs.
You might find this userful
http://weblogic-wonders.com/weblogic/2010/01/28/troubleshooting-ssl-issues/ -
Why get "fatal alert: bad_certificate" but "certificate_expired"
Hi all,
I am testing 2 way SSL authentication now.
Expected Result:
When the client side provides a expired client cert to the server during handshaking, the server is supposed to return fatal alert: certificate_expired, which is exactly the client side wanna receive.
Acturally Result:
At first, I test server side with Tomcat, but the coming out result is that server will reject the connection with fatal alert: certificate_unknown.
Then, I try Weblogic. From Weblogic, I can see the warn:
<Nov 16, 2007 3:31:01 PM GMT+08:00>
<Warning><Security><BEA-090479>
<Certificate chain received from 206.225.50.35 - 206.225.50.35 failed date validity checks.>
But the client side will receive fatal alert : bad_certificate.
Any solution to get the expected response from server with fatal alert: certificate_expired?
Your help are appreciated!Hi all,
I am testing 2 way SSL authentication now.
Expected Result:
When the client side provides a expired client cert to the server during handshaking, the server is supposed to return fatal alert: certificate_expired, which is exactly the client side wanna receive.
Acturally Result:
At first, I test server side with Tomcat, but the coming out result is that server will reject the connection with fatal alert: certificate_unknown.
Then, I try Weblogic. From Weblogic, I can see the warn:
<Nov 16, 2007 3:31:01 PM GMT+08:00>
<Warning><Security><BEA-090479>
<Certificate chain received from 206.225.50.35 - 206.225.50.35 failed date validity checks.>
But the client side will receive fatal alert : bad_certificate.
Any solution to get the expected response from server with fatal alert: certificate_expired?
Your help are appreciated! -
FTPSClient - SSL Received fatal alert: bad_record_mac
I am trying to connect to an out of network server using org.apache.commons.net.ftp.FTPSClient
and trying to upload a file.
The code works correctly when i execute it from localhost but throws the following exception from prod server.
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1682)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:932)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
at org.apache.commons.net.ftp.FTPSClient.sslNegotiation(FTPSClient.java:240)
at org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:171)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:178)
Code
FTPClient ftp = new FTPSClient("SSL")
ftp.connect(server, 21);
reply = ftp.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
log.debug("FTP server refused connection.");
return;
//ftp.enterRemotePassiveMode();
ftp.enterLocalPassiveMode();
ftp.login(username, password);
======================
Any suggestions why would it work from my localhost and not from the server.
Could it be a firewall issue or do i need to user a certificate?The FTP server sent you an alert saying that it received a bad_record_MAC from you, i.e. the client.
So there is something wrong with the client you used when it failed, or the underlying version of JSSE. Are the versions of Java the same in both cases? -
Got SSLKeyException:FATAL Alert:BAD_CERTIFICATE using weblogic ws test tool
Hi,
Iam trying to test the webservices using the WebLogic Webservice standard testing home page. The services work fine without SSL, but if the server is setup to use SSL, I get a BAD CERTIFICATE exception using the testing home page.
Although, when I invoke the services through a different SOAP client they do work with SSL turned on provided I import the trusted ca (using my own certificate authority) to java cacerts file.
I set up the custom trust and identity keystores and Iam using my own trusted authority. Configured the SSL as detailed in
http://e-docs.bea.com/wls/docs81/secmanage/ssl.html
Is this a bug related to WebLogic Webservice testing home page or am I missing something. Any help will be greatly appreciated.
Thanks
Veena.
weblogic.webservice.tools.wsdlp.WSDLParseException: Failed to retrieve WSDL from https://raiders.fgm.com:7002/searchservice/SearchService?WSDL. Please check the URL and make sure that it is a valid XML file [javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.] at weblogic.webservice.tools.wsdlp.DefinitionFactory.createDefinition(Ljava.lang.String;)Lweblogic.xml.xmlnode.XMLNode;(DefinitionFactory.java:151) at weblogic.webservice.tools.wsdlp.WSDLParser.(Ljava.lang.String;)V(WSDLParser.java:76) at weblogic.webservice.WebServiceFactory.createFromWSDL(Ljava.lang.String;Ljava.lang.String;Ljavax.xml.rpc.encoding.TypeMappingRegistry;)Lweblogic.webservice.WebService;(WebServiceFactory.java:108) at weblogic.webservice.WebServiceFactory.createFromWSDL(Ljava.lang.String;Ljavax.xml.rpc.encoding.TypeMappingRegistry;)Lweblogic.webservice.WebService;(WebServiceFactory.java:84) at weblogic.webservice.server.servlet.ServletBase.invokeOperation(Ljava.lang.String;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.xml.rpc.encoding.TypeMappingRegistry;Lweblogic.webservice.Operation;)V(ServletBase.java:295) at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(Ljava.lang.String;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.xml.rpc.encoding.TypeMappingRegistry;Lweblogic.webservice.Operation;)V(WebServiceServlet.java:343) at weblogic.webservice.server.servlet.ServletBase.handleGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lweblogic.webservice.WebService;)V(ServletBase.java:266) at weblogic.webservice.server.servlet.ServletBase.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ServletBase.java:158) at weblogic.webservice.server.servlet.WebServiceServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(WebServiceServlet.java:254) at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6452) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3661) at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630) at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178) at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)Thank You Prasanna for your response.
I converted the trusted CA cert to PEM format and copied it to the domain directory and restarted the weblogic server after setting the following properties weblogic.webservice.client.ssl.strictcertchecking=false
weblogic.security.SSL.ignoreHostnameVerification=true
But, Iam still getting the BAD certificate exception.
Thanks
Veena. -
Hi There,
am getting error when invoking a webservice from OSB .
"The invocation resulted in an error: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received..".
certs were loaded to the trust store and could see certificates in Trust store.
surprisingly, same webservice works from SOA BPEL and even from soapUI.
I even made Host Name verification to NONE... none of those helped.
your suggestions are very much appreciated.
Thanks,
Karthik.Enable -Dssl.debug=true java option and capture the logs.
You might find this userful
http://weblogic-wonders.com/weblogic/2010/01/28/troubleshooting-ssl-issues/ -
FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was receiv
I am trying to invoke a third part web-service (EDC RAVE) through the Oracle Service Bus/Weblogic Server. However whenever I try to use a business service to connect I get the following error message:
The invocation resulted in an error: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received..
I have tried to add the certificate to the set of trusted demo certificates but that doesn't seem to have solved the problem. Does anyone know how to resolve the problem?
The only solution I have found is:
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/webserv/trouble.html#1071057
But I am using 10.3, not 8.1.Hi,
I am getting the same error while invoking a Rave webservice from ALSB or from a web application hosted on weblogic 10.3.
I have tried first two of the options below, still got the same execption:
1) Disable host name verification ( never a pleasant thought )
2) Write your own custom hostname verification
3) Ask them to get a cert specific to their host ( with a CN of "someserver.mdsol.com, for instance ).
3rd one is not an option for us, as Medidata does not want to do any change in their setup or to obtain new certificate with CN specific to their host.
After troubleshooting for several days I am out of ideas. Would appreciate if someone helps me on this.
Some further details:
The Rave server presents a wildcard certificate with CN as *.mdsol.com. I have imported all the certificates in the chain to the trust store.
Configured the trust store in weblogic and disabled host name verification.
I have enabled the ssl debug, when i invoke Rave webservice, getting the following errors :
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Use Certicom SSL with Domestic strength>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Ignoring not supported JCE Mac: SunJCE version 1.6 for algorithm HmacSHA1>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Will use default Mac for algorithm HmacSHA1>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Ignoring not supported JCE Mac: SunJCE version 1.6 for algorithm HmacMD5>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Will use default Mac for algorithm HmacMD5>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Ignoring not supported JCE KeyAgreement: SunJCE version 1.6 for algorithm DiffieHellman>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Will use default KeyAgreement for algorithm DiffieHellman>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Will use default KeyAgreement for algorithm ECDH>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm DESede/CBC/NoPadding>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm DES/CBC/NoPadding>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm AES/CBC/NoPadding>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm RC4>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm RSA>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm RSA/ECB/NoPadding>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSL Session TTL :90000>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSLSetup: loading trusted CA certificates>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSL enableUnencryptedNullCipher= false>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSLContextManager: loading server SSL identity>
<Aug 29, 2010 8:05:18 PM IST> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias usadc-vsedc35.quintiles.
net from the JKS keystore file C:\eDC-ODM\Beta\ssl\wls\dev1\WLS1\keystore\edc_server.jks.>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Loaded public identity certificate chain:>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: CN=usadc-vsedc35.quintiles.net, OU=Global Solutions, O=Quintiles, L=Morrisville, ST=NC, C=US; Issuer: CN=USKAN-SECSA01, DC=quintiles, DC=net>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: CN=USKAN-SECSA01, DC=quintiles, DC=net; Issuer: CN=uskan-secs02, DC=quintiles, DC=net>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: CN=uskan-secs02, DC=quintiles, DC=net; Issuer: CN=uskan-secs02, DC=quintiles, DC=net>
<Aug 29, 2010 8:05:18 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Using JCE Cipher: SunJCE version 1.6 for algorithm RSA/ECB/NoPadding>
<Aug 29, 2010 8:05:20 PM IST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the JKS keystore file C:\eDC-ODM\Beta\ssl\alsb\truststore\pftrust.jks.>
<Aug 29, 2010 8:05:20 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSLContextManager: loaded 4 trusted CAs from C:\eDC-ODM\Beta\ssl\alsb\truststore\pftrust.jks>
<Aug 29, 2010 8:05:20 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: CN=ca.webcrf.net, OU=IAS Engineering, O=Phase Forward, L=Waltham, ST=Massachusetts, C=US; Issuer: CN=ca.webcrf.net, OU=IAS Engineering, O=Phase Forward, L=Waltham, ST=Massachusetts, C=US>
<Aug 29, 2010 8:05:20 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US; Issuer: OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US>
<Aug 29, 2010 8:05:20 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: CN=*.mdsol.com, OU=Domain Control Validated, O=*.mdsol.com; Issuer: SERIALNUMBER=07969287, CN=Go Daddy Secure Certification Authority, OU=http://certificates.godaddy.com/repository, O="GoDaddy.com, Inc.", L=Scottsdale, ST=Arizona, C=US>
<Aug 29, 2010 8:05:20 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Subject: SERIALNUMBER=07969287, CN=Go Daddy Secure Certification Authority, OU=http://certificates.godaddy.com/repository, O="GoDaddy.com, Inc.", L=Scottsdale, ST=Arizona, C=US; Issuer: OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US>
<Aug 29, 2010 8:05:20 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Failed to load server trusted CAs
java.security.cert.CertificateParsingException: Could not set value for ASN.1 string object.
at com.certicom.security.cert.internal.x509.X509V3CertImpl.<init>(Unknown Source)
at com.certicom.tls.interfaceimpl.CertificateSupport.addTrustedCertificate(Unknown Source)
at com.certicom.net.ssl.SSLContext.addTrustedCertificate(Unknown Source)
at com.bea.sslplus.CerticomSSLContext.addTrustedCA(Unknown Source)
at weblogic.security.utils.SSLContextWrapper.addTrustedCA(SSLContextWrapper.java:62)
at weblogic.security.utils.SSLContextManager.createServerSSLContext(SSLContextManager.java:424)
at weblogic.security.utils.SSLContextManager.getDefaultServerSSLContext(SSLContextManager.java:318)
at weblogic.security.utils.SSLContextManager.getServerTrustedCAs(SSLContextManager.java:279)
at weblogic.security.utils.SSLSetup.getTrustedCAs(SSLSetup.java:438)
at weblogic.security.utils.SSLSetup.getSSLContext(SSLSetup.java:317)
at weblogic.security.SSL.SSLClientInfo.getSSLSocketFactory(SSLClientInfo.java:101)
at weblogic.security.SSL.SSLSocketFactory.setSSLClientInfo(SSLSocketFactory.java:218)
at weblogic.security.SSL.SSLSocketFactory.<init>(SSLSocketFactory.java:36)
at weblogic.security.SSL.SSLSocketFactory.getInstance(SSLSocketFactory.java:68)
at weblogic.net.http.HttpsClient.New(HttpsClient.java:561)
at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:242)
at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:133)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:140)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:180)
at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:206)
at test.GetFromRWS.doGet(GetFromRWS.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
<Aug 29, 2010 8:05:22 PM IST> <Debug> <SecuritySSL> <BEA-000000> <Filtering JSSE SSLSocket>
<Aug 29, 2010 8:05:22 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSLIOContextTable.addContext(ctx): 4106403>
<Aug 29, 2010 8:05:22 PM IST> <Debug> <SecuritySSL> <BEA-000000> <SSLSocket will be Muxing>
<Aug 29, 2010 8:05:22 PM IST> <Debug> <SecuritySSL> <BEA-000000> <write SSL_20_RECORD>
<Aug 29, 2010 8:05:22 PM IST> <Debug> <SecuritySSL> <BEA-000000> <isMuxerActivated: false>
<Aug 29, 2010 8:05:23 PM IST> <Debug> <SecuritySSL> <BEA-000000> <11680652 SSL3/TLS MAC>
<Aug 29, 2010 8:05:23 PM IST> <Debug> <SecuritySSL> <BEA-000000> <11680652 received HANDSHAKE>
<Aug 29, 2010 8:05:23 PM IST> <Debug> <SecuritySSL> <BEA-000000> <HANDSHAKEMESSAGE: ServerHello>
<Aug 29, 2010 8:05:23 PM IST> <Debug> <SecuritySSL> <BEA-000000> <isMuxerActivated: false>
<Aug 29, 2010 8:05:24 PM IST> <Debug> <SecuritySSL> <BEA-000000> <11680652 SSL3/TLS MAC>
<Aug 29, 2010 8:05:24 PM IST> <Debug> <SecuritySSL> <BEA-000000> <11680652 received HANDSHAKE>
<Aug 29, 2010 8:05:24 PM IST> <Debug> <SecuritySSL> <BEA-000000> <HANDSHAKEMESSAGE: Certificate>
<Aug 29, 2010 8:05:24 PM IST> <Debug> <SecuritySSL> <BEA-000000> <NEW ALERT with Severity: FATAL, Type: 42
java.lang.Exception: New alert stack
at com.certicom.tls.record.alert.Alert.<init>(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:154)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:358)
at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37)
at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:947)
at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:221)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:149)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:180)
at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:206)
at test.GetFromRWS.doGet(GetFromRWS.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Thanks 'n Regards,
Satya
Edited by: user10115986 on Aug 31, 2010 2:03 AM -
Client Auth failure:SSLException Received fatal alert: bad_certificate
Friends,
I have managed to establish a one -way https connection between the client and the tomcat-server by keeping the client-Authentication=false
<Connector
enableLookups="true"
port="8443"
scheme="https"
secure="true"
maxProcessors="75"
debug="0"
clientAuth="false"
keystorePass="arps3241"
keystoreFile="/usr/local/tomcat/bin/arps-dev.keystore"
className="org.apache.coyote.tomcat5.CoyoteConnector"
minProcessors="5"
sslProtocol="TLS">
</Connector>
. However , when i switch- 'on' the client-Authetication parameter i.e.clientAuth="true" in the server.xml for 2 way trust, I get the following error :-
javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:117)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1584)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:866)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:622)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:827)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1975)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
Can any body please guide me?The server's truststore doesn't trust or possibly even recognize the client's certificate which came from the client's keystore.
Maybe you are looking for
-
How can I transfer purchases on my iPhone 5 to iTunes 11.1?
I want to update my iPhone to the new iOS 7 update, but I can't do that without transfering the purchases on my iPhone 5 to itunes. I can't seem to figure out exactly how to do that though, can someone explain how to transfer music and apps from the
-
Writing to file with specific encoding in unix
hi, I want to write html files which contain Turkish characters in unix operating system. I'm currently using FileWriter to write the files. I'm getting the file content from the database and I can see that the characters seem to be fine but when I w
-
Hi All, I have implemented the AP Check printing prog in r12 for mutiple countries like US, CA, FR, DE, UK. Now i am working on Check printing for Costa Rica. The main problem here is that i HAVE to use a EPSON FX-2190 dotmatrix printer to print thes
-
Patterns in analysis authorization
Dear experts, We are on SAP BW 7.31 SP 8 using analysis authorization (AA). First of all: I know of the limitations using patterns like * and + (Note 1053989). Before we went to AA we used complex patterns of * in an authorization infobject that was
-
I am having problems with the Ipad accepting my password in the secure mode in Wifi. I can get into wifi when the secure mode is off. This only started when I downloaded the lastest update for the Ipad. Anyone else having the same problems? I have r