Verifying signature: want to use public key in certificate, not in keypair. Looking for sample of code

Hi,

Currently i’m implementing embedded sw tools to help develop cybersecurity with mbedtls.

i would like to verify a signature of a buffer, with the public key that i could find in a certificate file given by a peer. I’m looking for a sample of code to help doing it.

The sample i’ve found in mbedtls/programs/pkey/pk_verify.c is doing it with the public key found in a pk file parsed with “mbedtls_pk_parse_public_keyfile”.

So could i find a sample about it ? Or do i make a mistake in my analyse ?

Thanks, Nicolas.

Hi, I find myself in your same situation : I’d like to verify a digital signature with the public key taken from a certificate: did you find a way to do that ? thank you !