diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-04-05 23:56:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-04-05 23:56:21 -0400 |
commit | d5b3679392f90b8c6b533c32daceeaadc58b0dc9 (patch) | |
tree | b51645bd0d1b814acdee6563f37489fd534f59d9 /src | |
parent | 20d39e86afa37c2a7008c48f97c3ffd298441808 (diff) | |
parent | f6ffe532ab6fb72f120258d27069e8e68959f9b3 (diff) | |
download | tor-d5b3679392f90b8c6b533c32daceeaadc58b0dc9.tar.gz tor-d5b3679392f90b8c6b533c32daceeaadc58b0dc9.zip |
Merge branch 'maint-0.2.8'
Diffstat (limited to 'src')
-rw-r--r-- | src/ext/readpassphrase.c | 2 | ||||
-rw-r--r-- | src/ext/tor_readpassphrase.h | 2 | ||||
-rw-r--r-- | src/test/test_util.c | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/ext/readpassphrase.c b/src/ext/readpassphrase.c index ab71935859..e0df05d7b7 100644 --- a/src/ext/readpassphrase.c +++ b/src/ext/readpassphrase.c @@ -142,6 +142,7 @@ restart: p = buf; while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') { if (p < end) { +#if 0 if ((flags & RPP_SEVENBIT)) ch &= 0x7f; if (isalpha(ch)) { @@ -150,6 +151,7 @@ restart: if ((flags & RPP_FORCEUPPER)) ch = (char)toupper(ch); } +#endif *p++ = ch; } } diff --git a/src/ext/tor_readpassphrase.h b/src/ext/tor_readpassphrase.h index 83ae1f20a8..64f5668cad 100644 --- a/src/ext/tor_readpassphrase.h +++ b/src/ext/tor_readpassphrase.h @@ -32,9 +32,11 @@ #define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */ #define RPP_ECHO_ON 0x01 /* Leave echo on. */ #define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */ +#if 0 #define RPP_FORCELOWER 0x04 /* Force input to lower case. */ #define RPP_FORCEUPPER 0x08 /* Force input to upper case. */ #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ +#endif #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ char * readpassphrase(const char *, char *, size_t, int); diff --git a/src/test/test_util.c b/src/test/test_util.c index 7d43b8156b..21ff75741a 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -2297,7 +2297,8 @@ test_util_sscanf(void *arg) } #define tt_char_op(a,op,b) tt_assert_op_type(a,op,b,char,"%c") -#define tt_ci_char_op(a,op,b) tt_char_op(tolower(a),op,tolower(b)) +#define tt_ci_char_op(a,op,b) \ + tt_char_op(TOR_TOLOWER((int)a),op,TOR_TOLOWER((int)b)) #ifndef HAVE_STRNLEN static size_t |