From e90fa623d9c88be109de9cfd69d6939283cd105b Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 30 Dec 2019 17:23:23 +0000 Subject: libtokencap adding timingsafe* string comparators --- libtokencap/libtokencap.so.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libtokencap/libtokencap.so.c') diff --git a/libtokencap/libtokencap.so.c b/libtokencap/libtokencap.so.c index 647b85bc..04825e02 100644 --- a/libtokencap/libtokencap.so.c +++ b/libtokencap/libtokencap.so.c @@ -687,6 +687,20 @@ bool strcsequal(const void* s1, const void* s2) { } +/* bcmp/memcmp BSD flavors, similar to CRYPTO_memcmp */ + +int timingsafe_bcmp(const void* mem1, const void* mem2, size_t len) { + + return bcmp(mem1, mem2, len); + +} + +int timingsafe_memcmp(const void* mem1, const void* mem2, size_t len) { + + return memcmp(mem1, mem2, len); + +} + /* Init code to open the output file (or default to stderr). */ __attribute__((constructor)) void __tokencap_init(void) { -- cgit 1.4.1 From 3f2f232fc562ab1fa2b8fc0686afda83d29fa02a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 1 Jan 2020 10:59:57 +0000 Subject: libtokencap, fix mac os process map lookup. Incrementing base address for next iteration. --- libtokencap/libtokencap.so.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libtokencap/libtokencap.so.c') diff --git a/libtokencap/libtokencap.so.c b/libtokencap/libtokencap.so.c index 04825e02..5abed0f6 100644 --- a/libtokencap/libtokencap.so.c +++ b/libtokencap/libtokencap.so.c @@ -142,6 +142,9 @@ static void __tokencap_load_mappings(void) { } + base += size; + size = 0; + } } -- cgit 1.4.1