Skip to content

openssl: require EVP_aes_128_ctr() support - #860

Closed
vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:always-HAVE_EVP_AES_128_CTR
Closed

vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:always-HAVE_EVP_AES_128_CTR

Conversation

@vszakats

@vszakats vszakats commented Mar 19, 2023 •

Copy link
Copy Markdown
Member

libssh2 built with OpenSSL and without its EVP_aes_128_ctr(), aka
HAVE_EVP_AES_128_CTR, option is working incorrectly. This option
wasn't always auto-detected by autotools up until recently (#811).
Non-cmake, non-autotools build methods never enabled it automatically.

OpenSSL supports this options since at least v1.0.2, which is already
EOLed and considered obsolete. OpenSSL forks (LibreSSL, BoringSSL)
supported it all along.

In this patch we enable this option unconditionally, now requiring
an OpenSSL version supporting this function, or one of its forks.

Also modernize OpenSSL lib references to what 1.0.2 and newer versions
have been using.

Fixes #739

@vszakats
vszakats force-pushed the always-HAVE_EVP_AES_128_CTR branch 2 times, most recently from 1bb303e to 480d6f9 Compare March 19, 2023 20:09
@vszakats
vszakats marked this pull request as draft March 19, 2023 20:15
@vszakats vszakats changed the title openssl: require v1.0.2, make HAVE_EVP_AES_128_CTR always enabled openssl: require EVP_aes_128_ctr() support Mar 19, 2023
@vszakats
vszakats force-pushed the always-HAVE_EVP_AES_128_CTR branch from 480d6f9 to fb2600c Compare March 19, 2023 20:30
@vszakats
vszakats marked this pull request as ready for review March 19, 2023 20:30
@vszakats
vszakats force-pushed the always-HAVE_EVP_AES_128_CTR branch from fb2600c to d224493 Compare March 19, 2023 20:45
libssh2 built with OpenSSL and without its `EVP_aes_128_ctr()`, aka
`HAVE_EVP_AES_128_CTR`, option are working incorrectly. This option
wasn't always auto-detected by autotools up until recently (libssh2#811).
Non-cmake, non-autotools build methods never enabled it automatically.
No build method auto-detected or enabled it for wolfSSL either.

OpenSSL supports this options since at least v1.0.2, which is already
EOLed and considered obsolete. OpenSSL forks (LibreSSL, BoringSSL)
supported it all along.

In this patch we enable this option unconditionally, now requiring
OpenSSL supporting this function, or one of its forks, or wolfSSL.

Also modernize OpenSSL lib references to what 1.0.2 and newer versions
have been using.

Fixes libssh2#739
@vszakats
vszakats force-pushed the always-HAVE_EVP_AES_128_CTR branch from d224493 to 00fd5f2 Compare March 19, 2023 22:39
@vszakats vszakats closed this Mar 20, 2023
@vszakats
vszakats deleted the always-HAVE_EVP_AES_128_CTR branch March 20, 2023 09:34
@vszakats

Copy link
Copy Markdown
Member Author

Merged in ec0a51d.

@jeroen

jeroen commented Mar 25, 2023

Copy link
Copy Markdown
Contributor

Thanks so much for addressing this. Would it be possible to tag a release, so that distros can pick up on this fix?

@vszakats

Copy link
Copy Markdown
Member Author

You're welcome! We track the question of when to make a new release here: #790

vszakats added a commit that referenced this pull request Jun 4, 2026
For fewer crypto-namespaced private functions in favor or plain `ssh2_*`
ones, and to reduce macro mappings.

Also:
- move related functions/macros declarations next to each other.
- merge `#if LIBSSH2_ECDSA` blocks.
- guard some constants with `LIBSSH2_ECDSA`.
- drop orphan prototypes.
  Follow-up to 076838d #1961
  Follow-up to ec0a51d #860
- tidy-up bignum (`ssh2_bn_*`) mapping/declaration blocks.
- formatting/whitespace/unfold/fold fixes/sync along the way.

Closes #1971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[libssh 1.10.1_dev] Error "Invalid MAC received" when building without HAVE_EVP_AES_128_CTR

2 participants