Skip to content

Please add documentation for the return value of f_rng used for mbedtls_pk_parse_keyfile  #5868

@boaks

Description

@boaks

Version 3.1.0:

pk.h, mbedtls_pk_parse_keyfile

\param f_rng RNG function, must not be \c NULL. Used for blinding.

Please add some documentation about the expected return value of f_rng or provide a link to the documentation of RNG.
It's extremely hard to follow this parameter over so many call levels (at least I gave up).
And it seems to cause irritating error codes (even unknowns)

returning 1:

ERR mbedtls_pk_parse_keyfile returned -0x3cff: 'PK - Key algorithm is unsupported (only RSA and EC are supported) : UNKNOWN ERROR CODE (007F)'

returning the passed in len:

ERR mbedtls_pk_parse_keyfile returned -0x3ce0: 'PK - Key algorithm is unsupported (only RSA and EC are supported) : ASN1 - Out of data when parsing an ASN1 data structure'

Metadata

Metadata

Labels

enhancementgood-first-issueGood for newcomershelp-wantedThis issue is not being actively worked on, but PRs welcome.size-sEstimated task size: small (~2d)

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions