Skip to content

Replace the the private field acces of mbedtls_rsa_context with APIs #5014

@gabor-mezei-arm

Description

@gabor-mezei-arm

As part of #4683, the review of programs for MBEDTLS_PRIVATE field usage concluded that are usage of private fields of mbedtls_rsa_context structure. All occurrence of this usage can be avoided by using APIs.

As part of this issue all occurrence of the 'mbedtls_rsa_context' private filed usage must be replaced with the following APIs:

field replacing getter APIs replacing setter APIs
len mbedtls_rsa_get_len
N, P, Q, D, E mbedtls_rsa_export, mbedtls_rsa_export_raw mbedtls_rsa_import, mbedtls_rsa_import_raw
DP, DQ, QP mbedtls_rsa_export_crt

These are the affected files:

  • pkey/dh_client.c
  • pkey/dh_server.c
  • pkey/rsa_decrypt.c
  • pkey/rsa_encrypt.c
  • pkey/rsa_sign.c
  • pkey/rsa_verify.c

Metadata

Metadata

Labels

Type

No type

Projects

Status

[3.6] Mbed TLS PRIVATE

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions