Dependents: oldheating gps motorhome heating
Diff: tcp/https/https.c
- Revision:
- 144:6bd5c54efc7d
- Parent:
- 142:a8c0890a58d1
diff -r 8cec8f08dc54 -r 6bd5c54efc7d tcp/https/https.c --- a/tcp/https/https.c Thu May 09 07:47:12 2019 +0000 +++ b/tcp/https/https.c Sun May 12 17:17:49 2019 +0000 @@ -6,7 +6,8 @@ #include "net.h" #include "log.h" #include "led.h" -#include "restart.h" +#include "restart.h" +#include "mstimer.h" #define TLS_CONTENT_TYPE_ChangeCipher 20 #define TLS_CONTENT_TYPE_Alert 21 @@ -29,7 +30,7 @@ #define DO_SERVER_HELLO 100 -static void logHandshakeType(char handshakeType) +/*static void logHandshakeType(char handshakeType) { switch (handshakeType) { @@ -60,12 +61,12 @@ default: LogF("%02hX", contentType); break; } } - +*/ bool HttpsTrace = true; -void HttpsHandleRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, int* pToDo) +void HttpsHandleRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, void* pData) { - + /* if (HttpsTrace) { LogF("HTTPS <<< %d (%u)\r\n", size, positionInRequestStream); @@ -90,13 +91,16 @@ return; } //ECDHE-RSA-AES128-GCM-SHA256 + */ } -static void sendServerHello() +/*static void sendServerHello() { Log(" sending server hello\r\n"); } -void HttpsSendReply(int* pSize, char* pReplyStream, uint32_t positionInReplyStream, uint16_t mss, int todo) +*/ +bool HttpsSendReply(int* pSize, char* pReplyStream, uint32_t positionInReplyStream, uint16_t mss, void* pData) { + /* TcpBufStart(positionInReplyStream, mss, pReplyStream); if (todo == DO_SERVER_HELLO) sendServerHello(); *pSize = TcpBufLength(); @@ -105,4 +109,6 @@ { LogF("HTTPS >>> %d (%d)\r\n", *pSize, positionInReplyStream); } + */ + return TCP_APP_FINISHED; //0: not started; +1: started; -1: finished }