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:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user