Opened 4 weeks ago

Closed 4 weeks ago

#26156 closed defect (fixed)

Undefined references to EVP_CIPHER_CTX_cleanup() with OpenSSL 1.1.0 no-deprecated

Reported by: laomaiweng Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version: Tor: 0.3.4.1-alpha
Severity: Normal Keywords: openssl tor-crypto
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor: SponsorZ

Description

On my machine with OpenSSL 1.1.0 `no-deprecated', Tor 0.3.4.1-alpha fails to build. The failure happens when linking several utilities, with the following error:

src/common/libor-crypto.a(aes.o): In function `aes_cipher_free_':
/home/quentin/Security/Code/Tor/tor/src/common/aes.c:121: undefined reference to `EVP_CIPHER_CTX_cleanup'

This appears to be due to src/common/aes.c not #include-ing "compat_openssl.h", and thus not having the OPENSSL_1_1_API #define. Simply adding #include "compat_openssl.h" in aes.c fixes the build.
I have also checked that building still succeeds against OpenSSL 1.0.1 and 1.0.2 with this modification.

Child Tickets

Change History (9)

comment:1 Changed 4 weeks ago by laomaiweng

By the way thanks for all the work on OpenSSL 1.1 support in #19429. :)

comment:2 Changed 4 weeks ago by asn

Keywords: tor-crypto added
Milestone: Tor: 0.3.4.x-final

comment:3 Changed 4 weeks ago by nickm

Owner: set to nickm
Status: newaccepted

comment:4 Changed 4 weeks ago by nickm

Status: acceptedneeds_review

I've tried the approach you suggest in my branch bug26156_034; pull request at https://github.com/torproject/tor/pull/120

comment:5 Changed 4 weeks ago by laomaiweng

Works fine for me both with OpenSSL 1.1.0 and 1.0.1.

comment:6 Changed 4 weeks ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Okay -- merged to master!

comment:7 Changed 4 weeks ago by hitman47

Resolution: fixed
Sponsor: SponsorZ
Status: closedreopened

comment:8 Changed 4 weeks ago by nickm

Why did you reopen this ticket? Is there a remaining bug here?

comment:9 Changed 4 weeks ago by nickm

Resolution: fixed
Status: reopenedclosed

Please feel free to reopen this ticket if there is a remaining problem here, but if you do, please explain what the problem is.

Note: See TracTickets for help on using tickets.