{"action":"created","issue":{"url":"https://api.github.com/repos/SmingHub/Sming/issues/596","repository_url":"https://api.github.com/repos/SmingHub/Sming","labels_url":"https://api.github.com/repos/SmingHub/Sming/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/SmingHub/Sming/issues/596/comments","events_url":"https://api.github.com/repos/SmingHub/Sming/issues/596/events","html_url":"https://github.com/SmingHub/Sming/pull/596","id":132171398,"number":596,"title":"Initial SSL support based on axTLS.","user":{"login":"slaff","id":247452,"avatar_url":"https://avatars.githubusercontent.com/u/247452?v=3","gravatar_id":"","url":"https://api.github.com/users/slaff","html_url":"https://github.com/slaff","followers_url":"https://api.github.com/users/slaff/followers","following_url":"https://api.github.com/users/slaff/following{/other_user}","gists_url":"https://api.github.com/users/slaff/gists{/gist_id}","starred_url":"https://api.github.com/users/slaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slaff/subscriptions","organizations_url":"https://api.github.com/users/slaff/orgs","repos_url":"https://api.github.com/users/slaff/repos","events_url":"https://api.github.com/users/slaff/events{/privacy}","received_events_url":"https://api.github.com/users/slaff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SmingHub/Sming/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/SmingHub/Sming/labels/Need%20port%20to%20RTOS","name":"Need port to RTOS","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2016-02-08T15:23:54Z","updated_at":"2016-03-14T15:15:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SmingHub/Sming/pulls/596","html_url":"https://github.com/SmingHub/Sming/pull/596","diff_url":"https://github.com/SmingHub/Sming/pull/596.diff","patch_url":"https://github.com/SmingHub/Sming/pull/596.patch"},"body":"Added SSL support to the MqttClient and the HttpClient.\r\nFixed conflicting directives."},"comment":{"url":"https://api.github.com/repos/SmingHub/Sming/issues/comments/196362903","html_url":"https://github.com/SmingHub/Sming/pull/596#issuecomment-196362903","issue_url":"https://api.github.com/repos/SmingHub/Sming/issues/596","id":196362903,"user":{"login":"slaff","id":247452,"avatar_url":"https://avatars.githubusercontent.com/u/247452?v=3","gravatar_id":"","url":"https://api.github.com/users/slaff","html_url":"https://github.com/slaff","followers_url":"https://api.github.com/users/slaff/followers","following_url":"https://api.github.com/users/slaff/following{/other_user}","gists_url":"https://api.github.com/users/slaff/gists{/gist_id}","starred_url":"https://api.github.com/users/slaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slaff/subscriptions","organizations_url":"https://api.github.com/users/slaff/orgs","repos_url":"https://api.github.com/users/slaff/repos","events_url":"https://api.github.com/users/slaff/events{/privacy}","received_events_url":"https://api.github.com/users/slaff/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T15:15:43Z","updated_at":"2016-03-14T15:15:43Z","body":"> If we get more options like this it is probably difficult to keep the number of libs limited.\r\n\r\nIt is possible to merge the SSL code as default part of libSming. But this will increase the size of the irom segment with 33K or more (33K + size of private key + cert.). \r\n\r\nWhich IMHO means that we should have two separate libSming compilations, unless someone suggests a better solution.\r\n\r\nMore on this below.\r\n\r\nIf SSL is enabled by default (in full_mode - meaning with client AND server capabilities) the following will happen.\r\n\r\n# No TcpConnection is used\r\nIn the cases where TcpConnection is not used, directly or as dependency,  the linker will not increase the size of the final application. \r\n\r\nBasic_Blink (no SSL)\r\n```\r\n------------------------------------------------------------------------------\r\n\r\nout/build/app.out:     file format elf32-xtensa-le\r\n\r\nSections:\r\nIdx Name          Size      VMA       LMA       File off  Algn\r\n  0 .data         00000375  3ffe8000  3ffe8000  000000e0  2**4\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  1 .rodata       000002c8  3ffe8378  3ffe8378  00000458  2**3\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  2 .bss          00006b88  3ffe8640  3ffe8640  00000720  2**4\r\n                  ALLOC\r\n  3 .irom0.text   0002dbb4  40209000  40209000  00005eb0  2**4\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n  4 .text         0000578f  40100000  40100000  00000720  2**2\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n------------------------------------------------------------------------------\r\n```\r\n\r\nvs Basic_Blink (with SSL)\r\n```\r\n------------------------------------------------------------------------------\r\n\r\nout/build/app.out:     file format elf32-xtensa-le\r\n\r\nSections:\r\nIdx Name          Size      VMA       LMA       File off  Algn\r\n  0 .data         00000375  3ffe8000  3ffe8000  000000e0  2**4\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  1 .rodata       000002c8  3ffe8378  3ffe8378  00000458  2**3\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  2 .bss          00006b88  3ffe8640  3ffe8640  00000720  2**4\r\n                  ALLOC\r\n  3 .irom0.text   0002dbb4  40209000  40209000  00005eb0  2**4\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n  4 .text         0000578f  40100000  40100000  00000720  2**2\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n------------------------------------------------------------------------------\r\n\r\n```\r\n\r\n# SSL is used\r\nIn the cases where SSL is used the irom0.text segment will increase with roughly `33 K`.  \r\n\r\nMqtt_Hello (no SSL)\r\n```\r\n#Memory / Section info:\r\n------------------------------------------------------------------------------\r\n\r\nout/build/app.out:     file format elf32-xtensa-le\r\n\r\nSections:\r\nIdx Name          Size      VMA       LMA       File off  Algn\r\n  0 .data         00000374  3ffe8000  3ffe8000  000000e0  2**4\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  1 .rodata       00001458  3ffe8378  3ffe8378  00000458  2**3\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  2 .bss          00006da0  3ffe97d0  3ffe97d0  000018b0  2**4\r\n                  ALLOC\r\n  3 .irom0.text   00031c9a  40209000  40209000  00007310  2**4\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n  4 .text         00005a5b  40100000  40100000  000018b0  2**2\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n------------------------------------------------------------------------------\r\n```\r\n\r\nvs Mqtt_Hello (with SSL)\r\n\r\n```\r\n#Memory / Section info:\r\n------------------------------------------------------------------------------\r\n\r\nout/build/app.out:     file format elf32-xtensa-le\r\n\r\nSections:\r\nIdx Name          Size      VMA       LMA       File off  Algn\r\n  0 .data         00000378  3ffe8000  3ffe8000  000000e0  2**4\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  1 .rodata       000028f0  3ffe8380  3ffe8380  00000460  2**4\r\n                  CONTENTS, ALLOC, LOAD, DATA\r\n  2 .bss          00006ed8  3ffeac70  3ffeac70  00002d50  2**4\r\n                  ALLOC\r\n  3 .irom0.text   00039e06  40209000  40209000  00008890  2**4\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n  4 .text         00005b33  40100000  40100000  00002d50  2**2\r\n                  CONTENTS, ALLOC, LOAD, READONLY, CODE\r\n------------------------------------------------------------------------------\r\n```\r\n\r\nIn the cases where SSL is used in server mode the size will increase as in client mode + the size of the private key and certificate. "}}