Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Nov 4, 2025

With GnuTLS 3.8.0+ the build-time SRP feature detection always succeeds.
It's also disabled by default in these GnuTLS versions.

When using TLS-SRP without it being available in GnuTLS, report
the correct error code CURLE_NOT_BUILT_IN, replacing the out of memory
error reported before this patch.

Also add comments to autotools and cmake scripts about this feature
detection property.

Detecting it at build-time would need to run code which doesn't work
in cross-builds. Once curl requires 3.8.0 as minimum, the build-time
checks can be deleted.

# before:
curl: (27) gnutls_srp_allocate_client_cred() failed: An unimplemented or disabled feature has been requested.
# after:
curl: (4) GnuTLS: TLS-SRP support not built in: An unimplemented or disabled feature has been requested.

Ref: gnutls/gnutls@dab063f
Ref: gnutls/gnutls@a21e89e

In these GnuTLS version the symbol-based TLS-SRP detection always
succeeds.

Ref: gnutls/gnutls@dab063f
 ```
 # before:
 curl: (27) gnutls_srp_allocate_client_cred() failed: An unimplemented or disabled feature has been requested.

 # after:
 curl: (4) GnuTLS: TLS-SRP support not built in: An unimplemented or disabled feature has been requested.
 ```
@vszakats vszakats added the TLS label Nov 4, 2025
@vszakats vszakats changed the title gnutls: report correct error when TLS-SRP is not built-in gnutls: report accurate error when TLS-SRP is not built-in Nov 5, 2025
@vszakats vszakats closed this in 8e61495 Nov 6, 2025
@vszakats vszakats deleted the gnutlssrpdet branch November 6, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant