Skip to content

gtls: minor fixes and improvements#21850

Closed
vszakats wants to merge 5 commits into
curl:masterfrom
vszakats:gtlsfixes
Closed

gtls: minor fixes and improvements#21850
vszakats wants to merge 5 commits into
curl:masterfrom
vszakats:gtlsfixes

Conversation

@vszakats

@vszakats vszakats commented Jun 2, 2026

Copy link
Copy Markdown
Member
  • fix GnuTLS function name reference in Curl_gtls_shared_creds_create()
    error message.
    Spotted by GitHub Code Quality.
  • unfold a line.
  • in Curl_gtls_verifyserver():
    • report the failure of gnutls_x509_crt_import().
      Spotted by GitHub Code Quality.
    • fix a minor inconsistency in error strings.
    • drop redundant NULL checks for config->issuercert.

@vszakats vszakats added the TLS label Jun 2, 2026
@vszakats vszakats changed the title gtls: minor fixes gtls: minor fixes and improvements Jun 2, 2026
@vszakats vszakats requested a review from Copilot June 2, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the GnuTLS TLS backend error reporting and log message consistency, primarily around shared credentials creation and server certificate issuer verification.

Changes:

  • Fix incorrect GnuTLS function name referenced in Curl_gtls_shared_creds_create() failure message.
  • Simplify formatting in gtls_verify_ocsp_status() by unfolding a wrapped gnutls_credentials_get() call.
  • Improve issuer-certificate handling in Curl_gtls_verifyserver() by reporting gnutls_x509_crt_import() failures and including GnuTLS error strings on issuer-check failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/vtls/gtls.c Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@vszakats vszakats closed this in 2932b7f Jun 2, 2026
@vszakats vszakats deleted the gtlsfixes branch June 2, 2026 20:00
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
- fix GnuTLS function name reference in `Curl_gtls_shared_creds_create()`
  error message.
  Spotted by GitHub Code Quality.
- unfold a line.
- in `Curl_gtls_verifyserver()`:
  - report the failure of `gnutls_x509_crt_import()`.
    Spotted by GitHub Code Quality.
  - fix a minor inconsistency in error strings.
  - drop redundant NULL checks for `config->issuercert`.

Closes curl#21850
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.

2 participants