{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments/229896242","pull_request_review_id":170506291,"id":229896242,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTg5NjI0Mg==","diff_hunk":"@@ -0,0 +1,190 @@\n+// Copyright (c) Microsoft Corporation. All rights reserved.\n+// Licensed under the MIT License.\n+\n+#ifdef OE_USE_LIBSGX\n+#include \"qeidentity.h\"\n+#include <openenclave/bits/safecrt.h>\n+#include <openenclave/bits/safemath.h>\n+#include <openenclave/internal/calls.h>\n+#include <openenclave/internal/cert.h>\n+#include <openenclave/internal/crl.h>\n+#include <openenclave/internal/datetime.h>\n+#include <openenclave/internal/ec.h>\n+#include <openenclave/internal/hexdump.h>\n+#include <openenclave/internal/raise.h>\n+#include <openenclave/internal/report.h>\n+#include <openenclave/internal/sgxcertextensions.h>\n+#include <openenclave/internal/sha.h>\n+#include <openenclave/internal/thread.h>\n+#include <openenclave/internal/trace.h>\n+#include <openenclave/internal/utils.h>\n+#include \"common.h\"\n+#include \"tcbinfo.h\"\n+\n+// hardcoded property values used for validating quoting enclave when qe\n+// identity info is not available\n+// The mrsigner value of Intel's Production quoting enclave.\n+static const uint8_t g_qe_mrsigner[32] = {\n+    0x8c, 0x4f, 0x57, 0x75, 0xd7, 0x96, 0x50, 0x3e, 0x96, 0x13, 0x7f,\n+    0x77, 0xc6, 0x8a, 0x82, 0x9a, 0x00, 0x56, 0xac, 0x8d, 0xed, 0x70,\n+    0x14, 0x0b, 0x08, 0x1b, 0x09, 0x44, 0x90, 0xc5, 0x7b, 0xff};\n+\n+// The isvprodid value of Intel's Production quoting enclave.\n+static const uint32_t g_qe_isvprodid = 1;\n+\n+// The isvsvn value of Intel's Production quoting enclave.\n+static const uint32_t g_qeisvsvn = 1;\n+\n+void dump_info(char* title, uint8_t* data, uint8_t count)\n+{\n+    OE_TRACE_INFO(\"%s\\n\", title);\n+    for (uint8_t i = 0; i < count; i++)\n+    {\n+        OE_TRACE_INFO(\"[%d] = %x\\n\", i, data[i]);\n+    }\n+}\n+\n+oe_result_t oe_enforce_qe_identity(sgx_report_body_t* qe_report_body)\n+{\n+    oe_result_t result = OE_FAILURE;\n+    oe_get_qe_identity_info_args_t qe_id_args = {0};\n+    const uint8_t* pem_pck_certificate = NULL;\n+    size_t pem_pck_certificate_size = 0;\n+    oe_cert_chain_t pck_cert_chain = {0};\n+    oe_parsed_qe_identity_info_t parsed_info = {0};\n+\n+    OE_TRACE_INFO(\"Calling %s\\n\", __PRETTY_FUNCTION__);","path":"common/qeidentity.c","position":56,"original_position":56,"commit_id":"a849a5740ac1b1d7dfff427e5338575beca7c691","original_commit_id":"a849a5740ac1b1d7dfff427e5338575beca7c691","user":{"login":"soccerGB","id":19215578,"node_id":"MDQ6VXNlcjE5MjE1NTc4","avatar_url":"https://avatars2.githubusercontent.com/u/19215578?v=4","gravatar_id":"","url":"https://api.github.com/users/soccerGB","html_url":"https://github.com/soccerGB","followers_url":"https://api.github.com/users/soccerGB/followers","following_url":"https://api.github.com/users/soccerGB/following{/other_user}","gists_url":"https://api.github.com/users/soccerGB/gists{/gist_id}","starred_url":"https://api.github.com/users/soccerGB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soccerGB/subscriptions","organizations_url":"https://api.github.com/users/soccerGB/orgs","repos_url":"https://api.github.com/users/soccerGB/repos","events_url":"https://api.github.com/users/soccerGB/events{/privacy}","received_events_url":"https://api.github.com/users/soccerGB/received_events","type":"User","site_admin":false},"body":"I was aware of that. i will replace it with __FUNCTION__ instead","created_at":"2018-10-31T23:02:37Z","updated_at":"2018-10-31T23:02:37Z","html_url":"https://github.com/Microsoft/openenclave/pull/1010#discussion_r229896242","pull_request_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments/229896242"},"html":{"href":"https://github.com/Microsoft/openenclave/pull/1010#discussion_r229896242"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010"}},"in_reply_to_id":229854311},"pull_request":{"url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010","id":227362728,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MzYyNzI4","html_url":"https://github.com/Microsoft/openenclave/pull/1010","diff_url":"https://github.com/Microsoft/openenclave/pull/1010.diff","patch_url":"https://github.com/Microsoft/openenclave/pull/1010.patch","issue_url":"https://api.github.com/repos/Microsoft/openenclave/issues/1010","number":1010,"state":"open","locked":false,"title":"Added dynamic Quote Enclave Identity validation for the oe_verify_report implementation","user":{"login":"soccerGB","id":19215578,"node_id":"MDQ6VXNlcjE5MjE1NTc4","avatar_url":"https://avatars2.githubusercontent.com/u/19215578?v=4","gravatar_id":"","url":"https://api.github.com/users/soccerGB","html_url":"https://github.com/soccerGB","followers_url":"https://api.github.com/users/soccerGB/followers","following_url":"https://api.github.com/users/soccerGB/following{/other_user}","gists_url":"https://api.github.com/users/soccerGB/gists{/gist_id}","starred_url":"https://api.github.com/users/soccerGB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soccerGB/subscriptions","organizations_url":"https://api.github.com/users/soccerGB/orgs","repos_url":"https://api.github.com/users/soccerGB/repos","events_url":"https://api.github.com/users/soccerGB/events{/privacy}","received_events_url":"https://api.github.com/users/soccerGB/received_events","type":"User","site_admin":false},"body":"This PR adds replaces the current hardcoded QE identity properties  with dynamically fetched QE Identity from live site.\r\n\r\n","created_at":"2018-10-31T16:47:05Z","updated_at":"2018-10-31T23:02:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"024c4d1e39513ebe84d3b09b202cefbbb46ad43e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":975186316,"node_id":"MDU6TGFiZWw5NzUxODYzMTY=","url":"https://api.github.com/repos/Microsoft/openenclave/labels/functionality","name":"functionality","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010/commits","review_comments_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010/comments","review_comment_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/openenclave/issues/1010/comments","statuses_url":"https://api.github.com/repos/Microsoft/openenclave/statuses/a849a5740ac1b1d7dfff427e5338575beca7c691","head":{"label":"Microsoft:qeid","ref":"qeid","sha":"a849a5740ac1b1d7dfff427e5338575beca7c691","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":101804230,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE4MDQyMzA=","name":"openenclave","full_name":"Microsoft/openenclave","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/openenclave","description":"SDK for developing enclaves","fork":false,"url":"https://api.github.com/repos/Microsoft/openenclave","forks_url":"https://api.github.com/repos/Microsoft/openenclave/forks","keys_url":"https://api.github.com/repos/Microsoft/openenclave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/openenclave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/openenclave/teams","hooks_url":"https://api.github.com/repos/Microsoft/openenclave/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/openenclave/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/openenclave/events","assignees_url":"https://api.github.com/repos/Microsoft/openenclave/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/openenclave/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/openenclave/tags","blobs_url":"https://api.github.com/repos/Microsoft/openenclave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/openenclave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/openenclave/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/openenclave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/openenclave/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/openenclave/languages","stargazers_url":"https://api.github.com/repos/Microsoft/openenclave/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/openenclave/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/openenclave/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/openenclave/subscription","commits_url":"https://api.github.com/repos/Microsoft/openenclave/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/openenclave/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/openenclave/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/openenclave/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/openenclave/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/openenclave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/openenclave/merges","archive_url":"https://api.github.com/repos/Microsoft/openenclave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/openenclave/downloads","issues_url":"https://api.github.com/repos/Microsoft/openenclave/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/openenclave/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/openenclave/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/openenclave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/openenclave/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/openenclave/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/openenclave/deployments","created_at":"2017-08-29T20:31:38Z","updated_at":"2018-10-31T22:03:55Z","pushed_at":"2018-10-31T22:42:12Z","git_url":"git://github.com/Microsoft/openenclave.git","ssh_url":"git@github.com:Microsoft/openenclave.git","clone_url":"https://github.com/Microsoft/openenclave.git","svn_url":"https://github.com/Microsoft/openenclave","homepage":null,"size":33863,"stargazers_count":57,"watchers_count":57,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":133,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":14,"open_issues":133,"watchers":57,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"ea613a160c33ffc5aaf12933319bfdfe5bfb0438","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":101804230,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE4MDQyMzA=","name":"openenclave","full_name":"Microsoft/openenclave","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/openenclave","description":"SDK for developing enclaves","fork":false,"url":"https://api.github.com/repos/Microsoft/openenclave","forks_url":"https://api.github.com/repos/Microsoft/openenclave/forks","keys_url":"https://api.github.com/repos/Microsoft/openenclave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/openenclave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/openenclave/teams","hooks_url":"https://api.github.com/repos/Microsoft/openenclave/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/openenclave/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/openenclave/events","assignees_url":"https://api.github.com/repos/Microsoft/openenclave/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/openenclave/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/openenclave/tags","blobs_url":"https://api.github.com/repos/Microsoft/openenclave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/openenclave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/openenclave/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/openenclave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/openenclave/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/openenclave/languages","stargazers_url":"https://api.github.com/repos/Microsoft/openenclave/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/openenclave/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/openenclave/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/openenclave/subscription","commits_url":"https://api.github.com/repos/Microsoft/openenclave/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/openenclave/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/openenclave/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/openenclave/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/openenclave/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/openenclave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/openenclave/merges","archive_url":"https://api.github.com/repos/Microsoft/openenclave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/openenclave/downloads","issues_url":"https://api.github.com/repos/Microsoft/openenclave/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/openenclave/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/openenclave/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/openenclave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/openenclave/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/openenclave/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/openenclave/deployments","created_at":"2017-08-29T20:31:38Z","updated_at":"2018-10-31T22:03:55Z","pushed_at":"2018-10-31T22:42:12Z","git_url":"git://github.com/Microsoft/openenclave.git","ssh_url":"git@github.com:Microsoft/openenclave.git","clone_url":"https://github.com/Microsoft/openenclave.git","svn_url":"https://github.com/Microsoft/openenclave","homepage":null,"size":33863,"stargazers_count":57,"watchers_count":57,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":133,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":14,"open_issues":133,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010"},"html":{"href":"https://github.com/Microsoft/openenclave/pull/1010"},"issue":{"href":"https://api.github.com/repos/Microsoft/openenclave/issues/1010"},"comments":{"href":"https://api.github.com/repos/Microsoft/openenclave/issues/1010/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1010/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/openenclave/statuses/a849a5740ac1b1d7dfff427e5338575beca7c691"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"soccerGB"}}