diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-19 16:32:38 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-19 16:32:38 +0100 |
commit | 432f1ae2ff184e07fa78bd3797073094069e521d (patch) | |
tree | 390ac831d959105cf07ba8bb71edcab9d1d0a865 | |
parent | 6b1b004845ebec194c4d4868d3deb57f22711b19 (diff) | |
download | busybox-w32-432f1ae2ff184e07fa78bd3797073094069e521d.tar.gz busybox-w32-432f1ae2ff184e07fa78bd3797073094069e521d.tar.bz2 busybox-w32-432f1ae2ff184e07fa78bd3797073094069e521d.zip |
tls: tested PSTM_X86_64, not enabling it - too large
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/tls.c | 4 | ||||
-rw-r--r-- | networking/tls.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/networking/tls.c b/networking/tls.c index f3d0bde90..092735884 100644 --- a/networking/tls.c +++ b/networking/tls.c | |||
@@ -582,7 +582,7 @@ static void xwrite_and_hash(tls_state_t *tls, /*const*/ void *buf, unsigned size | |||
582 | tls_get_random(tls->outbuf, AES_BLOCKSIZE); /* IV */ | 582 | tls_get_random(tls->outbuf, AES_BLOCKSIZE); /* IV */ |
583 | p = tls->outbuf + AES_BLOCKSIZE; | 583 | p = tls->outbuf + AES_BLOCKSIZE; |
584 | size -= sizeof(*xhdr); | 584 | size -= sizeof(*xhdr); |
585 | dbg("before crypt: 5 hdr + %u data + %u hash bytes\n", size, sizeof(mac_hash)); | 585 | dbg("before crypt: 5 hdr + %u data + %u hash bytes\n", size, (int)sizeof(mac_hash)); |
586 | p = mempcpy(p, buf + sizeof(*xhdr), size); /* content */ | 586 | p = mempcpy(p, buf + sizeof(*xhdr), size); /* content */ |
587 | p = mempcpy(p, mac_hash, sizeof(mac_hash)); /* MAC */ | 587 | p = mempcpy(p, mac_hash, sizeof(mac_hash)); /* MAC */ |
588 | size += sizeof(mac_hash); | 588 | size += sizeof(mac_hash); |
@@ -625,7 +625,7 @@ static void xwrite_and_hash(tls_state_t *tls, /*const*/ void *buf, unsigned size | |||
625 | xhdr->len16_lo = size & 0xff; | 625 | xhdr->len16_lo = size & 0xff; |
626 | xwrite(tls->fd, xhdr, sizeof(*xhdr)); | 626 | xwrite(tls->fd, xhdr, sizeof(*xhdr)); |
627 | xwrite(tls->fd, tls->outbuf, size); | 627 | xwrite(tls->fd, tls->outbuf, size); |
628 | dbg("wrote %u bytes\n", sizeof(*xhdr) + size); | 628 | dbg("wrote %u bytes\n", (int)sizeof(*xhdr) + size); |
629 | //restore xhdr->len16_hi = ; | 629 | //restore xhdr->len16_hi = ; |
630 | //restore xhdr->len16_lo = ; | 630 | //restore xhdr->len16_lo = ; |
631 | } | 631 | } |
diff --git a/networking/tls.h b/networking/tls.h index 5e6b346e2..d487f3810 100644 --- a/networking/tls.h +++ b/networking/tls.h | |||
@@ -27,11 +27,13 @@ | |||
27 | /* pstm: multiprecision numbers */ | 27 | /* pstm: multiprecision numbers */ |
28 | #undef DISABLE_PSTM | 28 | #undef DISABLE_PSTM |
29 | #if defined(__GNUC__) && defined(__i386__) | 29 | #if defined(__GNUC__) && defined(__i386__) |
30 | /* PSTM_X86 works correctly. +25 bytes. */ | ||
30 | # define PSTM_32BIT | 31 | # define PSTM_32BIT |
31 | # define PSTM_X86 | 32 | # define PSTM_X86 |
32 | #endif | 33 | #endif |
33 | //test this before enabling: | ||
34 | //#if defined(__GNUC__) && defined(__x86_64__) | 34 | //#if defined(__GNUC__) && defined(__x86_64__) |
35 | // /* PSTM_X86_64 works correctly, but +782 bytes. */ | ||
36 | // /* Looks like most of the growth is because of PSTM_64BIT. */ | ||
35 | //# define PSTM_64BIT | 37 | //# define PSTM_64BIT |
36 | //# define PSTM_X86_64 | 38 | //# define PSTM_X86_64 |
37 | //#endif | 39 | //#endif |