{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/comments/81535267","pull_request_review_id":2507613,"id":81535267,"diff_hunk":"@@ -0,0 +1,40 @@\n+﻿// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+using System.Security.Cryptography.X509Certificates;\n+\n+namespace System.ServiceModel\n+{\n+    internal static class X509Certificate2Extensions\n+    {\n+        // dotnet/wcf#1574 - This is a workaround for dotnet/corefx#12214\n+        // The copy constructor was removed in .NET Core, this is the workaround to allow us to make copies of certificates\n+\n+        internal static X509Certificate2 CloneCertificateInternal(this X509Certificate2 certificateToClone)\n+        {\n+#if TARGETS_WINDOWS\n+            return new X509Certificate2(certificateToClone.Handle);\n+#else\n+            X509Certificate2Collection collection = new X509Certificate2Collection(certificateToClone);","path":"src/System.Private.ServiceModel/src/Extensions/X509Certificate2Extensions.cs","position":19,"original_position":19,"commit_id":"1303ffc492755cdc22bef8ca26d7d8f09b562cdf","original_commit_id":"1303ffc492755cdc22bef8ca26d7d8f09b562cdf","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 the collection get GC'ed, or does the handle hold it memory? Should we remove it from the collection after finding it? I don't know the lifetime rules for collections.","created_at":"2016-10-03T11:48:46Z","updated_at":"2016-10-03T11:48:46Z","html_url":"https://github.com/dotnet/wcf/pull/1575#discussion_r81535267","pull_request_url":"https://api.github.com/repos/dotnet/wcf/pulls/1575","_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments/81535267"},"html":{"href":"https://github.com/dotnet/wcf/pull/1575#discussion_r81535267"},"pull_request":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1575"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/1575","id":87584118,"html_url":"https://github.com/dotnet/wcf/pull/1575","diff_url":"https://github.com/dotnet/wcf/pull/1575.diff","patch_url":"https://github.com/dotnet/wcf/pull/1575.patch","issue_url":"https://api.github.com/repos/dotnet/wcf/issues/1575","number":1575,"state":"open","locked":false,"title":"Work around X509Certificate2 copy constructor omission ","user":{"login":"iamjasonp","id":1616847,"avatar_url":"https://avatars.githubusercontent.com/u/1616847?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjasonp","html_url":"https://github.com/iamjasonp","followers_url":"https://api.github.com/users/iamjasonp/followers","following_url":"https://api.github.com/users/iamjasonp/following{/other_user}","gists_url":"https://api.github.com/users/iamjasonp/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjasonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjasonp/subscriptions","organizations_url":"https://api.github.com/users/iamjasonp/orgs","repos_url":"https://api.github.com/users/iamjasonp/repos","events_url":"https://api.github.com/users/iamjasonp/events{/privacy}","received_events_url":"https://api.github.com/users/iamjasonp/received_events","type":"User","site_admin":false},"body":"In .NET Core, the X509Certificate2 copy constructor was missing; where WCF code\r\nneeded to clone a certificate, we replaced the references to the copy constructor\r\nwith code that uses the certificate.Handle instead\r\n\r\nHowever, in Linux, OpenSSL does not provide the private key when using this handle,\r\nmeaning the private key goes missing in all subsequent copies; as such, client cert\r\nauthentication doesn't work.\r\n\r\nThis is a stopgap solution only, as we await the inclusion of the X509Certificate2\r\ncopy ctor in a future .NET Core version\r\n\r\nRelates to #1574","created_at":"2016-10-01T00:17:30Z","updated_at":"2016-10-03T11:48:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f17be3794c092267aaa7f347fe1bc20c280703b1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/wcf/pulls/1575/commits","review_comments_url":"https://api.github.com/repos/dotnet/wcf/pulls/1575/comments","review_comment_url":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/wcf/issues/1575/comments","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/1303ffc492755cdc22bef8ca26d7d8f09b562cdf","head":{"label":"iamjasonp:x509-copy-ctor-workaround","ref":"x509-copy-ctor-workaround","sha":"1303ffc492755cdc22bef8ca26d7d8f09b562cdf","user":{"login":"iamjasonp","id":1616847,"avatar_url":"https://avatars.githubusercontent.com/u/1616847?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjasonp","html_url":"https://github.com/iamjasonp","followers_url":"https://api.github.com/users/iamjasonp/followers","following_url":"https://api.github.com/users/iamjasonp/following{/other_user}","gists_url":"https://api.github.com/users/iamjasonp/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjasonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjasonp/subscriptions","organizations_url":"https://api.github.com/users/iamjasonp/orgs","repos_url":"https://api.github.com/users/iamjasonp/repos","events_url":"https://api.github.com/users/iamjasonp/events{/privacy}","received_events_url":"https://api.github.com/users/iamjasonp/received_events","type":"User","site_admin":false},"repo":{"id":35954677,"name":"wcf","full_name":"iamjasonp/wcf","owner":{"login":"iamjasonp","id":1616847,"avatar_url":"https://avatars.githubusercontent.com/u/1616847?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjasonp","html_url":"https://github.com/iamjasonp","followers_url":"https://api.github.com/users/iamjasonp/followers","following_url":"https://api.github.com/users/iamjasonp/following{/other_user}","gists_url":"https://api.github.com/users/iamjasonp/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjasonp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjasonp/subscriptions","organizations_url":"https://api.github.com/users/iamjasonp/orgs","repos_url":"https://api.github.com/users/iamjasonp/repos","events_url":"https://api.github.com/users/iamjasonp/events{/privacy}","received_events_url":"https://api.github.com/users/iamjasonp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamjasonp/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/iamjasonp/wcf","forks_url":"https://api.github.com/repos/iamjasonp/wcf/forks","keys_url":"https://api.github.com/repos/iamjasonp/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamjasonp/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamjasonp/wcf/teams","hooks_url":"https://api.github.com/repos/iamjasonp/wcf/hooks","issue_events_url":"https://api.github.com/repos/iamjasonp/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/iamjasonp/wcf/events","assignees_url":"https://api.github.com/repos/iamjasonp/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/iamjasonp/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/iamjasonp/wcf/tags","blobs_url":"https://api.github.com/repos/iamjasonp/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamjasonp/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamjasonp/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamjasonp/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamjasonp/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/iamjasonp/wcf/languages","stargazers_url":"https://api.github.com/repos/iamjasonp/wcf/stargazers","contributors_url":"https://api.github.com/repos/iamjasonp/wcf/contributors","subscribers_url":"https://api.github.com/repos/iamjasonp/wcf/subscribers","subscription_url":"https://api.github.com/repos/iamjasonp/wcf/subscription","commits_url":"https://api.github.com/repos/iamjasonp/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamjasonp/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamjasonp/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamjasonp/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamjasonp/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/iamjasonp/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamjasonp/wcf/merges","archive_url":"https://api.github.com/repos/iamjasonp/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamjasonp/wcf/downloads","issues_url":"https://api.github.com/repos/iamjasonp/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/iamjasonp/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/iamjasonp/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/iamjasonp/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamjasonp/wcf/labels{/name}","releases_url":"https://api.github.com/repos/iamjasonp/wcf/releases{/id}","deployments_url":"https://api.github.com/repos/iamjasonp/wcf/deployments","created_at":"2015-05-20T14:54:42Z","updated_at":"2016-01-26T19:54:29Z","pushed_at":"2016-10-01T00:28:32Z","git_url":"git://github.com/iamjasonp/wcf.git","ssh_url":"git@github.com:iamjasonp/wcf.git","clone_url":"https://github.com/iamjasonp/wcf.git","svn_url":"https://github.com/iamjasonp/wcf","homepage":"","size":7102,"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":"30688f4991ab32bb2acbb1232c1856c4572309b1","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-09-30T05:53:46Z","pushed_at":"2016-10-03T08:36:05Z","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":9155,"stargazers_count":699,"watchers_count":699,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":244,"mirror_url":null,"open_issues_count":177,"forks":244,"open_issues":177,"watchers":699,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1575"},"html":{"href":"https://github.com/dotnet/wcf/pull/1575"},"issue":{"href":"https://api.github.com/repos/dotnet/wcf/issues/1575"},"comments":{"href":"https://api.github.com/repos/dotnet/wcf/issues/1575/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1575/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/1575/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/wcf/statuses/1303ffc492755cdc22bef8ca26d7d8f09b562cdf"}}}}
{"actor":{"display_login":"roncain"}}