1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

* axhttpd can load a certificate and private key from the command line

* axssl now prints all output regardless of null bytes. It no longer writes a null byte.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@242 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich
2014-11-22 02:05:21 +00:00
parent b3fc32689d
commit b9d43265b5
4 changed files with 74 additions and 22 deletions

View File

@ -382,7 +382,12 @@ static void do_server(int argc, char *argv[])
if (res > SSL_OK) /* display our interesting output */
{
printf("%s", read_buf);
int written = 0;
while (written < res)
{
written += write(STDOUT_FILENO, read_buf+written,
res-written);
}
TTY_FLUSH();
}
else if (res == SSL_CLOSE_NOTIFY)
@ -711,7 +716,7 @@ static void do_client(int argc, char *argv[])
}
else
{
res = ssl_write(ssl, buf, strlen((char *)buf)+1);
res = ssl_write(ssl, buf, strlen((char *)buf));
}
}
}
@ -724,7 +729,12 @@ static void do_client(int argc, char *argv[])
if (res > 0) /* display our interesting output */
{
printf("%s", read_buf);
int written = 0;
while (written < res)
{
written += write(STDOUT_FILENO, read_buf+written,
res-written);
}
TTY_FLUSH();
}
}