downstream已支持session ticket。

This commit is contained in:
zhengchao
2018-10-05 21:34:57 +08:00
parent d7bf70b4b0
commit 7ac76efac2
3 changed files with 128 additions and 44 deletions

View File

@@ -100,7 +100,7 @@ char* tfe_strdup(const char* s);
#include <stdio.h>
static inline void tfe_hexdump(FILE *f, const char * title, const void * buf, unsigned int len)
static inline void tfe_hexdump2file(FILE *f, const char * title, const void * buf, unsigned int len)
{
unsigned int i, out, ofs;
const unsigned char *data = (const unsigned char *)buf;
@@ -129,3 +129,15 @@ static inline void tfe_hexdump(FILE *f, const char * title, const void * buf, un
#undef LINE_LEN
}
static inline unsigned char* tfe_hexdump(unsigned char *dst, unsigned char *src, size_t len)
{
static unsigned char hex[] = "0123456789abcdef";
while (len--) {
*dst++ = hex[*src >> 4];
*dst++ = hex[*src++ & 0xf];
}
return dst;
}