{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments/195221053","pull_request_review_id":128540560,"id":195221053,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTIyMTA1Mw==","diff_hunk":"@@ -1446,46 +1459,50 @@ run_test    \"Max fragment length: enabled, default\" \\\n requires_config_enabled MBEDTLS_SSL_MAX_FRAGMENT_LENGTH\n run_test    \"Max fragment length: enabled, default, larger message\" \\\n             \"$P_SRV debug_level=3\" \\\n-            \"$P_CLI debug_level=3 request_size=16385\" \\\n+            \"$P_CLI debug_level=3 request_size=$(expr $MAX_CONTENT_LEN + 1)\" \\\n             0 \\\n-            -c \"Maximum fragment length is 16384\" \\\n-            -s \"Maximum fragment length is 16384\" \\\n+            -c \"Maximum fragment length is $MAX_CONTENT_LEN\" \\\n+            -s \"Maximum fragment length is $MAX_CONTENT_LEN\" \\\n             -C \"client hello, adding max_fragment_length extension\" \\\n             -S \"found max fragment length extension\" \\\n             -S \"server hello, max_fragment_length extension\" \\\n             -C \"found max_fragment_length extension\" \\\n-            -c \"16385 bytes written in 2 fragments\" \\\n-            -s \"16384 bytes read\" \\\n+            -c \"$(expr $MAX_CONTENT_LEN + 1) bytes written in 2 fragments\" \\","path":"tests/ssl-opt.sh","position":104,"original_position":104,"commit_id":"3357c5ccd65755b8c2360b89ec8282fda9c2974b","original_commit_id":"3357c5ccd65755b8c2360b89ec8282fda9c2974b","user":{"login":"gilles-peskine-arm","id":26596258,"node_id":"MDQ6VXNlcjI2NTk2MjU4","avatar_url":"https://avatars3.githubusercontent.com/u/26596258?v=4","gravatar_id":"","url":"https://api.github.com/users/gilles-peskine-arm","html_url":"https://github.com/gilles-peskine-arm","followers_url":"https://api.github.com/users/gilles-peskine-arm/followers","following_url":"https://api.github.com/users/gilles-peskine-arm/following{/other_user}","gists_url":"https://api.github.com/users/gilles-peskine-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/gilles-peskine-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilles-peskine-arm/subscriptions","organizations_url":"https://api.github.com/users/gilles-peskine-arm/orgs","repos_url":"https://api.github.com/users/gilles-peskine-arm/repos","events_url":"https://api.github.com/users/gilles-peskine-arm/events{/privacy}","received_events_url":"https://api.github.com/users/gilles-peskine-arm/received_events","type":"User","site_admin":false},"body":"Please use shell arithmetic `$((MAX_CONTENT_LEN + 1))`, not `expr`. We don't support pre-POSIX Bourne shells, but we do try to support incomplete Unix environments which may have only `sh` and `grep`. Plus shell arithmetic is faster, especially in environments like Cygwin where fork is very slow.","created_at":"2018-06-13T20:16:07Z","updated_at":"2018-06-13T20:49:36Z","html_url":"https://github.com/ARMmbed/mbedtls/pull/536#discussion_r195221053","pull_request_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments/195221053"},"html":{"href":"https://github.com/ARMmbed/mbedtls/pull/536#discussion_r195221053"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536","id":77401492,"node_id":"MDExOlB1bGxSZXF1ZXN0Nzc0MDE0OTI=","html_url":"https://github.com/ARMmbed/mbedtls/pull/536","diff_url":"https://github.com/ARMmbed/mbedtls/pull/536.diff","patch_url":"https://github.com/ARMmbed/mbedtls/pull/536.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/536","number":536,"state":"open","locked":false,"title":"Allow asymmetric in/out buffer lengths to conserve RAM","user":{"login":"projectgus","id":205573,"node_id":"MDQ6VXNlcjIwNTU3Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/205573?v=4","gravatar_id":"","url":"https://api.github.com/users/projectgus","html_url":"https://github.com/projectgus","followers_url":"https://api.github.com/users/projectgus/followers","following_url":"https://api.github.com/users/projectgus/following{/other_user}","gists_url":"https://api.github.com/users/projectgus/gists{/gist_id}","starred_url":"https://api.github.com/users/projectgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectgus/subscriptions","organizations_url":"https://api.github.com/users/projectgus/orgs","repos_url":"https://api.github.com/users/projectgus/repos","events_url":"https://api.github.com/users/projectgus/events{/privacy}","received_events_url":"https://api.github.com/users/projectgus/received_events","type":"User","site_admin":false},"body":"For the situation where the mbedTLS device has limited RAM, but the\nother end of the connection doesn't support the max_fragment_length\nextension. To be spec-compliant, mbedTLS has to keep a 16384 byte\nincoming buffer. However the outgoing buffer can be made smaller without\nbreaking spec compliance, and we save some RAM.\n\nIf buffer lengths are kept equal, this should make zero changes to the compiled library.\n\nSee comments in include/mbedtls/config.h for some more details.\n\n(The lower limit of outgoing buffer size is the buffer size used during\nhandshake/cert negotiation. As the handshake is half-duplex it might\neven be possible to store this data in the \"incoming\" buffer during the\nhandshake, which would save even more RAM - but it would also be a lot\nhackier and error-prone. I didn't really explore this possibility, but\nthought I'd mention it here in case someone sees this later on a mission\nto jam mbedTLS into an even tinier RAM footprint.)\n","created_at":"2016-07-14T05:27:07Z","updated_at":"2018-06-13T20:49:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8dd407b09e8953fb2b483c0c147698af318786b0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Patater","id":410816,"node_id":"MDQ6VXNlcjQxMDgxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/410816?v=4","gravatar_id":"","url":"https://api.github.com/users/Patater","html_url":"https://github.com/Patater","followers_url":"https://api.github.com/users/Patater/followers","following_url":"https://api.github.com/users/Patater/following{/other_user}","gists_url":"https://api.github.com/users/Patater/gists{/gist_id}","starred_url":"https://api.github.com/users/Patater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Patater/subscriptions","organizations_url":"https://api.github.com/users/Patater/orgs","repos_url":"https://api.github.com/users/Patater/repos","events_url":"https://api.github.com/users/Patater/events{/privacy}","received_events_url":"https://api.github.com/users/Patater/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":278176777,"node_id":"MDU6TGFiZWwyNzgxNzY3Nzc=","url":"https://api.github.com/repos/ARMmbed/mbedtls/labels/CLA%20valid","name":"CLA valid","color":"bfdadc","default":false},{"id":817445289,"node_id":"MDU6TGFiZWw4MTc0NDUyODk=","url":"https://api.github.com/repos/ARMmbed/mbedtls/labels/approved%20for%20design","name":"approved for design","color":"66cc00","default":false},{"id":705358813,"node_id":"MDU6TGFiZWw3MDUzNTg4MTM=","url":"https://api.github.com/repos/ARMmbed/mbedtls/labels/needs%20review","name":"needs review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/536/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/3357c5ccd65755b8c2360b89ec8282fda9c2974b","head":{"label":"projectgus:feature/asymetric_buffers","ref":"feature/asymetric_buffers","sha":"3357c5ccd65755b8c2360b89ec8282fda9c2974b","user":{"login":"projectgus","id":205573,"node_id":"MDQ6VXNlcjIwNTU3Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/205573?v=4","gravatar_id":"","url":"https://api.github.com/users/projectgus","html_url":"https://github.com/projectgus","followers_url":"https://api.github.com/users/projectgus/followers","following_url":"https://api.github.com/users/projectgus/following{/other_user}","gists_url":"https://api.github.com/users/projectgus/gists{/gist_id}","starred_url":"https://api.github.com/users/projectgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectgus/subscriptions","organizations_url":"https://api.github.com/users/projectgus/orgs","repos_url":"https://api.github.com/users/projectgus/repos","events_url":"https://api.github.com/users/projectgus/events{/privacy}","received_events_url":"https://api.github.com/users/projectgus/received_events","type":"User","site_admin":false},"repo":{"id":61695243,"node_id":"MDEwOlJlcG9zaXRvcnk2MTY5NTI0Mw==","name":"mbedtls","full_name":"projectgus/mbedtls","owner":{"login":"projectgus","id":205573,"node_id":"MDQ6VXNlcjIwNTU3Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/205573?v=4","gravatar_id":"","url":"https://api.github.com/users/projectgus","html_url":"https://github.com/projectgus","followers_url":"https://api.github.com/users/projectgus/followers","following_url":"https://api.github.com/users/projectgus/following{/other_user}","gists_url":"https://api.github.com/users/projectgus/gists{/gist_id}","starred_url":"https://api.github.com/users/projectgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectgus/subscriptions","organizations_url":"https://api.github.com/users/projectgus/orgs","repos_url":"https://api.github.com/users/projectgus/repos","events_url":"https://api.github.com/users/projectgus/events{/privacy}","received_events_url":"https://api.github.com/users/projectgus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/projectgus/mbedtls","description":"An open source, portable, easy to use, readable and flexible SSL library","fork":true,"url":"https://api.github.com/repos/projectgus/mbedtls","forks_url":"https://api.github.com/repos/projectgus/mbedtls/forks","keys_url":"https://api.github.com/repos/projectgus/mbedtls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectgus/mbedtls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectgus/mbedtls/teams","hooks_url":"https://api.github.com/repos/projectgus/mbedtls/hooks","issue_events_url":"https://api.github.com/repos/projectgus/mbedtls/issues/events{/number}","events_url":"https://api.github.com/repos/projectgus/mbedtls/events","assignees_url":"https://api.github.com/repos/projectgus/mbedtls/assignees{/user}","branches_url":"https://api.github.com/repos/projectgus/mbedtls/branches{/branch}","tags_url":"https://api.github.com/repos/projectgus/mbedtls/tags","blobs_url":"https://api.github.com/repos/projectgus/mbedtls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectgus/mbedtls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectgus/mbedtls/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectgus/mbedtls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectgus/mbedtls/statuses/{sha}","languages_url":"https://api.github.com/repos/projectgus/mbedtls/languages","stargazers_url":"https://api.github.com/repos/projectgus/mbedtls/stargazers","contributors_url":"https://api.github.com/repos/projectgus/mbedtls/contributors","subscribers_url":"https://api.github.com/repos/projectgus/mbedtls/subscribers","subscription_url":"https://api.github.com/repos/projectgus/mbedtls/subscription","commits_url":"https://api.github.com/repos/projectgus/mbedtls/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectgus/mbedtls/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectgus/mbedtls/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectgus/mbedtls/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectgus/mbedtls/contents/{+path}","compare_url":"https://api.github.com/repos/projectgus/mbedtls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectgus/mbedtls/merges","archive_url":"https://api.github.com/repos/projectgus/mbedtls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectgus/mbedtls/downloads","issues_url":"https://api.github.com/repos/projectgus/mbedtls/issues{/number}","pulls_url":"https://api.github.com/repos/projectgus/mbedtls/pulls{/number}","milestones_url":"https://api.github.com/repos/projectgus/mbedtls/milestones{/number}","notifications_url":"https://api.github.com/repos/projectgus/mbedtls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectgus/mbedtls/labels{/name}","releases_url":"https://api.github.com/repos/projectgus/mbedtls/releases{/id}","deployments_url":"https://api.github.com/repos/projectgus/mbedtls/deployments","created_at":"2016-06-22T06:40:02Z","updated_at":"2016-06-22T06:40:06Z","pushed_at":"2018-06-04T00:15:27Z","git_url":"git://github.com/projectgus/mbedtls.git","ssh_url":"git@github.com:projectgus/mbedtls.git","clone_url":"https://github.com/projectgus/mbedtls.git","svn_url":"https://github.com/projectgus/mbedtls","homepage":"https://tls.mbed.org","size":24534,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"development"}},"base":{"label":"ARMmbed:development","ref":"development","sha":"2f3a5815674ab4cb37e773c521f9e753d43768c0","user":{"login":"ARMmbed","id":8916057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MTYwNTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":6687936,"node_id":"MDEwOlJlcG9zaXRvcnk2Njg3OTM2","name":"mbedtls","full_name":"ARMmbed/mbedtls","owner":{"login":"ARMmbed","id":8916057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MTYwNTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbedtls","description":"An open source, portable, easy to use, readable and flexible SSL library","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbedtls","forks_url":"https://api.github.com/repos/ARMmbed/mbedtls/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbedtls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbedtls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbedtls/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbedtls/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbedtls/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbedtls/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbedtls/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbedtls/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbedtls/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbedtls/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbedtls/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbedtls/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbedtls/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbedtls/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbedtls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbedtls/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbedtls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbedtls/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbedtls/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbedtls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbedtls/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbedtls/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbedtls/deployments","created_at":"2012-11-14T13:13:13Z","updated_at":"2018-06-13T17:58:21Z","pushed_at":"2018-06-13T16:42:43Z","git_url":"git://github.com/ARMmbed/mbedtls.git","ssh_url":"git@github.com:ARMmbed/mbedtls.git","clone_url":"https://github.com/ARMmbed/mbedtls.git","svn_url":"https://github.com/ARMmbed/mbedtls","homepage":"https://tls.mbed.org","size":27732,"stargazers_count":1416,"watchers_count":1416,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":875,"mirror_url":null,"archived":false,"open_issues_count":469,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":875,"open_issues":469,"watchers":1416,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536"},"html":{"href":"https://github.com/ARMmbed/mbedtls/pull/536"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/issues/536"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/issues/536/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/536/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/3357c5ccd65755b8c2360b89ec8282fda9c2974b"}},"author_association":"NONE"}}
{"actor":{"display_login":"gilles-peskine-arm"}}