{"action":"created","issue":{"url":"https://api.github.com/repos/bitfireAT/davdroid/issues/410","labels_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/410/comments","events_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/410/events","html_url":"https://github.com/bitfireAT/davdroid/issues/410","id":53336059,"number":410,"title":"certificate validation fails for certificates with IP as common name","user":{"login":"nimix","id":752238,"avatar_url":"https://avatars.githubusercontent.com/u/752238?v=3","gravatar_id":"","url":"https://api.github.com/users/nimix","html_url":"https://github.com/nimix","followers_url":"https://api.github.com/users/nimix/followers","following_url":"https://api.github.com/users/nimix/following{/other_user}","gists_url":"https://api.github.com/users/nimix/gists{/gist_id}","starred_url":"https://api.github.com/users/nimix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nimix/subscriptions","organizations_url":"https://api.github.com/users/nimix/orgs","repos_url":"https://api.github.com/users/nimix/repos","events_url":"https://api.github.com/users/nimix/events{/privacy}","received_events_url":"https://api.github.com/users/nimix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-04T13:14:51Z","updated_at":"2015-01-04T16:42:44Z","closed_at":null,"body":"I am syncing my contacts via davdroid with an owncloud server which is only reachable by its IP address. For this server there is a certificate with the IP-adress as CN. That worked well up to davdroid 0.6.8. After upgrading from 0.6.8 to 0.6.10 sync always failes with the following message:\r\n```\r\nowncloud kontakte:\r\njavax.net.ssl.SSLPeerUnverifiedException:\r\n<IP Address>\r\n  at\r\nat.bitfire.favdroid.webdav.TlsSniSocketFactory.establishAndVerify(TlsSniSocketFactory.java:118)\r\n  at...\r\n```\r\nWhen I try to add my acount with davdroid 0.6.10 I get a message that the certifiate is not issued for my IP address."},"comment":{"url":"https://api.github.com/repos/bitfireAT/davdroid/issues/comments/68639201","html_url":"https://github.com/bitfireAT/davdroid/issues/410#issuecomment-68639201","issue_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/410","id":68639201,"user":{"login":"nimix","id":752238,"avatar_url":"https://avatars.githubusercontent.com/u/752238?v=3","gravatar_id":"","url":"https://api.github.com/users/nimix","html_url":"https://github.com/nimix","followers_url":"https://api.github.com/users/nimix/followers","following_url":"https://api.github.com/users/nimix/following{/other_user}","gists_url":"https://api.github.com/users/nimix/gists{/gist_id}","starred_url":"https://api.github.com/users/nimix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nimix/subscriptions","organizations_url":"https://api.github.com/users/nimix/orgs","repos_url":"https://api.github.com/users/nimix/repos","events_url":"https://api.github.com/users/nimix/events{/privacy}","received_events_url":"https://api.github.com/users/nimix/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T16:42:44Z","updated_at":"2015-01-04T16:42:44Z","body":"I managed to work around this bug by issuing a new certificate with subjectaltname=\"IP:<IP address>\". \r\n\r\nMaybe the fix would be to use BrowserCompatHostnameVerifier instead of DefaultHostnameVerifier in https://github.com/bitfireAT/davdroid/blob/master/app/src/main/java/at/bitfire/davdroid/webdav/TlsSniSocketFactory.java#L42 ?"}}