Skip to content

mbedtls: null terminate the private key blob#21515

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/mbedtls-pkey-blob
Closed

mbedtls: null terminate the private key blob#21515
bagder wants to merge 1 commit into
masterfrom
bagder/mbedtls-pkey-blob

Conversation

@bagder

@bagder bagder commented May 6, 2026

Copy link
Copy Markdown
Member

Unfortunately, mbedtls_pk_parse_key() requires the data to be null-terminated if the data is PEM encoded (even when provided the exact length), so this function needs to make a copy that has one.

Reported-by: Elise Vance

Unfortunately, mbedtls_pk_parse_key() requires the data to be
null-terminated if the data is PEM encoded (even when provided the exact
length), so this function needs to make a copy that has one.

Reported-by: Elise Vance
@bagder bagder added the TLS label May 6, 2026
@bagder bagder marked this pull request as ready for review May 6, 2026 22:03
@bagder bagder closed this in 67bf021 May 7, 2026
@bagder bagder deleted the bagder/mbedtls-pkey-blob branch May 7, 2026 05:58
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Unfortunately, mbedtls_pk_parse_key() requires the data to be
null-terminated if the data is PEM encoded (even when provided the exact
length), so this function needs to make a copy that has one.

Reported-by: Elise Vance
Closes curl#21515
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