Page MenuHomeFreeBSD

openssh: undef EVP_CIPHER_CTX_get_iv prior to defining it
AbandonedPublic

Authored by jlduran on Mar 26 2025, 8:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 9, 1:18 AM
Unknown Object (File)
Wed, Dec 31, 12:37 AM
Unknown Object (File)
Dec 13 2025, 5:02 PM
Unknown Object (File)
Nov 23 2025, 2:39 PM
Unknown Object (File)
Nov 2 2025, 9:31 PM
Unknown Object (File)
Oct 23 2025, 2:30 AM
Unknown Object (File)
Oct 20 2025, 3:30 AM
Unknown Object (File)
Oct 8 2025, 9:14 PM
Subscribers

Details

Reviewers
emaste
kevans
Summary

The script freebsd-namespace.sh does namespace munging, by adding the Fssh_ prefix to every symbol in libssh, to prevent collisions with other libraries that link with it.
Upstream OpenSSH commit:
324449a68 ("support OpenSSL 3.x cipher IV API change")
Defines EVP_CIPHER_CTX_get_iv as EVP_CIPHER_CTX_get_updated_iv (if HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV is set in config.h).

This produces a compilation warning about the macro being redefined:

In file included from /usr/src/crypto/openssh/monitor.c:64:
/usr/src/crypto/openssh/openbsd-compat/openssl-compat.h:69:11: warning: 'EVP_CIPHER_CTX_get_iv' macro redefined [-Wmacro-redefined]
   69 | #  define EVP_CIPHER_CTX_get_iv EVP_CIPHER_CTX_get_updated_iv
      |           ^
/usr/src/crypto/openssh/ssh_namespace.h:12:9: note: previous definition is here
   12 | #define EVP_CIPHER_CTX_get_iv                   Fssh_EVP_CIPHER_CTX_get_iv
      |         ^

Avoid the warning by un-defining it before defining it, as done in ee8c73cd0620 ("Silence warnings about redefined macros."), appending the same comment from crypto/openssh/umac128.c for easy grepping.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63134
Build 60018: arc lint + arc unit

Event Timeline

jlduran retitled this revision from openssh: undef EVP_CIPHER_CTX_get_iv to openssh: undef EVP_CIPHER_CTX_get_iv prior to defining it.Apr 12 2025, 6:39 PM
jlduran edited the summary of this revision. (Show Details)

Abandoned. Work will continue on D51810.