Skip to content

Remove / minimize usage of pk_internal.h #10527

@mpg

Description

@mpg

Currently x509_internal.h includes pk_internal.h which is an internal crypto header. This makes a whole lot of internal crypto symbols visible basically everywhere in X.509 and TLS (because ssl_misc.h also includes x509_internal.h), which is undesirable. (Especially since the header includes other internal headers like psa_util_internal.h or ecp.h which in turn brings bignum.h...)

The goal of this issue is to either:

  1. Quit using pk_internal.h altogether. This would require duplicating the load_file function, which might not be desirable for code size. (Then the work would be purely on the mbedtls side.)
  2. Or drastically reduce what's visible to mbedtls. This might mean making most of the functions there static, and/or splitting the header into two parts: one used by mbedtls, the other only used by crypto. (Then the work would be split across both repos.)

This task should only be attempted when all the other PK tasks in the "1.0 follow-ups" EPIC are completed. At this point hopefully a few things should be clearer and we should be able to decide on the approach. Note that a possible outcome is also that we create a few other tasks as a pre-requisite for this one, if we're still using more internal things than we should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    size-sEstimated task size: small (~2d)

    Type

    Projects

    Status

    PK Rework Completion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions