#20588 closed defect (fixed)

Compiler breakage when strange CPU meets new OpenSSL

Reported by: nickm Owned by:
Priority: High Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 028-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If you manage to get yourself a system where we don't define USE_EVP_AES_CTR (eg, ARM + Sid), and we have a very recent (1.1?) OpenSSL, you get these errors:

src/common/aes.c:147:20: error: field ‘evp’ has incomplete type
     EVP_CIPHER_CTX evp;
                    ^~~
src/common/aes.c: In function ‘evaluate_ctr_for_aes’:
src/common/aes.c:243:5: error: implicit declaration of function ‘AES_ctr128_encrypt’ [-Werror=implicit-function-declaration]
     AES_ctr128_encrypt(&zero[i], &output[i], 1, &key, ivec, ivec_tmp, &pos);
     ^~~~~~~~~~~~~~~~~~
src/common/aes.c:243:5: error: nested extern declaration of ‘AES_ctr128_encrypt’ [-Werror=nested-externs]
  CC       src/common/crypto_s2k.o
cc1: all warnings being treated as errors

Child Tickets

Change History (6)

comment:1 Changed 23 months ago by nickm

Status: newneeds_review

My branch bug20588 has my candidate fix here. Please sanity-check?

comment:2 Changed 23 months ago by yawning

Status: needs_reviewmerge_ready

LGTM. In the 0.3.0 timeframe we should move the check for the broken counter mode to a unit test since we no longer support OpenSSL versions where it's relevant, but that can wait.

comment:3 Changed 23 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Thanks; merged!

comment:4 Changed 22 months ago by yawning

Keywords: 028-backport added
Resolution: implemented
Status: closedreopened

This came up again as #20868 because we didn't backport it.

comment:5 Changed 22 months ago by nickm

cherry-picked to 0.2.8.

comment:6 Changed 22 months ago by nickm

Milestone: Tor: 0.2.9.x-finalTor: 0.2.8.x-final
Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.