{"action":"opened","issue":{"url":"https://api.github.com/repos/jayway/rest-assured/issues/81","labels_url":"https://api.github.com/repos/jayway/rest-assured/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/jayway/rest-assured/issues/81/comments","events_url":"https://api.github.com/repos/jayway/rest-assured/issues/81/events","html_url":"https://github.com/jayway/rest-assured/issues/81","id":96071346,"number":81,"title":"Setting keystore doesn't work","user":{"login":"johanhaleby","id":187029,"avatar_url":"https://avatars.githubusercontent.com/u/187029?v=3","gravatar_id":"","url":"https://api.github.com/users/johanhaleby","html_url":"https://github.com/johanhaleby","followers_url":"https://api.github.com/users/johanhaleby/followers","following_url":"https://api.github.com/users/johanhaleby/following{/other_user}","gists_url":"https://api.github.com/users/johanhaleby/gists{/gist_id}","starred_url":"https://api.github.com/users/johanhaleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanhaleby/subscriptions","organizations_url":"https://api.github.com/users/johanhaleby/orgs","repos_url":"https://api.github.com/users/johanhaleby/repos","events_url":"https://api.github.com/users/johanhaleby/events{/privacy}","received_events_url":"https://api.github.com/users/johanhaleby/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jayway/rest-assured/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/jayway/rest-assured/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/jayway/rest-assured/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-20T14:03:57Z","updated_at":"2015-07-20T14:03:57Z","closed_at":null,"body":"```\nI supply the keystore file but it doesn't work.. I also made a liitle java \nprogram to see if the keystore works at all.\n\n\nopenssl s_client -connect https://unity-unl-acc.powerhouse.local -starttls ssl \n> essent.cer\n\n\nSystem.setProperty(\"javax.net.ssl.trustStore\",\"/path/to/myKeystore\");\nSystem.setProperty(\"javax.net.ssl.trustStorePassword\",\"password\");\n\t\t\nURL url = new URL(\"https://url.local\");\nURLConnection con = url.openConnection();\nReader reader = new InputStreamReader(con.getInputStream());\nwhile (true) {\n\tint ch = reader.read();\n\tif (ch == -1) {\n\t\tbreak;\n\t}\n\tSystem.out.print((char) ch);\n}\n\nGives expected output. (without keystore it does NOT)\n\n\nMy rest assured test look like this:\n\nRestAssured.baseURI = getData().getUrl();\nRestAssured.requestSpecification = new \nRequestSpecBuilder().log(LogDetail.ALL).setContentType(ContentType.JSON).build()\n;\nRestAssured.defaultParser = Parser.JSON;\n\n/* Object creation */\nSession session = new Session();\nsession.setGebruikersnaam(\"test1\");\nsession.setWachtwoord(\"test1\");\n\nchar[] password = \"changeit\".toCharArray();\n\nFileInputStream fIn = new FileInputStream(\"path/to/myKeystore\");\nKeyStore keystore = KeyStore.getInstance(\"JKS\");\nkeystore.load(fIn, password);\n\n/* Rest call */\nResponse res = \ngiven().trustStore(keystore).body(session).post(\"/rest/session\").then().extract(\n).response();\n\nand gives the following output:\njavax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: \nPKIX path building failed: \nsun.security.provider.certpath.SunCertPathBuilderException: unable to find \nvalid certification path to requested target\n\tat sun.security.ssl.Alerts.getSSLException(Alerts.java:192)\n\tat sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1917)\n\t\n\t\nWhat can be the cause of this? How to debug/fix this?\n\nAny help is much appreciated! \n```\n\nOriginal issue reported on code.google.com by `dekleijn...@gmail.com` on 28 Apr 2015 at 9:57"}}