{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/comments/67682058","id":67682058,"diff_hunk":"@@ -11,24 +11,44 @@\n \n public static class ServiceUtilHelper\n {\n-    private const string ClientCertificateSubject = \"WCF Client Certificate\";  \n-    private const string CertificateIssuer = \"DO_NOT_TRUST_WcfBridgeRootCA\";  \n+    private const string ClientCertificateSubject = \"WCF Client Certificate\";\n+    private const string CertificateIssuer = \"DO_NOT_TRUST_WcfBridgeRootCA\";\n \n     private static object s_certLock = new object();\n     private static string s_serviceHostName = string.Empty;\n     private static bool s_rootCertAvailabilityChecked = false;\n     private static bool s_clientCertAvailabilityChecked = false;\n+    private static X509Certificate2 s_rootCertificate = null;\n+    private static X509Certificate2 s_clientCertificate = null;\n+    private static string s_rootCertInstallErrorMessage = null;\n+    private static string s_clientCertInstallErrorMessage = null;\n \n-    public static X509Certificate2 RootCertificate { get; private set; }\n+    public static X509Certificate2 RootCertificate\n+    {\n+        get\n+        {\n+            ThrowIfRootCertificateInstallationError();\n+            return s_rootCertificate;\n+        }\n+    }\n \n-    public static X509Certificate2 ClientCertificate { get; private set; }\n+    public static X509Certificate2 ClientCertificate\n+    {\n+        get\n+        {\n+            ThrowIfClientCertificateInstallationError();\n+            return s_clientCertificate;\n+        }\n+    }\n \n     // Tries to ensure that the root certificate is installed into\n     // the root store.  It obtains the root certificate from the service\n     // utility endpoint and either installs it or verifies that a matching\n-    // one is already installed.  A 'true' return indicates there is a root\n-    // certificate in the store and available via 'RootCertificate'.\n-    public static bool TryEnsureRootCertificateInstalled()\n+    // one is already installed.  InvalidOperationException will be thrown\n+    // if an error occurred attempting to install the certificate.  This\n+    // method may be called multiple times but will attempt the installation\n+    // once only.\n+    public static void EnsureRootCertificateInstalled()\n     {\n         lock (s_certLock)","path":"src/System.Private.ServiceModel/tests/Common/Infrastructure/src/ServiceUtilHelper.cs","position":50,"original_position":50,"commit_id":"15629a27845769016966a62f8ba1938a1198b13e","original_commit_id":"15629a27845769016966a62f8ba1938a1198b13e","user":{"login":"roncain","id":3913124,"avatar_url":"https://avatars.githubusercontent.com/u/3913124?v=3","gravatar_id":"","url":"https://api.github.com/users/roncain","html_url":"https://github.com/roncain","followers_url":"https://api.github.com/users/roncain/followers","following_url":"https://api.github.com/users/roncain/following{/other_user}","gists_url":"https://api.github.com/users/roncain/gists{/gist_id}","starred_url":"https://api.github.com/users/roncain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roncain/subscriptions","organizations_url":"https://api.github.com/users/roncain/orgs","repos_url":"https://api.github.com/users/roncain/repos","events_url":"https://api.github.com/users/roncain/events{/privacy}","received_events_url":"https://api.github.com/users/roncain/received_events","type":"User","site_admin":false},"body":"Will do.","created_at":"2016-06-20T12:38:10Z","updated_at":"2016-06-20T12:38:11Z","html_url":"https://github.com/dotnet/wcf/pull/1292#discussion_r67682058","pull_request_url":"https://api.github.com/repos/dotnet/wcf/pulls/1292","_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments/67682058"},"html":{"href":"https://github.com/dotnet/wcf/pull/1292#discussion_r67682058"},"pull_request":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1292"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/1292","id":73778033,"html_url":"https://github.com/dotnet/wcf/pull/1292","diff_url":"https://github.com/dotnet/wcf/pull/1292.diff","patch_url":"https://github.com/dotnet/wcf/pull/1292.patch","issue_url":"https://api.github.com/repos/dotnet/wcf/issues/1292","number":1292,"state":"open","locked":false,"title":"Make certificate ConditionalFacts allow explicit overrides","user":{"login":"roncain","id":3913124,"avatar_url":"https://avatars.githubusercontent.com/u/3913124?v=3","gravatar_id":"","url":"https://api.github.com/users/roncain","html_url":"https://github.com/roncain","followers_url":"https://api.github.com/users/roncain/followers","following_url":"https://api.github.com/users/roncain/following{/other_user}","gists_url":"https://api.github.com/users/roncain/gists{/gist_id}","starred_url":"https://api.github.com/users/roncain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roncain/subscriptions","organizations_url":"https://api.github.com/users/roncain/orgs","repos_url":"https://api.github.com/users/roncain/repos","events_url":"https://api.github.com/users/roncain/events{/privacy}","received_events_url":"https://api.github.com/users/roncain/received_events","type":"User","site_admin":false},"body":"This alters the behavior of the ConditionalFact conditions\r\nfor Root_Certificate_Installed and Client_Certificate_Installed\r\nto respect if they have been set explicitly via the build or\r\nas Environment variables.  This allows CI or lab runs to\r\ncontrol whether certificate related tests are run or skipped,\r\nindependent of auto-detection logic.\r\n\r\nIf not explicitly set, the prior auto-detection logic works\r\nas it did in the past.  If they can be installed and verified,\r\nthen those ConditionalFact tests run, otherwise they are skipped.\r\n\r\nIf explicitly set to false, those tests are skipped without\r\nattempting any certificate installation.\r\n\r\nIf explicitly set to true, the ConditionalFact logic will\r\nattempt to install the certificates, and those ConditionalFact\r\ntests will be run, regardless whether the install succeeded.\r\n\r\nThis PR also adds new ConditionalFact tests to explicitly\r\nvalidate whether the certificates have been installed\r\ncorrectly.  This permits easier diagnosis of all certificate\r\nrelated tests because these tests will report the installation\r\nfailure.\r\n\r\nFixes #1291","created_at":"2016-06-14T17:10:29Z","updated_at":"2016-06-20T12:38:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21bf4f443747b60968c17190e1166badb959e26f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/wcf/pulls/1292/commits","review_comments_url":"https://api.github.com/repos/dotnet/wcf/pulls/1292/comments","review_comment_url":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/wcf/issues/1292/comments","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/15629a27845769016966a62f8ba1938a1198b13e","head":{"label":"roncain:validate-setup","ref":"validate-setup","sha":"15629a27845769016966a62f8ba1938a1198b13e","user":{"login":"roncain","id":3913124,"avatar_url":"https://avatars.githubusercontent.com/u/3913124?v=3","gravatar_id":"","url":"https://api.github.com/users/roncain","html_url":"https://github.com/roncain","followers_url":"https://api.github.com/users/roncain/followers","following_url":"https://api.github.com/users/roncain/following{/other_user}","gists_url":"https://api.github.com/users/roncain/gists{/gist_id}","starred_url":"https://api.github.com/users/roncain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roncain/subscriptions","organizations_url":"https://api.github.com/users/roncain/orgs","repos_url":"https://api.github.com/users/roncain/repos","events_url":"https://api.github.com/users/roncain/events{/privacy}","received_events_url":"https://api.github.com/users/roncain/received_events","type":"User","site_admin":false},"repo":{"id":39504510,"name":"wcf","full_name":"roncain/wcf","owner":{"login":"roncain","id":3913124,"avatar_url":"https://avatars.githubusercontent.com/u/3913124?v=3","gravatar_id":"","url":"https://api.github.com/users/roncain","html_url":"https://github.com/roncain","followers_url":"https://api.github.com/users/roncain/followers","following_url":"https://api.github.com/users/roncain/following{/other_user}","gists_url":"https://api.github.com/users/roncain/gists{/gist_id}","starred_url":"https://api.github.com/users/roncain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roncain/subscriptions","organizations_url":"https://api.github.com/users/roncain/orgs","repos_url":"https://api.github.com/users/roncain/repos","events_url":"https://api.github.com/users/roncain/events{/privacy}","received_events_url":"https://api.github.com/users/roncain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/roncain/wcf","description":"This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.","fork":true,"url":"https://api.github.com/repos/roncain/wcf","forks_url":"https://api.github.com/repos/roncain/wcf/forks","keys_url":"https://api.github.com/repos/roncain/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roncain/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roncain/wcf/teams","hooks_url":"https://api.github.com/repos/roncain/wcf/hooks","issue_events_url":"https://api.github.com/repos/roncain/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/roncain/wcf/events","assignees_url":"https://api.github.com/repos/roncain/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/roncain/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/roncain/wcf/tags","blobs_url":"https://api.github.com/repos/roncain/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roncain/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roncain/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/roncain/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roncain/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/roncain/wcf/languages","stargazers_url":"https://api.github.com/repos/roncain/wcf/stargazers","contributors_url":"https://api.github.com/repos/roncain/wcf/contributors","subscribers_url":"https://api.github.com/repos/roncain/wcf/subscribers","subscription_url":"https://api.github.com/repos/roncain/wcf/subscription","commits_url":"https://api.github.com/repos/roncain/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/roncain/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/roncain/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/roncain/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/roncain/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/roncain/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roncain/wcf/merges","archive_url":"https://api.github.com/repos/roncain/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roncain/wcf/downloads","issues_url":"https://api.github.com/repos/roncain/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/roncain/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/roncain/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/roncain/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roncain/wcf/labels{/name}","releases_url":"https://api.github.com/repos/roncain/wcf/releases{/id}","deployments_url":"https://api.github.com/repos/roncain/wcf/deployments","created_at":"2015-07-22T12:21:54Z","updated_at":"2016-01-12T17:24:47Z","pushed_at":"2016-06-17T16:12:01Z","git_url":"git://github.com/roncain/wcf.git","ssh_url":"git@github.com:roncain/wcf.git","clone_url":"https://github.com/roncain/wcf.git","svn_url":"https://github.com/roncain/wcf","homepage":"","size":6174,"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":"dotnet:master","ref":"master","sha":"524d9cdfd223ee35b306126c442a56201aac7c57","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35562993,"name":"wcf","full_name":"dotnet/wcf","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/wcf","description":"This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.","fork":false,"url":"https://api.github.com/repos/dotnet/wcf","forks_url":"https://api.github.com/repos/dotnet/wcf/forks","keys_url":"https://api.github.com/repos/dotnet/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/wcf/teams","hooks_url":"https://api.github.com/repos/dotnet/wcf/hooks","issue_events_url":"https://api.github.com/repos/dotnet/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/wcf/events","assignees_url":"https://api.github.com/repos/dotnet/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/wcf/tags","blobs_url":"https://api.github.com/repos/dotnet/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/wcf/languages","stargazers_url":"https://api.github.com/repos/dotnet/wcf/stargazers","contributors_url":"https://api.github.com/repos/dotnet/wcf/contributors","subscribers_url":"https://api.github.com/repos/dotnet/wcf/subscribers","subscription_url":"https://api.github.com/repos/dotnet/wcf/subscription","commits_url":"https://api.github.com/repos/dotnet/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/wcf/merges","archive_url":"https://api.github.com/repos/dotnet/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/wcf/downloads","issues_url":"https://api.github.com/repos/dotnet/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/wcf/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/wcf/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/wcf/deployments","created_at":"2015-05-13T17:17:03Z","updated_at":"2016-06-20T11:44:06Z","pushed_at":"2016-06-17T22:30:21Z","git_url":"git://github.com/dotnet/wcf.git","ssh_url":"git@github.com:dotnet/wcf.git","clone_url":"https://github.com/dotnet/wcf.git","svn_url":"https://github.com/dotnet/wcf","homepage":"","size":7702,"stargazers_count":642,"watchers_count":642,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":166,"forks":224,"open_issues":166,"watchers":642,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1292"},"html":{"href":"https://github.com/dotnet/wcf/pull/1292"},"issue":{"href":"https://api.github.com/repos/dotnet/wcf/issues/1292"},"comments":{"href":"https://api.github.com/repos/dotnet/wcf/issues/1292/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1292/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1292/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/wcf/statuses/15629a27845769016966a62f8ba1938a1198b13e"}}}}
{"actor":{"display_login":"roncain"}}