{"action":"created","comment":{"url":"https://api.github.com/repos/obgm/libcoap/pulls/comments/168275764","pull_request_review_id":96616954,"id":168275764,"diff_hunk":"@@ -33,6 +33,63 @@ void coap_dtls_set_log_level(int level);\n /** Returns the current log level. */\n int coap_dtls_get_log_level(void);\n \n+/** The structure used for defining the PKI setup data to be used */\n+typedef struct coap_dtls_pki_t {\n+  /* Alternative 1: Name of file on disk */\n+  const char *ca_file;\n+  const char *public_cert;\n+  const char *private_key;\n+  /* Alternative 2: ASN1 version */\n+  const uint8_t *asn1_ca_file;\n+  const uint8_t *asn1_public_cert;\n+  const uint8_t *asn1_private_key;\n+  int asn1_ca_file_len;\n+  int asn1_public_cert_len;\n+  int asn1_private_key_len;\n+  int asn1_private_key_type; /* E.G. EVP_PKEY_RSA */","path":"include/coap/coap_dtls.h","position":17,"original_position":17,"commit_id":"85e7f1fc5407a3b51756904ab46136793d53ae09","original_commit_id":"85e7f1fc5407a3b51756904ab46136793d53ae09","user":{"login":"jcmichelou","id":10154937,"avatar_url":"https://avatars1.githubusercontent.com/u/10154937?v=4","gravatar_id":"","url":"https://api.github.com/users/jcmichelou","html_url":"https://github.com/jcmichelou","followers_url":"https://api.github.com/users/jcmichelou/followers","following_url":"https://api.github.com/users/jcmichelou/following{/other_user}","gists_url":"https://api.github.com/users/jcmichelou/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmichelou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmichelou/subscriptions","organizations_url":"https://api.github.com/users/jcmichelou/orgs","repos_url":"https://api.github.com/users/jcmichelou/repos","events_url":"https://api.github.com/users/jcmichelou/events{/privacy}","received_events_url":"https://api.github.com/users/jcmichelou/received_events","type":"User","site_admin":false},"body":"Ideally the key type enum should not be library specific since the rest of the structure is not. Maybe it is a bit tedious to redefine the possible values from evp.h, but I think only a couple of them are really meaningful, so it could be worth it for the sake of consistency.","created_at":"2018-02-14T18:58:48Z","updated_at":"2018-02-14T18:58:48Z","html_url":"https://github.com/obgm/libcoap/pull/138#discussion_r168275764","pull_request_url":"https://api.github.com/repos/obgm/libcoap/pulls/138","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/obgm/libcoap/pulls/comments/168275764"},"html":{"href":"https://github.com/obgm/libcoap/pull/138#discussion_r168275764"},"pull_request":{"href":"https://api.github.com/repos/obgm/libcoap/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/obgm/libcoap/pulls/138","id":168544530,"html_url":"https://github.com/obgm/libcoap/pull/138","diff_url":"https://github.com/obgm/libcoap/pull/138.diff","patch_url":"https://github.com/obgm/libcoap/pull/138.patch","issue_url":"https://api.github.com/repos/obgm/libcoap/issues/138","number":138,"state":"open","locked":false,"title":"Addition of PKI support","user":{"login":"mrdeep1","id":35105050,"avatar_url":"https://avatars3.githubusercontent.com/u/35105050?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdeep1","html_url":"https://github.com/mrdeep1","followers_url":"https://api.github.com/users/mrdeep1/followers","following_url":"https://api.github.com/users/mrdeep1/following{/other_user}","gists_url":"https://api.github.com/users/mrdeep1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdeep1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdeep1/subscriptions","organizations_url":"https://api.github.com/users/mrdeep1/orgs","repos_url":"https://api.github.com/users/mrdeep1/repos","events_url":"https://api.github.com/users/mrdeep1/events{/privacy}","received_events_url":"https://api.github.com/users/mrdeep1/received_events","type":"User","site_admin":false},"body":"For the TLS libraries that support it, there is a requirement for PKI support as well as PSK support.\r\n\r\nPKI support is a little different from PSK support as the (D)TLS sessions setup is different, and optional callback flexibility needs to get added in.\r\n\r\nIn principle the set-up sequence for CoAP Servers looks like\r\n----\r\ncoap_new_context()\r\ncoap_context_set_pki() and/or coap_context_set_psk() if encryption is required\r\ncoap_new_endpoint()\r\n----\r\n\r\nIn principle the set-up sequence for CoAP Clients looks like\r\n----\r\ncoap_new_context()\r\ncoap_new_client_session(), coap_new_client_session_pki() or coap_new_client_session_psk()\r\n----","created_at":"2018-02-12T10:38:07Z","updated_at":"2018-02-14T18:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"927f1c167345ceab732d2091a11a307d2768e7a9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/obgm/libcoap/pulls/138/commits","review_comments_url":"https://api.github.com/repos/obgm/libcoap/pulls/138/comments","review_comment_url":"https://api.github.com/repos/obgm/libcoap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/obgm/libcoap/issues/138/comments","statuses_url":"https://api.github.com/repos/obgm/libcoap/statuses/85e7f1fc5407a3b51756904ab46136793d53ae09","head":{"label":"mrdeep1:pki-support","ref":"pki-support","sha":"85e7f1fc5407a3b51756904ab46136793d53ae09","user":{"login":"mrdeep1","id":35105050,"avatar_url":"https://avatars3.githubusercontent.com/u/35105050?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdeep1","html_url":"https://github.com/mrdeep1","followers_url":"https://api.github.com/users/mrdeep1/followers","following_url":"https://api.github.com/users/mrdeep1/following{/other_user}","gists_url":"https://api.github.com/users/mrdeep1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdeep1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdeep1/subscriptions","organizations_url":"https://api.github.com/users/mrdeep1/orgs","repos_url":"https://api.github.com/users/mrdeep1/repos","events_url":"https://api.github.com/users/mrdeep1/events{/privacy}","received_events_url":"https://api.github.com/users/mrdeep1/received_events","type":"User","site_admin":false},"repo":{"id":120645522,"name":"libcoap","full_name":"mrdeep1/libcoap","owner":{"login":"mrdeep1","id":35105050,"avatar_url":"https://avatars3.githubusercontent.com/u/35105050?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdeep1","html_url":"https://github.com/mrdeep1","followers_url":"https://api.github.com/users/mrdeep1/followers","following_url":"https://api.github.com/users/mrdeep1/following{/other_user}","gists_url":"https://api.github.com/users/mrdeep1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdeep1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdeep1/subscriptions","organizations_url":"https://api.github.com/users/mrdeep1/orgs","repos_url":"https://api.github.com/users/mrdeep1/repos","events_url":"https://api.github.com/users/mrdeep1/events{/privacy}","received_events_url":"https://api.github.com/users/mrdeep1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrdeep1/libcoap","description":"A CoAP (RFC 7252) implementation in C","fork":true,"url":"https://api.github.com/repos/mrdeep1/libcoap","forks_url":"https://api.github.com/repos/mrdeep1/libcoap/forks","keys_url":"https://api.github.com/repos/mrdeep1/libcoap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrdeep1/libcoap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrdeep1/libcoap/teams","hooks_url":"https://api.github.com/repos/mrdeep1/libcoap/hooks","issue_events_url":"https://api.github.com/repos/mrdeep1/libcoap/issues/events{/number}","events_url":"https://api.github.com/repos/mrdeep1/libcoap/events","assignees_url":"https://api.github.com/repos/mrdeep1/libcoap/assignees{/user}","branches_url":"https://api.github.com/repos/mrdeep1/libcoap/branches{/branch}","tags_url":"https://api.github.com/repos/mrdeep1/libcoap/tags","blobs_url":"https://api.github.com/repos/mrdeep1/libcoap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrdeep1/libcoap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrdeep1/libcoap/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrdeep1/libcoap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrdeep1/libcoap/statuses/{sha}","languages_url":"https://api.github.com/repos/mrdeep1/libcoap/languages","stargazers_url":"https://api.github.com/repos/mrdeep1/libcoap/stargazers","contributors_url":"https://api.github.com/repos/mrdeep1/libcoap/contributors","subscribers_url":"https://api.github.com/repos/mrdeep1/libcoap/subscribers","subscription_url":"https://api.github.com/repos/mrdeep1/libcoap/subscription","commits_url":"https://api.github.com/repos/mrdeep1/libcoap/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrdeep1/libcoap/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrdeep1/libcoap/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrdeep1/libcoap/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrdeep1/libcoap/contents/{+path}","compare_url":"https://api.github.com/repos/mrdeep1/libcoap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrdeep1/libcoap/merges","archive_url":"https://api.github.com/repos/mrdeep1/libcoap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrdeep1/libcoap/downloads","issues_url":"https://api.github.com/repos/mrdeep1/libcoap/issues{/number}","pulls_url":"https://api.github.com/repos/mrdeep1/libcoap/pulls{/number}","milestones_url":"https://api.github.com/repos/mrdeep1/libcoap/milestones{/number}","notifications_url":"https://api.github.com/repos/mrdeep1/libcoap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrdeep1/libcoap/labels{/name}","releases_url":"https://api.github.com/repos/mrdeep1/libcoap/releases{/id}","deployments_url":"https://api.github.com/repos/mrdeep1/libcoap/deployments","created_at":"2018-02-07T17:08:36Z","updated_at":"2018-02-07T17:08:38Z","pushed_at":"2018-02-14T16:36:13Z","git_url":"git://github.com/mrdeep1/libcoap.git","ssh_url":"git@github.com:mrdeep1/libcoap.git","clone_url":"https://github.com/mrdeep1/libcoap.git","svn_url":"https://github.com/mrdeep1/libcoap","homepage":null,"size":2097,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"obgm:develop","ref":"develop","sha":"82c9ccc75b189d581d5007f265aa2b3a40e57ee4","user":{"login":"obgm","id":7488145,"avatar_url":"https://avatars1.githubusercontent.com/u/7488145?v=4","gravatar_id":"","url":"https://api.github.com/users/obgm","html_url":"https://github.com/obgm","followers_url":"https://api.github.com/users/obgm/followers","following_url":"https://api.github.com/users/obgm/following{/other_user}","gists_url":"https://api.github.com/users/obgm/gists{/gist_id}","starred_url":"https://api.github.com/users/obgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obgm/subscriptions","organizations_url":"https://api.github.com/users/obgm/orgs","repos_url":"https://api.github.com/users/obgm/repos","events_url":"https://api.github.com/users/obgm/events{/privacy}","received_events_url":"https://api.github.com/users/obgm/received_events","type":"User","site_admin":false},"repo":{"id":39396258,"name":"libcoap","full_name":"obgm/libcoap","owner":{"login":"obgm","id":7488145,"avatar_url":"https://avatars1.githubusercontent.com/u/7488145?v=4","gravatar_id":"","url":"https://api.github.com/users/obgm","html_url":"https://github.com/obgm","followers_url":"https://api.github.com/users/obgm/followers","following_url":"https://api.github.com/users/obgm/following{/other_user}","gists_url":"https://api.github.com/users/obgm/gists{/gist_id}","starred_url":"https://api.github.com/users/obgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obgm/subscriptions","organizations_url":"https://api.github.com/users/obgm/orgs","repos_url":"https://api.github.com/users/obgm/repos","events_url":"https://api.github.com/users/obgm/events{/privacy}","received_events_url":"https://api.github.com/users/obgm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/obgm/libcoap","description":"A CoAP (RFC 7252) implementation in C","fork":false,"url":"https://api.github.com/repos/obgm/libcoap","forks_url":"https://api.github.com/repos/obgm/libcoap/forks","keys_url":"https://api.github.com/repos/obgm/libcoap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obgm/libcoap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obgm/libcoap/teams","hooks_url":"https://api.github.com/repos/obgm/libcoap/hooks","issue_events_url":"https://api.github.com/repos/obgm/libcoap/issues/events{/number}","events_url":"https://api.github.com/repos/obgm/libcoap/events","assignees_url":"https://api.github.com/repos/obgm/libcoap/assignees{/user}","branches_url":"https://api.github.com/repos/obgm/libcoap/branches{/branch}","tags_url":"https://api.github.com/repos/obgm/libcoap/tags","blobs_url":"https://api.github.com/repos/obgm/libcoap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obgm/libcoap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obgm/libcoap/git/refs{/sha}","trees_url":"https://api.github.com/repos/obgm/libcoap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obgm/libcoap/statuses/{sha}","languages_url":"https://api.github.com/repos/obgm/libcoap/languages","stargazers_url":"https://api.github.com/repos/obgm/libcoap/stargazers","contributors_url":"https://api.github.com/repos/obgm/libcoap/contributors","subscribers_url":"https://api.github.com/repos/obgm/libcoap/subscribers","subscription_url":"https://api.github.com/repos/obgm/libcoap/subscription","commits_url":"https://api.github.com/repos/obgm/libcoap/commits{/sha}","git_commits_url":"https://api.github.com/repos/obgm/libcoap/git/commits{/sha}","comments_url":"https://api.github.com/repos/obgm/libcoap/comments{/number}","issue_comment_url":"https://api.github.com/repos/obgm/libcoap/issues/comments{/number}","contents_url":"https://api.github.com/repos/obgm/libcoap/contents/{+path}","compare_url":"https://api.github.com/repos/obgm/libcoap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obgm/libcoap/merges","archive_url":"https://api.github.com/repos/obgm/libcoap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obgm/libcoap/downloads","issues_url":"https://api.github.com/repos/obgm/libcoap/issues{/number}","pulls_url":"https://api.github.com/repos/obgm/libcoap/pulls{/number}","milestones_url":"https://api.github.com/repos/obgm/libcoap/milestones{/number}","notifications_url":"https://api.github.com/repos/obgm/libcoap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obgm/libcoap/labels{/name}","releases_url":"https://api.github.com/repos/obgm/libcoap/releases{/id}","deployments_url":"https://api.github.com/repos/obgm/libcoap/deployments","created_at":"2015-07-20T16:48:55Z","updated_at":"2018-02-11T03:23:31Z","pushed_at":"2018-02-14T16:44:22Z","git_url":"git://github.com/obgm/libcoap.git","ssh_url":"git@github.com:obgm/libcoap.git","clone_url":"https://github.com/obgm/libcoap.git","svn_url":"https://github.com/obgm/libcoap","homepage":null,"size":2029,"stargazers_count":209,"watchers_count":209,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":130,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":130,"open_issues":55,"watchers":209,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/obgm/libcoap/pulls/138"},"html":{"href":"https://github.com/obgm/libcoap/pull/138"},"issue":{"href":"https://api.github.com/repos/obgm/libcoap/issues/138"},"comments":{"href":"https://api.github.com/repos/obgm/libcoap/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/obgm/libcoap/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/obgm/libcoap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/obgm/libcoap/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/obgm/libcoap/statuses/85e7f1fc5407a3b51756904ab46136793d53ae09"}},"author_association":"NONE"}}
{"actor":{"display_login":"jcmichelou"}}