Peer not authenticated exception while consuming https REST service
===

I have created REST services using RESTEasy and generated certificate using openssl and configured with https from this [JBoss link][1]. When I try to consume the service like this,

    ClientRequest request = new ClientRequest("https://localhost:8443/services/users");
    request.accept(MediaType.APPLICATION_XML);
    ClientResponse<Result> response = request.post(Status.class);

I got "Peer not authenticated" exception. In google I saw this error and people suggested to use Apache Http Client. But I am using RESTeasy client to consume the service. How I can avoid this error?


  [1]: https://community.jboss.org/wiki/JBossAS7ConfiguringSSLOnJBossWeb