]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commit
ctype: use non-locale-specific ctype.h
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 4 Aug 2020 12:49:21 +0000 (14:49 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 6 Aug 2020 15:47:14 +0000 (17:47 +0200)
commit13fac76a71f25631d7415ba457bdab267d0950d4
tree76914bbdca93094302783c211f539ff5c6c1bdd0
parentcf2bf0952498059c6a8987bb54b58987748af7e2
ctype: use non-locale-specific ctype.h

We also make these constant time, even though we're never distinguishing
between bits of a secret using them. From that perspective, though, this
is markedly better than the locale-specific table lookups in glibc, even
though base64 characters span two cache lines and valid private keys
must hit both.

Co-authored-by: Samuel Neves <sneves@dei.uc.pt>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
src/config.c
src/ctype.h [new file with mode: 0644]
src/ipc-uapi.h
src/pubkey.c
src/terminal.c