Authentication issue(BAD_CERTIFICATE ) with Restlet2.2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Authentication issue(BAD_CERTIFICATE ) with Restlet2.2

Venkat
This post has NOT been accepted by the mailing list yet.
Hi,
We migrated from Restlet 1.1.5 version to Restlet 2.2 version. while making restcall using basic authentication, i am getting below error.

Caused by: javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source)
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Sour


my code:
ClientResource resource = new ClientResource("uri");
Context context = new Context();
                Client client = new Client(context, Protocol.HTTPS);
                ChallengeResponse challenge = new ChallengeResponse(ChallengeScheme.HTTP_BASIC, "username","Password");
       
                context.getParameters().add("socketConnectTimeoutMs", "5000");
                context.getParameters().add("readTimeout","10000" );
                resource.setChallengeResponse(challenge);
                resource.setNext(client);
                resource.setRetryOnError(false);
                Response response = resource.getResponse();
                Representation rep = resource.get();

Appreciate quick help.