{"action":"created","comment":{"url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments/92249852","pull_request_review_id":12761977,"id":92249852,"diff_hunk":"@@ -629,4 +626,48 @@ protected SSLContext createSSLContext() throws NoSuchAlgorithmException {\n \t\treturn SSLContext.getInstance(this.sslAlgorithm);\n \t}\n \n+\n+\t/**\n+\t * In case the client doesn't provide the sslProperties location or the truststore is null delegate to Java's default\n+\t * trust mechanism\n+\t * @throws NoSuchAlgorithmException\n+\t * @throws KeyManagementException\n+\t * @throws KeyStoreException\n+     */\n+\tpublic void useDefaultTrustStoreMechanism() throws NoSuchAlgorithmException, KeyManagementException,\n+\t\t\tKeyStoreException {\n+\t\tSSLContext c = SSLContext.getInstance(this.sslAlgorithm);\n+\t\tc.init(null, new TrustManager[] {  getDefaultTrustManager(TrustManagerFactory.getDefaultAlgorithm(), null) }, null);","path":"spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitConnectionFactoryBean.java","position":45,"original_position":45,"commit_id":"2819344e621136fb2c4eb7b5c0d698ff01ecbc0b","original_commit_id":"2819344e621136fb2c4eb7b5c0d698ff01ecbc0b","user":{"login":"artembilan","id":1071590,"avatar_url":"https://avatars.githubusercontent.com/u/1071590?v=3","gravatar_id":"","url":"https://api.github.com/users/artembilan","html_url":"https://github.com/artembilan","followers_url":"https://api.github.com/users/artembilan/followers","following_url":"https://api.github.com/users/artembilan/following{/other_user}","gists_url":"https://api.github.com/users/artembilan/gists{/gist_id}","starred_url":"https://api.github.com/users/artembilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artembilan/subscriptions","organizations_url":"https://api.github.com/users/artembilan/orgs","repos_url":"https://api.github.com/users/artembilan/repos","events_url":"https://api.github.com/users/artembilan/events{/privacy}","received_events_url":"https://api.github.com/users/artembilan/received_events","type":"User","site_admin":false},"body":"Why can't we use here something like this?\r\n```\r\nTrustManagerFactory tmf = TrustManagerFactory.getInstance(\"SunX509\");\r\ntmf.init(null);\r\nc.init(null, tmf.getTrustManagers(), null);\r\n```","created_at":"2016-12-13T19:42:56Z","updated_at":"2016-12-13T19:48:07Z","html_url":"https://github.com/spring-projects/spring-amqp/pull/523#discussion_r92249852","pull_request_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523","_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments/92249852"},"html":{"href":"https://github.com/spring-projects/spring-amqp/pull/523#discussion_r92249852"},"pull_request":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523"}}},"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523","id":97810114,"html_url":"https://github.com/spring-projects/spring-amqp/pull/523","diff_url":"https://github.com/spring-projects/spring-amqp/pull/523.diff","patch_url":"https://github.com/spring-projects/spring-amqp/pull/523.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/523","number":523,"state":"open","locked":false,"title":"Rabbit SSL connection error RabbitConnectionFactoryBean","user":{"login":"harrydevnull","id":13472925,"avatar_url":"https://avatars.githubusercontent.com/u/13472925?v=3","gravatar_id":"","url":"https://api.github.com/users/harrydevnull","html_url":"https://github.com/harrydevnull","followers_url":"https://api.github.com/users/harrydevnull/followers","following_url":"https://api.github.com/users/harrydevnull/following{/other_user}","gists_url":"https://api.github.com/users/harrydevnull/gists{/gist_id}","starred_url":"https://api.github.com/users/harrydevnull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harrydevnull/subscriptions","organizations_url":"https://api.github.com/users/harrydevnull/orgs","repos_url":"https://api.github.com/users/harrydevnull/repos","events_url":"https://api.github.com/users/harrydevnull/events{/privacy}","received_events_url":"https://api.github.com/users/harrydevnull/received_events","type":"User","site_admin":false},"body":"#522\r\n\r\nIn case if we use RabbitConnectionFactoryBean with\r\nuseSSL=true\r\n&&sslPropertiesLocation == null && keyStore == null &&trustStore == null\r\n&& keyStorePassphrase == null && this.trustStorePassphrase == null\r\n\r\nit makes a call to amqp-rabbit-connectionfactory which does nothing which is a security flaw as such. It opens a possibility of man-in-middle attack.\r\nthis fix would would delegate to Java's trust mechanism if truststore or ssllocationpath is null.\r\n","created_at":"2016-12-13T18:40:35Z","updated_at":"2016-12-13T19:48:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c0e3cb4fb85d5461b92bef2ff2f5d2440a2d806","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/523/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-amqp/statuses/2819344e621136fb2c4eb7b5c0d698ff01ecbc0b","head":{"label":"harrydevnull:master","ref":"master","sha":"2819344e621136fb2c4eb7b5c0d698ff01ecbc0b","user":{"login":"harrydevnull","id":13472925,"avatar_url":"https://avatars.githubusercontent.com/u/13472925?v=3","gravatar_id":"","url":"https://api.github.com/users/harrydevnull","html_url":"https://github.com/harrydevnull","followers_url":"https://api.github.com/users/harrydevnull/followers","following_url":"https://api.github.com/users/harrydevnull/following{/other_user}","gists_url":"https://api.github.com/users/harrydevnull/gists{/gist_id}","starred_url":"https://api.github.com/users/harrydevnull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harrydevnull/subscriptions","organizations_url":"https://api.github.com/users/harrydevnull/orgs","repos_url":"https://api.github.com/users/harrydevnull/repos","events_url":"https://api.github.com/users/harrydevnull/events{/privacy}","received_events_url":"https://api.github.com/users/harrydevnull/received_events","type":"User","site_admin":false},"repo":{"id":76376664,"name":"spring-amqp","full_name":"harrydevnull/spring-amqp","owner":{"login":"harrydevnull","id":13472925,"avatar_url":"https://avatars.githubusercontent.com/u/13472925?v=3","gravatar_id":"","url":"https://api.github.com/users/harrydevnull","html_url":"https://github.com/harrydevnull","followers_url":"https://api.github.com/users/harrydevnull/followers","following_url":"https://api.github.com/users/harrydevnull/following{/other_user}","gists_url":"https://api.github.com/users/harrydevnull/gists{/gist_id}","starred_url":"https://api.github.com/users/harrydevnull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harrydevnull/subscriptions","organizations_url":"https://api.github.com/users/harrydevnull/orgs","repos_url":"https://api.github.com/users/harrydevnull/repos","events_url":"https://api.github.com/users/harrydevnull/events{/privacy}","received_events_url":"https://api.github.com/users/harrydevnull/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/harrydevnull/spring-amqp","description":"Spring AMQP - support for Spring programming model with AMQP, especially but not limited to RabbitMQ","fork":true,"url":"https://api.github.com/repos/harrydevnull/spring-amqp","forks_url":"https://api.github.com/repos/harrydevnull/spring-amqp/forks","keys_url":"https://api.github.com/repos/harrydevnull/spring-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harrydevnull/spring-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harrydevnull/spring-amqp/teams","hooks_url":"https://api.github.com/repos/harrydevnull/spring-amqp/hooks","issue_events_url":"https://api.github.com/repos/harrydevnull/spring-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/harrydevnull/spring-amqp/events","assignees_url":"https://api.github.com/repos/harrydevnull/spring-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/harrydevnull/spring-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/harrydevnull/spring-amqp/tags","blobs_url":"https://api.github.com/repos/harrydevnull/spring-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harrydevnull/spring-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harrydevnull/spring-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/harrydevnull/spring-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harrydevnull/spring-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/harrydevnull/spring-amqp/languages","stargazers_url":"https://api.github.com/repos/harrydevnull/spring-amqp/stargazers","contributors_url":"https://api.github.com/repos/harrydevnull/spring-amqp/contributors","subscribers_url":"https://api.github.com/repos/harrydevnull/spring-amqp/subscribers","subscription_url":"https://api.github.com/repos/harrydevnull/spring-amqp/subscription","commits_url":"https://api.github.com/repos/harrydevnull/spring-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/harrydevnull/spring-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/harrydevnull/spring-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/harrydevnull/spring-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/harrydevnull/spring-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/harrydevnull/spring-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harrydevnull/spring-amqp/merges","archive_url":"https://api.github.com/repos/harrydevnull/spring-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harrydevnull/spring-amqp/downloads","issues_url":"https://api.github.com/repos/harrydevnull/spring-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/harrydevnull/spring-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/harrydevnull/spring-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/harrydevnull/spring-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harrydevnull/spring-amqp/labels{/name}","releases_url":"https://api.github.com/repos/harrydevnull/spring-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/harrydevnull/spring-amqp/deployments","created_at":"2016-12-13T16:18:49Z","updated_at":"2016-12-13T16:18:52Z","pushed_at":"2016-12-13T18:33:54Z","git_url":"git://github.com/harrydevnull/spring-amqp.git","ssh_url":"git@github.com:harrydevnull/spring-amqp.git","clone_url":"https://github.com/harrydevnull/spring-amqp.git","svn_url":"https://github.com/harrydevnull/spring-amqp","homepage":"http://www.springsource.org/spring-amqp","size":7653,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"288ae75949b591c826973944273a8c08efa830f5","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":1088796,"name":"spring-amqp","full_name":"spring-projects/spring-amqp","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-amqp","description":"Spring AMQP - support for Spring programming model with AMQP, especially but not limited to RabbitMQ","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-amqp","forks_url":"https://api.github.com/repos/spring-projects/spring-amqp/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-amqp/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-amqp/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-amqp/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-amqp/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-amqp/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-amqp/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-amqp/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-amqp/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-amqp/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-projects/spring-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-amqp/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-amqp/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-amqp/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/spring-projects/spring-amqp/deployments","created_at":"2010-11-17T15:50:16Z","updated_at":"2016-12-09T10:19:10Z","pushed_at":"2016-12-13T18:40:35Z","git_url":"git://github.com/spring-projects/spring-amqp.git","ssh_url":"git@github.com:spring-projects/spring-amqp.git","clone_url":"https://github.com/spring-projects/spring-amqp.git","svn_url":"https://github.com/spring-projects/spring-amqp","homepage":"http://www.springsource.org/spring-amqp","size":7649,"stargazers_count":283,"watchers_count":283,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":247,"mirror_url":null,"open_issues_count":4,"forks":247,"open_issues":4,"watchers":283,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523"},"html":{"href":"https://github.com/spring-projects/spring-amqp/pull/523"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/issues/523"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/issues/523/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/523/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/statuses/2819344e621136fb2c4eb7b5c0d698ff01ecbc0b"}}}}
{"actor":{"display_login":"artembilan"}}