{"action":"closed","number":9369,"pull_request":{"url":"https://api.github.com/repos/mono/mono/pulls/9369","id":198135795,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MTM1Nzk1","html_url":"https://github.com/mono/mono/pull/9369","diff_url":"https://github.com/mono/mono/pull/9369.diff","patch_url":"https://github.com/mono/mono/pull/9369.patch","issue_url":"https://api.github.com/repos/mono/mono/issues/9369","number":9369,"state":"closed","locked":false,"title":"[corlib]: Cleanup `X509Helper` initialization and import.","user":{"login":"baulig","id":346113,"node_id":"MDQ6VXNlcjM0NjExMw==","avatar_url":"https://avatars2.githubusercontent.com/u/346113?v=4","gravatar_id":"","url":"https://api.github.com/users/baulig","html_url":"https://github.com/baulig","followers_url":"https://api.github.com/users/baulig/followers","following_url":"https://api.github.com/users/baulig/following{/other_user}","gists_url":"https://api.github.com/users/baulig/gists{/gist_id}","starred_url":"https://api.github.com/users/baulig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baulig/subscriptions","organizations_url":"https://api.github.com/users/baulig/orgs","repos_url":"https://api.github.com/users/baulig/repos","events_url":"https://api.github.com/users/baulig/events{/privacy}","received_events_url":"https://api.github.com/users/baulig/received_events","type":"User","site_admin":false},"body":"This is currently only used for BTLS.\r\n\r\n* `X509Helper.EnsureNativeHelper`: New internal method to ensure the native helper is initialized.\r\n\r\n  On Mobile, we call `MonoTlsProviderFactory.Initialize()` (which calls `X509Helper2.Initialize()`) during system startup, so the `nativeHelper` is always initialized.\r\n  \r\n  On Desktop, using either `SslStream` or `X509Certificate2` will initialize it as well.  Add a reflection-based fallback which will call `X509Helper2.Initialize()` in System.dll if necessary.\r\n  \r\n* `X509Helper.InitFromCertificate`: Call `EnsureNativeHelper()` then use `ImportCore()`.\r\n\r\n* `X509Helper.InitCore`: Try to use the native helper if possible, so we can avoid the managed PEM -> DER conversion.\r\n\r\n* `INativeCertificateHelper.Import()`: Add new overload only taking a `byte[]`.  The implementation will automatically convert PEM to DER using its native backend if possible.  Since BTLS supports both import formats, it will simply pass the correct format type to the native backend.\r\n\r\nSince `X509Helper2.Initialize()` is called independently from the choice of TLS Provider (including Legacy TLS), this will allow us to move all the fallback code from corlib into System.\r\n","created_at":"2018-06-28T19:54:23Z","updated_at":"2018-06-29T17:54:48Z","closed_at":"2018-06-29T17:54:48Z","merged_at":null,"merge_commit_sha":"6dd704e3d0f2a3274e7bd4cf268557800d5995c0","assignee":{"login":"baulig","id":346113,"node_id":"MDQ6VXNlcjM0NjExMw==","avatar_url":"https://avatars2.githubusercontent.com/u/346113?v=4","gravatar_id":"","url":"https://api.github.com/users/baulig","html_url":"https://github.com/baulig","followers_url":"https://api.github.com/users/baulig/followers","following_url":"https://api.github.com/users/baulig/following{/other_user}","gists_url":"https://api.github.com/users/baulig/gists{/gist_id}","starred_url":"https://api.github.com/users/baulig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baulig/subscriptions","organizations_url":"https://api.github.com/users/baulig/orgs","repos_url":"https://api.github.com/users/baulig/repos","events_url":"https://api.github.com/users/baulig/events{/privacy}","received_events_url":"https://api.github.com/users/baulig/received_events","type":"User","site_admin":false},"assignees":[{"login":"baulig","id":346113,"node_id":"MDQ6VXNlcjM0NjExMw==","avatar_url":"https://avatars2.githubusercontent.com/u/346113?v=4","gravatar_id":"","url":"https://api.github.com/users/baulig","html_url":"https://github.com/baulig","followers_url":"https://api.github.com/users/baulig/followers","following_url":"https://api.github.com/users/baulig/following{/other_user}","gists_url":"https://api.github.com/users/baulig/gists{/gist_id}","starred_url":"https://api.github.com/users/baulig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baulig/subscriptions","organizations_url":"https://api.github.com/users/baulig/orgs","repos_url":"https://api.github.com/users/baulig/repos","events_url":"https://api.github.com/users/baulig/events{/privacy}","received_events_url":"https://api.github.com/users/baulig/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"marek-safar","id":250852,"node_id":"MDQ6VXNlcjI1MDg1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/250852?v=4","gravatar_id":"","url":"https://api.github.com/users/marek-safar","html_url":"https://github.com/marek-safar","followers_url":"https://api.github.com/users/marek-safar/followers","following_url":"https://api.github.com/users/marek-safar/following{/other_user}","gists_url":"https://api.github.com/users/marek-safar/gists{/gist_id}","starred_url":"https://api.github.com/users/marek-safar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marek-safar/subscriptions","organizations_url":"https://api.github.com/users/marek-safar/orgs","repos_url":"https://api.github.com/users/marek-safar/repos","events_url":"https://api.github.com/users/marek-safar/events{/privacy}","received_events_url":"https://api.github.com/users/marek-safar/received_events","type":"User","site_admin":false},{"login":"luhenry","id":660779,"node_id":"MDQ6VXNlcjY2MDc3OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/660779?v=4","gravatar_id":"","url":"https://api.github.com/users/luhenry","html_url":"https://github.com/luhenry","followers_url":"https://api.github.com/users/luhenry/followers","following_url":"https://api.github.com/users/luhenry/following{/other_user}","gists_url":"https://api.github.com/users/luhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/luhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luhenry/subscriptions","organizations_url":"https://api.github.com/users/luhenry/orgs","repos_url":"https://api.github.com/users/luhenry/repos","events_url":"https://api.github.com/users/luhenry/events{/privacy}","received_events_url":"https://api.github.com/users/luhenry/received_events","type":"User","site_admin":false},{"login":"akoeplinger","id":1376924,"node_id":"MDQ6VXNlcjEzNzY5MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1376924?v=4","gravatar_id":"","url":"https://api.github.com/users/akoeplinger","html_url":"https://github.com/akoeplinger","followers_url":"https://api.github.com/users/akoeplinger/followers","following_url":"https://api.github.com/users/akoeplinger/following{/other_user}","gists_url":"https://api.github.com/users/akoeplinger/gists{/gist_id}","starred_url":"https://api.github.com/users/akoeplinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akoeplinger/subscriptions","organizations_url":"https://api.github.com/users/akoeplinger/orgs","repos_url":"https://api.github.com/users/akoeplinger/repos","events_url":"https://api.github.com/users/akoeplinger/events{/privacy}","received_events_url":"https://api.github.com/users/akoeplinger/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":422733184,"node_id":"MDU6TGFiZWw0MjI3MzMxODQ=","url":"https://api.github.com/repos/mono/mono/labels/do-not-merge","name":"do-not-merge","color":"ee0000","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mono/mono/pulls/9369/commits","review_comments_url":"https://api.github.com/repos/mono/mono/pulls/9369/comments","review_comment_url":"https://api.github.com/repos/mono/mono/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mono/mono/issues/9369/comments","statuses_url":"https://api.github.com/repos/mono/mono/statuses/81e2e85eefd79e47b0c833567ff7c13ddf4289f2","head":{"label":"baulig:work-btls-certificates","ref":"work-btls-certificates","sha":"81e2e85eefd79e47b0c833567ff7c13ddf4289f2","user":{"login":"baulig","id":346113,"node_id":"MDQ6VXNlcjM0NjExMw==","avatar_url":"https://avatars2.githubusercontent.com/u/346113?v=4","gravatar_id":"","url":"https://api.github.com/users/baulig","html_url":"https://github.com/baulig","followers_url":"https://api.github.com/users/baulig/followers","following_url":"https://api.github.com/users/baulig/following{/other_user}","gists_url":"https://api.github.com/users/baulig/gists{/gist_id}","starred_url":"https://api.github.com/users/baulig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baulig/subscriptions","organizations_url":"https://api.github.com/users/baulig/orgs","repos_url":"https://api.github.com/users/baulig/repos","events_url":"https://api.github.com/users/baulig/events{/privacy}","received_events_url":"https://api.github.com/users/baulig/received_events","type":"User","site_admin":false},"repo":{"id":15292609,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI5MjYwOQ==","name":"mono","full_name":"baulig/mono","owner":{"login":"baulig","id":346113,"node_id":"MDQ6VXNlcjM0NjExMw==","avatar_url":"https://avatars2.githubusercontent.com/u/346113?v=4","gravatar_id":"","url":"https://api.github.com/users/baulig","html_url":"https://github.com/baulig","followers_url":"https://api.github.com/users/baulig/followers","following_url":"https://api.github.com/users/baulig/following{/other_user}","gists_url":"https://api.github.com/users/baulig/gists{/gist_id}","starred_url":"https://api.github.com/users/baulig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baulig/subscriptions","organizations_url":"https://api.github.com/users/baulig/orgs","repos_url":"https://api.github.com/users/baulig/repos","events_url":"https://api.github.com/users/baulig/events{/privacy}","received_events_url":"https://api.github.com/users/baulig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baulig/mono","description":"Mono open source ECMA CLI, C# and .NET implementation.","fork":true,"url":"https://api.github.com/repos/baulig/mono","forks_url":"https://api.github.com/repos/baulig/mono/forks","keys_url":"https://api.github.com/repos/baulig/mono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baulig/mono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baulig/mono/teams","hooks_url":"https://api.github.com/repos/baulig/mono/hooks","issue_events_url":"https://api.github.com/repos/baulig/mono/issues/events{/number}","events_url":"https://api.github.com/repos/baulig/mono/events","assignees_url":"https://api.github.com/repos/baulig/mono/assignees{/user}","branches_url":"https://api.github.com/repos/baulig/mono/branches{/branch}","tags_url":"https://api.github.com/repos/baulig/mono/tags","blobs_url":"https://api.github.com/repos/baulig/mono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baulig/mono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baulig/mono/git/refs{/sha}","trees_url":"https://api.github.com/repos/baulig/mono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baulig/mono/statuses/{sha}","languages_url":"https://api.github.com/repos/baulig/mono/languages","stargazers_url":"https://api.github.com/repos/baulig/mono/stargazers","contributors_url":"https://api.github.com/repos/baulig/mono/contributors","subscribers_url":"https://api.github.com/repos/baulig/mono/subscribers","subscription_url":"https://api.github.com/repos/baulig/mono/subscription","commits_url":"https://api.github.com/repos/baulig/mono/commits{/sha}","git_commits_url":"https://api.github.com/repos/baulig/mono/git/commits{/sha}","comments_url":"https://api.github.com/repos/baulig/mono/comments{/number}","issue_comment_url":"https://api.github.com/repos/baulig/mono/issues/comments{/number}","contents_url":"https://api.github.com/repos/baulig/mono/contents/{+path}","compare_url":"https://api.github.com/repos/baulig/mono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baulig/mono/merges","archive_url":"https://api.github.com/repos/baulig/mono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baulig/mono/downloads","issues_url":"https://api.github.com/repos/baulig/mono/issues{/number}","pulls_url":"https://api.github.com/repos/baulig/mono/pulls{/number}","milestones_url":"https://api.github.com/repos/baulig/mono/milestones{/number}","notifications_url":"https://api.github.com/repos/baulig/mono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baulig/mono/labels{/name}","releases_url":"https://api.github.com/repos/baulig/mono/releases{/id}","deployments_url":"https://api.github.com/repos/baulig/mono/deployments","created_at":"2013-12-18T19:47:13Z","updated_at":"2017-04-24T21:23:25Z","pushed_at":"2018-06-28T19:52:50Z","git_url":"git://github.com/baulig/mono.git","ssh_url":"git@github.com:baulig/mono.git","clone_url":"https://github.com/baulig/mono.git","svn_url":"https://github.com/baulig/mono","homepage":"http://www.mono-project.com/","size":469695,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mono:master","ref":"master","sha":"7121e5467608cdd1a4f6df8267a4972c8934e0e8","user":{"login":"mono","id":53395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzk1","avatar_url":"https://avatars3.githubusercontent.com/u/53395?v=4","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791611,"node_id":"MDEwOlJlcG9zaXRvcnk3OTE2MTE=","name":"mono","full_name":"mono/mono","owner":{"login":"mono","id":53395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzk1","avatar_url":"https://avatars3.githubusercontent.com/u/53395?v=4","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/mono","description":"Mono open source ECMA CLI, C# and .NET implementation.","fork":false,"url":"https://api.github.com/repos/mono/mono","forks_url":"https://api.github.com/repos/mono/mono/forks","keys_url":"https://api.github.com/repos/mono/mono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/mono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/mono/teams","hooks_url":"https://api.github.com/repos/mono/mono/hooks","issue_events_url":"https://api.github.com/repos/mono/mono/issues/events{/number}","events_url":"https://api.github.com/repos/mono/mono/events","assignees_url":"https://api.github.com/repos/mono/mono/assignees{/user}","branches_url":"https://api.github.com/repos/mono/mono/branches{/branch}","tags_url":"https://api.github.com/repos/mono/mono/tags","blobs_url":"https://api.github.com/repos/mono/mono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/mono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/mono/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/mono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/mono/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/mono/languages","stargazers_url":"https://api.github.com/repos/mono/mono/stargazers","contributors_url":"https://api.github.com/repos/mono/mono/contributors","subscribers_url":"https://api.github.com/repos/mono/mono/subscribers","subscription_url":"https://api.github.com/repos/mono/mono/subscription","commits_url":"https://api.github.com/repos/mono/mono/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/mono/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/mono/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/mono/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono/mono/contents/{+path}","compare_url":"https://api.github.com/repos/mono/mono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/mono/merges","archive_url":"https://api.github.com/repos/mono/mono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/mono/downloads","issues_url":"https://api.github.com/repos/mono/mono/issues{/number}","pulls_url":"https://api.github.com/repos/mono/mono/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/mono/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/mono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/mono/labels{/name}","releases_url":"https://api.github.com/repos/mono/mono/releases{/id}","deployments_url":"https://api.github.com/repos/mono/mono/deployments","created_at":"2010-07-22T18:06:36Z","updated_at":"2018-06-29T17:00:21Z","pushed_at":"2018-06-29T17:50:29Z","git_url":"git://github.com/mono/mono.git","ssh_url":"git@github.com:mono/mono.git","clone_url":"https://github.com/mono/mono.git","svn_url":"https://github.com/mono/mono","homepage":"http://www.mono-project.com/","size":483472,"stargazers_count":6664,"watchers_count":6664,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2902,"mirror_url":null,"archived":false,"open_issues_count":683,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2902,"open_issues":683,"watchers":6664,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mono/mono/pulls/9369"},"html":{"href":"https://github.com/mono/mono/pull/9369"},"issue":{"href":"https://api.github.com/repos/mono/mono/issues/9369"},"comments":{"href":"https://api.github.com/repos/mono/mono/issues/9369/comments"},"review_comments":{"href":"https://api.github.com/repos/mono/mono/pulls/9369/comments"},"review_comment":{"href":"https://api.github.com/repos/mono/mono/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mono/mono/pulls/9369/commits"},"statuses":{"href":"https://api.github.com/repos/mono/mono/statuses/81e2e85eefd79e47b0c833567ff7c13ddf4289f2"}},"author_association":"MEMBER","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":65,"deletions":8,"changed_files":4}}
{"actor":{"display_login":"baulig"}}