Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Functions
ledger_pki.c File Reference
#include "os_types.h"
#include "os_pki.h"
#include "ledger_pki.h"
Include dependency graph for ledger_pki.c:

Go to the source code of this file.

Functions

check_signature_with_pki_status_t check_signature_with_pki (const buffer_t hash, const uint8_t *expected_key_usage, const cx_curve_t *expected_curve, const buffer_t signature)
 Checks a signature using the PKI certificate.
 

Function Documentation

◆ check_signature_with_pki()

check_signature_with_pki_status_t check_signature_with_pki ( const buffer_t  hash,
const uint8_t *  expected_key_usage,
const cx_curve_t *  expected_curve,
const buffer_t  signature 
)

Checks a signature using the PKI certificate.

This function retrieves the PKI certificate information from the OS, verifies that the key usage and curve match the expected values, and then checks the signature against the provided hash.

Parameters
hashBuffer containing the hash to verify.
expected_key_usageExpected key usage value of the loaded certificate or NULL.
expected_curveExpected elliptic curve of the loaded certificate or NULL.
signatureBuffer containing the signature to verify.
Returns
Status of the signature check (see check_signature_with_pki_status_t).

Definition at line 5 of file ledger_pki.c.