Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to compile gen_key.c #2170

Closed
ghost opened this issue Nov 4, 2018 · 3 comments
Closed

failed to compile gen_key.c #2170

ghost opened this issue Nov 4, 2018 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Nov 4, 2018

Description

  • Type: Bug
  • Priority: Minor

Bug

OS
windows

mbed TLS build:
Version: 2.13.1
OS version: 17134.345
Configuration: default config
Compiler: Visual Studio Build Tools v141

Error
error C2664: 'const mbedtls_pk_info_t *mbedtls_pk_info_from_type(mbedtls_pk_type_t)': cannot convert argument 1 from 'int' to 'mbedtls_pk_type_t'
1>d:\gen_key.c(301): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
1>d:\gen_key.c(301): error C2660: 'mbedtls_pk_setup': function does not take 1 arguments
1>d:\mbedtls\mbedtls\pk.h(207): note: see declaration of 'mbedtls_pk_setup'
1>d:\gen_key.c(318): error C2664: 'int mbedtls_ecp_gen_key(mbedtls_ecp_group_id,mbedtls_ecp_keypair *,int (__cdecl *)(void *,unsigned char *,size_t),void *)': cannot convert argument 1 from 'int' to 'mbedtls_ecp_group_id'
1>d:\gen_key.cp319): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)

@hanno-becker
Copy link

Hi @phoenixmcallister,

thank you for your report! I agree that an explicit cast should be added to programs/pkey/gen_key.c on the two occasions you pointed out. We'll fix that.

Kind regards,
Hanno

@hanno-becker
Copy link

Opened #2175 to address this.

@ciarmcom
Copy link

ciarmcom commented Nov 5, 2018

ARM Internal Ref: IOTSSL-2617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants