Opened 3 years ago

Closed 3 years ago

#21796 closed defect (fixed)

missing evutil_secure_rng_add_bytes()

Reported by: cypherpunks Owned by:
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 030-backport 029-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

CC src/common/compat_libevent.o

src/common/compat_libevent.c:234:3: error: implicit declaration of function

'evutil_secure_rng_add_bytes' is invalid in C99
[-Werror,-Wimplicit-function-declaration]

evutil_secure_rng_add_bytes(buf, 32);

src/common/compat_libevent.c:234:3: note: did you mean

'evutil_secure_rng_get_bytes'?

/tmp/include/event2/util.h:808:6: note: 'evutil_secure_rng_get_bytes' declared

here

void evutil_secure_rng_get_bytes(void *buf, size_t n);


src/common/compat_libevent.c:234:3: error: this function declaration is not a

prototype [-Werror,-Wstrict-prototypes]

evutil_secure_rng_add_bytes(buf, 32);

2 errors generated.
Makefile:4834: recipe for target 'src/common/compat_libevent.o' failed

as of libevent git commit 6541168d7037457b8e5c51cc354f11bd94e618b6, the function evutil_secure_rng_add_bytes() is only exposed for platforms with arc4random_addrandom().

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by nickm_mobile

Keywords: 030-backport added
Milestone: Tor: 0.3.1.x-final

comment:2 Changed 3 years ago by nickm_mobile

Keywords: 029-backport added

comment:3 Changed 3 years ago by nickm_mobile

Could you also file a bug against Libevent? They shouldn't be breaking backward compatibility like this.

comment:4 Changed 3 years ago by nickm

Any progress here? Is libevent going to restore the API?

comment:5 Changed 3 years ago by cypherpunks

Resolution: fixed
Status: newclosed

fixed in libevent commit 266f43af7798befa3d27bfabaa9ae699259c3924

Note: See TracTickets for help on using tickets.