{"action":"created","comment":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/62903836","id":62903836,"diff_hunk":"@@ -43,36 +45,62 @@ static const char *const search_paths[] = {\n     NULL,\n };\n \n+static int\n+get_home_config_dir(struct sol_buffer *buffer)\n+{\n+    int r;\n+\n+    r = sol_util_get_user_config_dir(buffer);\n+    SOL_INT_CHECK(r, < 0, r);\n+\n+    return sol_buffer_append_printf(buffer, \"/certs\");\n+}\n+\n+static inline bool\n+is_cert(const char *file)\n+{\n+    struct stat st;\n+\n+    return stat(file, &st) == 0 && S_ISREG(st.st_mode) && st.st_mode & S_IRUSR;","path":"src/lib/common/sol-certificate-impl-linux.c","position":36,"original_position":36,"commit_id":"7d4749a55ed29c73b602be5704b13d49dde239f1","original_commit_id":"7d4749a55ed29c73b602be5704b13d49dde239f1","user":{"login":"barbieri","id":1838,"avatar_url":"https://avatars.githubusercontent.com/u/1838?v=3","gravatar_id":"","url":"https://api.github.com/users/barbieri","html_url":"https://github.com/barbieri","followers_url":"https://api.github.com/users/barbieri/followers","following_url":"https://api.github.com/users/barbieri/following{/other_user}","gists_url":"https://api.github.com/users/barbieri/gists{/gist_id}","starred_url":"https://api.github.com/users/barbieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barbieri/subscriptions","organizations_url":"https://api.github.com/users/barbieri/orgs","repos_url":"https://api.github.com/users/barbieri/repos","events_url":"https://api.github.com/users/barbieri/events{/privacy}","received_events_url":"https://api.github.com/users/barbieri/received_events","type":"User","site_admin":false},"body":"why checking mode is required? What if no user permission but group allows that? eventually it's better to use `access(file, R_OK)`?","created_at":"2016-05-11T18:45:23Z","updated_at":"2016-05-11T18:45:23Z","html_url":"https://github.com/solettaproject/soletta/pull/2016#discussion_r62903836","pull_request_url":"https://api.github.com/repos/solettaproject/soletta/pulls/2016","_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/62903836"},"html":{"href":"https://github.com/solettaproject/soletta/pull/2016#discussion_r62903836"},"pull_request":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2016"}}},"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/2016","id":69716879,"html_url":"https://github.com/solettaproject/soletta/pull/2016","diff_url":"https://github.com/solettaproject/soletta/pull/2016.diff","patch_url":"https://github.com/solettaproject/soletta/pull/2016.patch","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/2016","number":2016,"state":"open","locked":false,"title":"oic: Use sol-cert API to load pre shared keys - v2","user":{"login":"otaviobp","id":36560,"avatar_url":"https://avatars.githubusercontent.com/u/36560?v=3","gravatar_id":"","url":"https://api.github.com/users/otaviobp","html_url":"https://github.com/otaviobp","followers_url":"https://api.github.com/users/otaviobp/followers","following_url":"https://api.github.com/users/otaviobp/following{/other_user}","gists_url":"https://api.github.com/users/otaviobp/gists{/gist_id}","starred_url":"https://api.github.com/users/otaviobp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otaviobp/subscriptions","organizations_url":"https://api.github.com/users/otaviobp/orgs","repos_url":"https://api.github.com/users/otaviobp/repos","events_url":"https://api.github.com/users/otaviobp/events{/privacy}","received_events_url":"https://api.github.com/users/otaviobp/received_events","type":"User","site_admin":false},"body":"Replaces #1975","created_at":"2016-05-11T18:10:14Z","updated_at":"2016-05-11T18:45:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1acfc0edfe47c54fe0991e348164b0149e04d9ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solettaproject/soletta/pulls/2016/commits","review_comments_url":"https://api.github.com/repos/solettaproject/soletta/pulls/2016/comments","review_comment_url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/2016/comments","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/7d4749a55ed29c73b602be5704b13d49dde239f1","head":{"label":"otaviobp:oic_cert_v2","ref":"oic_cert_v2","sha":"7d4749a55ed29c73b602be5704b13d49dde239f1","user":{"login":"otaviobp","id":36560,"avatar_url":"https://avatars.githubusercontent.com/u/36560?v=3","gravatar_id":"","url":"https://api.github.com/users/otaviobp","html_url":"https://github.com/otaviobp","followers_url":"https://api.github.com/users/otaviobp/followers","following_url":"https://api.github.com/users/otaviobp/following{/other_user}","gists_url":"https://api.github.com/users/otaviobp/gists{/gist_id}","starred_url":"https://api.github.com/users/otaviobp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otaviobp/subscriptions","organizations_url":"https://api.github.com/users/otaviobp/orgs","repos_url":"https://api.github.com/users/otaviobp/repos","events_url":"https://api.github.com/users/otaviobp/events{/privacy}","received_events_url":"https://api.github.com/users/otaviobp/received_events","type":"User","site_admin":false},"repo":{"id":37671839,"name":"soletta","full_name":"otaviobp/soletta","owner":{"login":"otaviobp","id":36560,"avatar_url":"https://avatars.githubusercontent.com/u/36560?v=3","gravatar_id":"","url":"https://api.github.com/users/otaviobp","html_url":"https://github.com/otaviobp","followers_url":"https://api.github.com/users/otaviobp/followers","following_url":"https://api.github.com/users/otaviobp/following{/other_user}","gists_url":"https://api.github.com/users/otaviobp/gists{/gist_id}","starred_url":"https://api.github.com/users/otaviobp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otaviobp/subscriptions","organizations_url":"https://api.github.com/users/otaviobp/orgs","repos_url":"https://api.github.com/users/otaviobp/repos","events_url":"https://api.github.com/users/otaviobp/events{/privacy}","received_events_url":"https://api.github.com/users/otaviobp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/otaviobp/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":true,"url":"https://api.github.com/repos/otaviobp/soletta","forks_url":"https://api.github.com/repos/otaviobp/soletta/forks","keys_url":"https://api.github.com/repos/otaviobp/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otaviobp/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otaviobp/soletta/teams","hooks_url":"https://api.github.com/repos/otaviobp/soletta/hooks","issue_events_url":"https://api.github.com/repos/otaviobp/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/otaviobp/soletta/events","assignees_url":"https://api.github.com/repos/otaviobp/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/otaviobp/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/otaviobp/soletta/tags","blobs_url":"https://api.github.com/repos/otaviobp/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otaviobp/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otaviobp/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/otaviobp/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otaviobp/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/otaviobp/soletta/languages","stargazers_url":"https://api.github.com/repos/otaviobp/soletta/stargazers","contributors_url":"https://api.github.com/repos/otaviobp/soletta/contributors","subscribers_url":"https://api.github.com/repos/otaviobp/soletta/subscribers","subscription_url":"https://api.github.com/repos/otaviobp/soletta/subscription","commits_url":"https://api.github.com/repos/otaviobp/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/otaviobp/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/otaviobp/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/otaviobp/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/otaviobp/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/otaviobp/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otaviobp/soletta/merges","archive_url":"https://api.github.com/repos/otaviobp/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otaviobp/soletta/downloads","issues_url":"https://api.github.com/repos/otaviobp/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/otaviobp/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/otaviobp/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/otaviobp/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otaviobp/soletta/labels{/name}","releases_url":"https://api.github.com/repos/otaviobp/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/otaviobp/soletta/deployments","created_at":"2015-06-18T16:42:28Z","updated_at":"2016-03-07T13:38:53Z","pushed_at":"2016-05-11T18:11:51Z","git_url":"git://github.com/otaviobp/soletta.git","ssh_url":"git@github.com:otaviobp/soletta.git","clone_url":"https://github.com/otaviobp/soletta.git","svn_url":"https://github.com/otaviobp/soletta","homepage":"","size":19060,"stargazers_count":0,"watchers_count":0,"language":"C","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":"solettaproject:master","ref":"master","sha":"29f0d5832b0444176e983e408bcc584d7c895758","user":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37087063,"name":"soletta","full_name":"solettaproject/soletta","owner":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solettaproject/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":false,"url":"https://api.github.com/repos/solettaproject/soletta","forks_url":"https://api.github.com/repos/solettaproject/soletta/forks","keys_url":"https://api.github.com/repos/solettaproject/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solettaproject/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solettaproject/soletta/teams","hooks_url":"https://api.github.com/repos/solettaproject/soletta/hooks","issue_events_url":"https://api.github.com/repos/solettaproject/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/solettaproject/soletta/events","assignees_url":"https://api.github.com/repos/solettaproject/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/solettaproject/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/solettaproject/soletta/tags","blobs_url":"https://api.github.com/repos/solettaproject/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solettaproject/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solettaproject/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/solettaproject/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/solettaproject/soletta/languages","stargazers_url":"https://api.github.com/repos/solettaproject/soletta/stargazers","contributors_url":"https://api.github.com/repos/solettaproject/soletta/contributors","subscribers_url":"https://api.github.com/repos/solettaproject/soletta/subscribers","subscription_url":"https://api.github.com/repos/solettaproject/soletta/subscription","commits_url":"https://api.github.com/repos/solettaproject/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/solettaproject/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/solettaproject/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/solettaproject/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/solettaproject/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/solettaproject/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solettaproject/soletta/merges","archive_url":"https://api.github.com/repos/solettaproject/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solettaproject/soletta/downloads","issues_url":"https://api.github.com/repos/solettaproject/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/solettaproject/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/solettaproject/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/solettaproject/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solettaproject/soletta/labels{/name}","releases_url":"https://api.github.com/repos/solettaproject/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/solettaproject/soletta/deployments","created_at":"2015-06-08T19:13:18Z","updated_at":"2016-05-10T13:23:36Z","pushed_at":"2016-05-11T18:21:29Z","git_url":"git://github.com/solettaproject/soletta.git","ssh_url":"git@github.com:solettaproject/soletta.git","clone_url":"https://github.com/solettaproject/soletta.git","svn_url":"https://github.com/solettaproject/soletta","homepage":"http://solettaproject.org","size":26468,"stargazers_count":95,"watchers_count":95,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":165,"forks":79,"open_issues":165,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2016"},"html":{"href":"https://github.com/solettaproject/soletta/pull/2016"},"issue":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/2016"},"comments":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/2016/comments"},"review_comments":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2016/comments"},"review_comment":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2016/commits"},"statuses":{"href":"https://api.github.com/repos/solettaproject/soletta/statuses/7d4749a55ed29c73b602be5704b13d49dde239f1"}}}}