mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-25 12:04:47 +00:00
Add wolfSSL support
- Added Makefile wolfSSL build option with `SSL=WOLFSSL` - Fixed missing BIO symbol errors - Rename `fe` to `mg_fe` as it collides with `fe` defined in `wolfssl/wolfcrypt/fe_operations.h` - byte variable name shadows the wolfSSL byte type Tested with `make test` Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
This commit is contained in:
1 parent
323ba9d90c
commit
dc09851ac8
6 files changed
+64
-48
No files matched your search
+3
-3
@@ -63,9 +63,9 @@ uint32_t mg_crc32(uint32_t crc, const char *buf, size_t len) {
|
||||
0x9B64C2B0, 0x86D3D2D4, 0xA00AE278, 0xBDBDF21C};
|
||||
crc = ~crc;
|
||||
while (len--) {
|
||||
uint8_t byte = *(uint8_t *) buf++;
|
||||
crc = crclut[(crc ^ byte) & 0x0F] ^ (crc >> 4);
|
||||
crc = crclut[(crc ^ (byte >> 4)) & 0x0F] ^ (crc >> 4);
|
||||
uint8_t b = *(uint8_t *) buf++;
|
||||
crc = crclut[(crc ^ b) & 0x0F] ^ (crc >> 4);
|
||||
crc = crclut[(crc ^ (b >> 4)) & 0x0F] ^ (crc >> 4);
|
||||
}
|
||||
return ~crc;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user