Basic Authentication issue with Restlet 2.2 version

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

Basic Authentication issue with Restlet 2.2 version

This post has NOT been accepted by the mailing list yet.
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: 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:

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" );
                Response response = resource.getResponse();
                Representation rep = resource.get();

Appreciate quick help.