gnutls: fix building with older supported GnuTLS versions#18335
Closed
vszakats wants to merge 10 commits into
Closed
gnutls: fix building with older supported GnuTLS versions#18335vszakats wants to merge 10 commits into
vszakats wants to merge 10 commits into
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
The failing test is |
Contributor
|
we could add something like if env.curl_uses_lib('gnutls') and \
not env.curl_lib_version_at_least('gnutls', '3.6.0'):
pytest.skip('gnutls does not support early data before 3.6.0')replace 3.6.0 with whatever version this has. |
Member
Author
|
Added that to pytest, though a bit differently. Also found the wrong guard causing the CI fail. |
vszakats
marked this pull request as ready for review
August 21, 2025 13:48
This comment was marked as resolved.
This comment was marked as resolved.
```
/__w/curl/curl/lib/vtls/gtls.c: In function 'Curl_gtls_cache_session':
/__w/curl/curl/lib/vtls/gtls.c:693:19: error: implicit declaration of function 'gnutls_record_get_max_early_data_size' [-Wimplicit-function-declaration]
earlydata_max = gnutls_record_get_max_early_data_size(session);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c:693:3: error: nested extern declaration of 'gnutls_record_get_max_early_data_size' [-Werror=nested-externs]
earlydata_max = gnutls_record_get_max_early_data_size(session);
^~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c: In function 'Curl_glts_get_ietf_proto':
/__w/curl/curl/lib/vtls/gtls.c:730:8: error: 'GNUTLS_TLS1_3' undeclared (first use in this function)
case GNUTLS_TLS1_3:
^~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c:730:8: note: each undeclared identifier is reported only once for each function it appears in
/__w/curl/curl/lib/vtls/gtls.c: In function 'gtls_client_init':
/__w/curl/curl/lib/vtls/gtls.c:887:19: error: 'GNUTLS_ENABLE_EARLY_DATA' undeclared (first use in this function)
init_flags |= GNUTLS_ENABLE_EARLY_DATA | GNUTLS_NO_END_OF_EARLY_DATA;
^~~~~~~~~~~~~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c:887:46: error: 'GNUTLS_NO_END_OF_EARLY_DATA' undeclared (first use in this function)
init_flags |= GNUTLS_ENABLE_EARLY_DATA | GNUTLS_NO_END_OF_EARLY_DATA;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c: In function 'Curl_gtls_ctx_init':
/__w/curl/curl/lib/vtls/gtls.c:1164:5: error: implicit declaration of function 'gnutls_session_set_keylog_function' [-Wimplicit-function-declaration]
gnutls_session_set_keylog_function(gctx->session, keylog_callback);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c:1164:5: error: nested extern declaration of 'gnutls_session_set_keylog_function' [-Werror=nested-externs]
/__w/curl/curl/lib/vtls/gtls.c: In function 'gtls_verifyserver':
/__w/curl/curl/lib/vtls/gtls.c:1798:45: error: 'GNUTLS_TLS1_3' undeclared (first use in this function)
if(gnutls_protocol_get_version(session) < GNUTLS_TLS1_3)
^~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c: In function 'gtls_send_earlydata':
/__w/curl/curl/lib/vtls/gtls.c:1819:9: error: implicit declaration of function 'gnutls_record_send_early_data' [-Wimplicit-function-declaration]
n = gnutls_record_send_early_data(backend->gtls.session, buf, blen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/__w/curl/curl/lib/vtls/gtls.c:1819:5: error: nested extern declaration of 'gnutls_record_send_early_data' [-Werror=nested-externs]
n = gnutls_record_send_early_data(backend->gtls.session, buf, blen);
^
/__w/curl/curl/lib/vtls/gtls.c: In function 'gtls_connect_common':
/__w/curl/curl/lib/vtls/gtls.c:1926:10: error: 'GNUTLS_SFLAGS_EARLY_DATA' undeclared (first use in this function)
GNUTLS_SFLAGS_EARLY_DATA) ?
^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also:
Ref: https://gitlab.com/gnutls/gnutls/blob/master/NEWS
Follow-up to fa0ccd9 #15774
Follow-up to 68bd759 #15667
Cherry-picked from #18330
w/o sp https://github.com/curl/curl/pull/18335/files?w=1