Skip to content

Enabling the use of EC keys when doing TLS with mbedTLS backend. - #3892

Closed
DeuxVis wants to merge 1 commit into
curl:masterfrom
DeuxVis:master
Closed

Enabling the use of EC keys when doing TLS with mbedTLS backend.#3892
DeuxVis wants to merge 1 commit into
curl:masterfrom
DeuxVis:master

Conversation

@DeuxVis

@DeuxVis DeuxVis commented May 16, 2019

Copy link
Copy Markdown

No description provided.

@bagder bagder added the TLS label May 16, 2019
Comment thread lib/vtls/mbedtls.c
SSL_SET_OPTION(key_passwd));
if(ret == 0 && !mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_RSA))
if(ret == 0 && !( mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_RSA)
|| mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_ECKEY)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this MBEDTLS_PK_ECKEY flag supported on all mbedtls versions or is there a risk that this will break the build for some?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A quick skim of the code seems to imply that usage of MBEDTLS_PK_ECKEY depends on MBEDTLS_ECP_C.

@DeuxVis DeuxVis May 20, 2019

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is this MBEDTLS_PK_ECKEY flag supported on all mbedtls versions or is there a risk that this will break the build for some?

If you mean historically, I think it dates back from the polarssl days : Mbed-TLS/mbedtls@211a64c

So it probably have been available in all mbedtls versions.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes confirmed, It then have been renamed to the actual name - without polarssl reference - in mbedtls release 2.0 : https://github.com/ARMmbed/mbedtls/blob/4cb87f409df0ddd878ea50cfca7dc8735ee574f2/include/mbedtls/pk.h#L74

@bagder

bagder commented May 20, 2019

Copy link
Copy Markdown
Member

Thanks!

@bagder bagder closed this in 0da8441 May 20, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

4 participants