Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mbedtls 2.19.1 fails to build from source with MBEDTLS_ZLIB_SUPPORT #2859

Closed
jack-fortanix opened this issue Sep 23, 2019 · 2 comments · Fixed by #2963
Closed

Mbedtls 2.19.1 fails to build from source with MBEDTLS_ZLIB_SUPPORT #2859

jack-fortanix opened this issue Sep 23, 2019 · 2 comments · Fixed by #2963
Labels

Comments

@jack-fortanix
Copy link
Contributor

Description

  • Type: Bug

Bug

OS : any

mbed TLS build: 2.19.1
Configuration: MBEDTLS_ZLIB_SUPPORT
Compiler and options: gcc/any

Steps to reproduce
Uncomment MBEDTLS_ZLIB_SUPPORT from the default config.h and attempt to build:

[ 19%] Building C object library/CMakeFiles/mbedtls.dir/ssl_tls.c.o
/home/jack/sw/mbedtls/library/ssl_tls.c: In function ‘mbedtls_ssl_derive_keys’:
/home/jack/sw/mbedtls/library/ssl_tls.c:1862:9: error: ‘session’ undeclared (first use in this function); did you mean ‘setsid’?
     if( session->compression == MBEDTLS_SSL_COMPRESS_DEFLATE &&
         ^~~~~~~
         setsid

Looks to have been introduced between 2.18.0 and 2.19.0 though I could not find the exact commit. I believe this should now be ssl->session_negotiate->compression

@RonEld
Copy link
Contributor

RonEld commented Sep 24, 2019

Hi @jack-fortanix Thank you for your input!
As you can see from the ChangeLog ZLIB support has been deprecated. So you should have received a build error, but it should have been a deprecation error, and probably not this error.

I would actually rename this bug to: "Deprecated ferature MBEDTLS_ZLIB_SUPPORT still used in some locations", or something better in grammar

@RonEld RonEld added the bug label Sep 24, 2019
@gilles-peskine-arm
Copy link
Contributor

@RonEld I don't think that's the issue: MBEDTLS_ZLIB_SUPPORT is deprecated, but the feature is still supported for now, so if you enable it, it should work.

We have a test gap: we never test MBEDTLS_ZLIB_SUPPORT in all.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants