tls_get_random(tls->outbuf, AES_BLOCKSIZE); /* IV */
p = tls->outbuf + AES_BLOCKSIZE;
size -= sizeof(*xhdr);
- dbg("before crypt: 5 hdr + %u data + %u hash bytes\n", size, sizeof(mac_hash));
+ dbg("before crypt: 5 hdr + %u data + %u hash bytes\n", size, (int)sizeof(mac_hash));
p = mempcpy(p, buf + sizeof(*xhdr), size); /* content */
p = mempcpy(p, mac_hash, sizeof(mac_hash)); /* MAC */
size += sizeof(mac_hash);
xhdr->len16_lo = size & 0xff;
xwrite(tls->fd, xhdr, sizeof(*xhdr));
xwrite(tls->fd, tls->outbuf, size);
- dbg("wrote %u bytes\n", sizeof(*xhdr) + size);
+ dbg("wrote %u bytes\n", (int)sizeof(*xhdr) + size);
//restore xhdr->len16_hi = ;
//restore xhdr->len16_lo = ;
}
/* pstm: multiprecision numbers */
#undef DISABLE_PSTM
#if defined(__GNUC__) && defined(__i386__)
+ /* PSTM_X86 works correctly. +25 bytes. */
# define PSTM_32BIT
# define PSTM_X86
#endif
-//test this before enabling:
//#if defined(__GNUC__) && defined(__x86_64__)
+// /* PSTM_X86_64 works correctly, but +782 bytes. */
+// /* Looks like most of the growth is because of PSTM_64BIT. */
//# define PSTM_64BIT
//# define PSTM_X86_64
//#endif