{"action":"created","comment":{"url":"https://api.github.com/repos/cisco/libacvp/pulls/comments/214365613","pull_request_review_id":151410791,"id":214365613,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDM2NTYxMw==","diff_hunk":"@@ -268,16 +290,87 @@ ACVP_RESULT acvp_kdf135_ikev1_kat_handler (ACVP_CTX *ctx, JSON_Object *obj) {\n         groupval = json_array_get_value(groups, i);\n         groupobj = json_value_get_object(groupval);\n \n-        hash_alg = (unsigned char *) json_object_get_string(groupobj, \"hashAlg\");\n-        auth_method = (unsigned char *) json_object_get_string(groupobj, \"authenticationMethod\");\n+        hash_alg_str = json_object_get_string(groupobj, \"hashAlg\");\n+        if (!hash_alg) {\n+            ACVP_LOG_ERR(\"Failed to include hashAlg\");\n+            return ACVP_MISSING_ARG;\n+        }\n+\n+        /*\n+         * Determine the hash algorithm.\n+         */\n+        if (strncmp(hash_alg_str, ACVP_STR_SHA_1, strlen(ACVP_STR_SHA_1)) == 0) {\n+            hash_alg = ACVP_KDF135_SHA1;\n+        } else if (strncmp(hash_alg_str, ACVP_STR_SHA2_224, strlen(ACVP_STR_SHA2_224)) == 0) {\n+            hash_alg = ACVP_KDF135_SHA224;\n+        } else if (strncmp(hash_alg_str, ACVP_STR_SHA2_256, strlen(ACVP_STR_SHA2_256)) == 0) {\n+            hash_alg = ACVP_KDF135_SHA256;\n+        } else if (strncmp(hash_alg_str, ACVP_STR_SHA2_384, strlen(ACVP_STR_SHA2_384)) == 0) {\n+            hash_alg = ACVP_KDF135_SHA384;\n+        } else if (strncmp(hash_alg_str, ACVP_STR_SHA2_512, strlen(ACVP_STR_SHA2_512)) == 0) {\n+            hash_alg = ACVP_KDF135_SHA512;\n+        } else {\n+            ACVP_LOG_ERR(\"ACVP server requesting invalid hashAlg\");\n+            return ACVP_INVALID_ARG;\n+        }\n+\n+        auth_method_str = json_object_get_string(groupobj, \"authenticationMethod\");\n+        if (!auth_method_str) {\n+            ACVP_LOG_ERR(\"Failed to include authenticationMethod\");\n+            return ACVP_MISSING_ARG;\n+        }\n+\n+        /*\n+         * Determine the authentication method.\n+         */\n+        if (strncmp(auth_method_str, ACVP_AUTH_METHOD_DSA_STR,\n+                    strlen(ACVP_AUTH_METHOD_DSA_STR)) == 0) {","path":"src/acvp_kdf135_ikev1.c","position":248,"original_position":248,"commit_id":"0d264c994bbf2771cea93320f821221f5ab7fc53","original_commit_id":"0d264c994bbf2771cea93320f821221f5ab7fc53","user":{"login":"elliemdaw","id":8726512,"node_id":"MDQ6VXNlcjg3MjY1MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8726512?v=4","gravatar_id":"","url":"https://api.github.com/users/elliemdaw","html_url":"https://github.com/elliemdaw","followers_url":"https://api.github.com/users/elliemdaw/followers","following_url":"https://api.github.com/users/elliemdaw/following{/other_user}","gists_url":"https://api.github.com/users/elliemdaw/gists{/gist_id}","starred_url":"https://api.github.com/users/elliemdaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliemdaw/subscriptions","organizations_url":"https://api.github.com/users/elliemdaw/orgs","repos_url":"https://api.github.com/users/elliemdaw/repos","events_url":"https://api.github.com/users/elliemdaw/events{/privacy}","received_events_url":"https://api.github.com/users/elliemdaw/received_events","type":"User","site_admin":false},"body":"Otherwise this all looks good to me :)","created_at":"2018-08-31T14:09:04Z","updated_at":"2018-08-31T14:09:04Z","html_url":"https://github.com/cisco/libacvp/pull/134#discussion_r214365613","pull_request_url":"https://api.github.com/repos/cisco/libacvp/pulls/134","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cisco/libacvp/pulls/comments/214365613"},"html":{"href":"https://github.com/cisco/libacvp/pull/134#discussion_r214365613"},"pull_request":{"href":"https://api.github.com/repos/cisco/libacvp/pulls/134"}},"in_reply_to_id":214365057},"pull_request":{"url":"https://api.github.com/repos/cisco/libacvp/pulls/134","id":212189842,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMTg5ODQy","html_url":"https://github.com/cisco/libacvp/pull/134","diff_url":"https://github.com/cisco/libacvp/pull/134.diff","patch_url":"https://github.com/cisco/libacvp/pull/134.patch","issue_url":"https://api.github.com/repos/cisco/libacvp/issues/134","number":134,"state":"open","locked":false,"title":"More checks for kdf135 ikev1","user":{"login":"fliphil","id":6033760,"node_id":"MDQ6VXNlcjYwMzM3NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/6033760?v=4","gravatar_id":"","url":"https://api.github.com/users/fliphil","html_url":"https://github.com/fliphil","followers_url":"https://api.github.com/users/fliphil/followers","following_url":"https://api.github.com/users/fliphil/following{/other_user}","gists_url":"https://api.github.com/users/fliphil/gists{/gist_id}","starred_url":"https://api.github.com/users/fliphil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fliphil/subscriptions","organizations_url":"https://api.github.com/users/fliphil/orgs","repos_url":"https://api.github.com/users/fliphil/repos","events_url":"https://api.github.com/users/fliphil/events{/privacy}","received_events_url":"https://api.github.com/users/fliphil/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-30T19:43:24Z","updated_at":"2018-08-31T14:09:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac1e1bf8e0aeeaf2dea8e5a4e52f980ae3ae7aaf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cisco/libacvp/pulls/134/commits","review_comments_url":"https://api.github.com/repos/cisco/libacvp/pulls/134/comments","review_comment_url":"https://api.github.com/repos/cisco/libacvp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cisco/libacvp/issues/134/comments","statuses_url":"https://api.github.com/repos/cisco/libacvp/statuses/0d264c994bbf2771cea93320f821221f5ab7fc53","head":{"label":"cisco:checks_kdf123_ikev1","ref":"checks_kdf123_ikev1","sha":"0d264c994bbf2771cea93320f821221f5ab7fc53","user":{"login":"cisco","id":1376999,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzY5OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1376999?v=4","gravatar_id":"","url":"https://api.github.com/users/cisco","html_url":"https://github.com/cisco","followers_url":"https://api.github.com/users/cisco/followers","following_url":"https://api.github.com/users/cisco/following{/other_user}","gists_url":"https://api.github.com/users/cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco/subscriptions","organizations_url":"https://api.github.com/users/cisco/orgs","repos_url":"https://api.github.com/users/cisco/repos","events_url":"https://api.github.com/users/cisco/events{/privacy}","received_events_url":"https://api.github.com/users/cisco/received_events","type":"Organization","site_admin":false},"repo":{"id":64243372,"node_id":"MDEwOlJlcG9zaXRvcnk2NDI0MzM3Mg==","name":"libacvp","full_name":"cisco/libacvp","owner":{"login":"cisco","id":1376999,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzY5OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1376999?v=4","gravatar_id":"","url":"https://api.github.com/users/cisco","html_url":"https://github.com/cisco","followers_url":"https://api.github.com/users/cisco/followers","following_url":"https://api.github.com/users/cisco/following{/other_user}","gists_url":"https://api.github.com/users/cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco/subscriptions","organizations_url":"https://api.github.com/users/cisco/orgs","repos_url":"https://api.github.com/users/cisco/repos","events_url":"https://api.github.com/users/cisco/events{/privacy}","received_events_url":"https://api.github.com/users/cisco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cisco/libacvp","description":"The libacvp library is a client-side implementation of the draft ACVP protocol (github.com/usnistgov/ACVP).","fork":false,"url":"https://api.github.com/repos/cisco/libacvp","forks_url":"https://api.github.com/repos/cisco/libacvp/forks","keys_url":"https://api.github.com/repos/cisco/libacvp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cisco/libacvp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cisco/libacvp/teams","hooks_url":"https://api.github.com/repos/cisco/libacvp/hooks","issue_events_url":"https://api.github.com/repos/cisco/libacvp/issues/events{/number}","events_url":"https://api.github.com/repos/cisco/libacvp/events","assignees_url":"https://api.github.com/repos/cisco/libacvp/assignees{/user}","branches_url":"https://api.github.com/repos/cisco/libacvp/branches{/branch}","tags_url":"https://api.github.com/repos/cisco/libacvp/tags","blobs_url":"https://api.github.com/repos/cisco/libacvp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cisco/libacvp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cisco/libacvp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cisco/libacvp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cisco/libacvp/statuses/{sha}","languages_url":"https://api.github.com/repos/cisco/libacvp/languages","stargazers_url":"https://api.github.com/repos/cisco/libacvp/stargazers","contributors_url":"https://api.github.com/repos/cisco/libacvp/contributors","subscribers_url":"https://api.github.com/repos/cisco/libacvp/subscribers","subscription_url":"https://api.github.com/repos/cisco/libacvp/subscription","commits_url":"https://api.github.com/repos/cisco/libacvp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cisco/libacvp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cisco/libacvp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cisco/libacvp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cisco/libacvp/contents/{+path}","compare_url":"https://api.github.com/repos/cisco/libacvp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cisco/libacvp/merges","archive_url":"https://api.github.com/repos/cisco/libacvp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cisco/libacvp/downloads","issues_url":"https://api.github.com/repos/cisco/libacvp/issues{/number}","pulls_url":"https://api.github.com/repos/cisco/libacvp/pulls{/number}","milestones_url":"https://api.github.com/repos/cisco/libacvp/milestones{/number}","notifications_url":"https://api.github.com/repos/cisco/libacvp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cisco/libacvp/labels{/name}","releases_url":"https://api.github.com/repos/cisco/libacvp/releases{/id}","deployments_url":"https://api.github.com/repos/cisco/libacvp/deployments","created_at":"2016-07-26T18:04:10Z","updated_at":"2018-08-30T19:00:55Z","pushed_at":"2018-08-30T19:43:25Z","git_url":"git://github.com/cisco/libacvp.git","ssh_url":"git@github.com:cisco/libacvp.git","clone_url":"https://github.com/cisco/libacvp.git","svn_url":"https://github.com/cisco/libacvp","homepage":null,"size":5171,"stargazers_count":14,"watchers_count":14,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":22,"open_issues":8,"watchers":14,"default_branch":"master"}},"base":{"label":"cisco:master","ref":"master","sha":"4edc35b3d82ed6a42820b09e527d044c1c2ef10d","user":{"login":"cisco","id":1376999,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzY5OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1376999?v=4","gravatar_id":"","url":"https://api.github.com/users/cisco","html_url":"https://github.com/cisco","followers_url":"https://api.github.com/users/cisco/followers","following_url":"https://api.github.com/users/cisco/following{/other_user}","gists_url":"https://api.github.com/users/cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco/subscriptions","organizations_url":"https://api.github.com/users/cisco/orgs","repos_url":"https://api.github.com/users/cisco/repos","events_url":"https://api.github.com/users/cisco/events{/privacy}","received_events_url":"https://api.github.com/users/cisco/received_events","type":"Organization","site_admin":false},"repo":{"id":64243372,"node_id":"MDEwOlJlcG9zaXRvcnk2NDI0MzM3Mg==","name":"libacvp","full_name":"cisco/libacvp","owner":{"login":"cisco","id":1376999,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNzY5OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1376999?v=4","gravatar_id":"","url":"https://api.github.com/users/cisco","html_url":"https://github.com/cisco","followers_url":"https://api.github.com/users/cisco/followers","following_url":"https://api.github.com/users/cisco/following{/other_user}","gists_url":"https://api.github.com/users/cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco/subscriptions","organizations_url":"https://api.github.com/users/cisco/orgs","repos_url":"https://api.github.com/users/cisco/repos","events_url":"https://api.github.com/users/cisco/events{/privacy}","received_events_url":"https://api.github.com/users/cisco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cisco/libacvp","description":"The libacvp library is a client-side implementation of the draft ACVP protocol (github.com/usnistgov/ACVP).","fork":false,"url":"https://api.github.com/repos/cisco/libacvp","forks_url":"https://api.github.com/repos/cisco/libacvp/forks","keys_url":"https://api.github.com/repos/cisco/libacvp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cisco/libacvp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cisco/libacvp/teams","hooks_url":"https://api.github.com/repos/cisco/libacvp/hooks","issue_events_url":"https://api.github.com/repos/cisco/libacvp/issues/events{/number}","events_url":"https://api.github.com/repos/cisco/libacvp/events","assignees_url":"https://api.github.com/repos/cisco/libacvp/assignees{/user}","branches_url":"https://api.github.com/repos/cisco/libacvp/branches{/branch}","tags_url":"https://api.github.com/repos/cisco/libacvp/tags","blobs_url":"https://api.github.com/repos/cisco/libacvp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cisco/libacvp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cisco/libacvp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cisco/libacvp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cisco/libacvp/statuses/{sha}","languages_url":"https://api.github.com/repos/cisco/libacvp/languages","stargazers_url":"https://api.github.com/repos/cisco/libacvp/stargazers","contributors_url":"https://api.github.com/repos/cisco/libacvp/contributors","subscribers_url":"https://api.github.com/repos/cisco/libacvp/subscribers","subscription_url":"https://api.github.com/repos/cisco/libacvp/subscription","commits_url":"https://api.github.com/repos/cisco/libacvp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cisco/libacvp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cisco/libacvp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cisco/libacvp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cisco/libacvp/contents/{+path}","compare_url":"https://api.github.com/repos/cisco/libacvp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cisco/libacvp/merges","archive_url":"https://api.github.com/repos/cisco/libacvp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cisco/libacvp/downloads","issues_url":"https://api.github.com/repos/cisco/libacvp/issues{/number}","pulls_url":"https://api.github.com/repos/cisco/libacvp/pulls{/number}","milestones_url":"https://api.github.com/repos/cisco/libacvp/milestones{/number}","notifications_url":"https://api.github.com/repos/cisco/libacvp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cisco/libacvp/labels{/name}","releases_url":"https://api.github.com/repos/cisco/libacvp/releases{/id}","deployments_url":"https://api.github.com/repos/cisco/libacvp/deployments","created_at":"2016-07-26T18:04:10Z","updated_at":"2018-08-30T19:00:55Z","pushed_at":"2018-08-30T19:43:25Z","git_url":"git://github.com/cisco/libacvp.git","ssh_url":"git@github.com:cisco/libacvp.git","clone_url":"https://github.com/cisco/libacvp.git","svn_url":"https://github.com/cisco/libacvp","homepage":null,"size":5171,"stargazers_count":14,"watchers_count":14,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":22,"open_issues":8,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cisco/libacvp/pulls/134"},"html":{"href":"https://github.com/cisco/libacvp/pull/134"},"issue":{"href":"https://api.github.com/repos/cisco/libacvp/issues/134"},"comments":{"href":"https://api.github.com/repos/cisco/libacvp/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/cisco/libacvp/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/cisco/libacvp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cisco/libacvp/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/cisco/libacvp/statuses/0d264c994bbf2771cea93320f821221f5ab7fc53"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"elliemdaw"}}