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
F150571751: D49516.diff
Thu, Apr 2, 11:43 AM
Unknown Object (File)
Fri, Mar 27, 4:50 AM
Unknown Object (File)
Thu, Mar 26, 4:26 PM
Unknown Object (File)
Thu, Mar 26, 11:36 AM
Unknown Object (File)
Tue, Mar 24, 11:12 PM
Unknown Object (File)
Feb 28 2026, 12:32 AM
Unknown Object (File)
Feb 27 2026, 3:09 AM
Unknown Object (File)
Feb 22 2026, 10:12 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.