Use fake header protection mask

This commit is contained in:
Mark Spanbroek 2020-09-15 13:16:33 +02:00 committed by markspanbroek
parent cd8b40a47a
commit aae030c634
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import ngtcp2 import ngtcp2
proc dummyHpMask*(dest: ptr uint8, hp: ptr ngtcp2_crypto_cipher, hpContext: ptr ngtcp2_crypto_cipher_ctx, sample: ptr uint8): cint {.cdecl.} = proc dummyHpMask*(dest: ptr uint8, hp: ptr ngtcp2_crypto_cipher, hpContext: ptr ngtcp2_crypto_cipher_ctx, sample: ptr uint8): cint {.cdecl.} =
# memcpy(dest, NGTCP2_FAKE_HP_MASK, sizeof(NGTCP2_FAKE_HP_MASK) - 1);
echo "HP MASK" echo "HP MASK"
var NGTCP2_FAKE_HP_MASK = "\x00\x00\x00\x00\x00"
copyMem(dest, addr NGTCP2_FAKE_HP_MASK[0], NGTCP2_FAKE_HP_MASK.len)