Mbed OS Reference
Loading...
Searching...
No Matches
t_cose_common.h File Reference

Defines common to all public t_cose interfaces. More...

Go to the source code of this file.

Enumerations

enum  t_cose_err_t {
  T_COSE_SUCCESS = 0 , T_COSE_ERR_UNSUPPORTED_SIGNING_ALG , T_COSE_ERR_PROTECTED_HEADERS , T_COSE_ERR_UNSUPPORTED_HASH ,
  T_COSE_ERR_HASH_GENERAL_FAIL , T_COSE_ERR_HASH_BUFFER_SIZE , T_COSE_ERR_SIG_BUFFER_SIZE , T_COSE_ERR_KEY_BUFFER_SIZE ,
  T_COSE_ERR_SIGN1_FORMAT , T_COSE_ERR_CBOR_NOT_WELL_FORMED , T_COSE_ERR_NO_ALG_ID , T_COSE_ERR_NO_KID ,
  T_COSE_ERR_SIG_VERIFY , T_COSE_ERR_BAD_SHORT_CIRCUIT_KID , T_COSE_ERR_INVALID_ARGUMENT , T_COSE_ERR_INSUFFICIENT_MEMORY ,
  T_COSE_ERR_FAIL , T_COSE_ERR_TAMPERING_DETECTED , T_COSE_ERR_UNKNOWN_KEY , T_COSE_ERR_WRONG_TYPE_OF_KEY ,
  T_COSE_ERR_SIG_STRUCT , T_COSE_ERR_SHORT_CIRCUIT_SIG
}
 Error codes return by t_cose. More...
 

Detailed Description

Defines common to all public t_cose interfaces.

Definition in file t_cose_common.h.

Enumeration Type Documentation

◆ t_cose_err_t

Error codes return by t_cose.

Do not reorder these. It is OK to add new ones at the end.

Enumerator
T_COSE_SUCCESS 

Operation completed successfully.

T_COSE_ERR_UNSUPPORTED_SIGNING_ALG 

The requested signing algorithm is not supported.

T_COSE_ERR_PROTECTED_HEADERS 

Error constructing the protected headers.

T_COSE_ERR_UNSUPPORTED_HASH 

The hash algorithm needed is not supported.

Note that the signing algorithm identifier usually identifies the hash algorithm.

T_COSE_ERR_HASH_GENERAL_FAIL 

Some system failure when running the hash algorithm.

T_COSE_ERR_HASH_BUFFER_SIZE 

The buffer to receive a hash result is too small.

T_COSE_ERR_SIG_BUFFER_SIZE 

The buffer to receive result of a signing operation is too small.

T_COSE_ERR_KEY_BUFFER_SIZE 

The buffer to receive to receive a key is too small.

T_COSE_ERR_SIGN1_FORMAT 

When verifying a COSE_Sign1, something is wrong with the format of the CBOR.

For example, it is missing something like the payload.

T_COSE_ERR_CBOR_NOT_WELL_FORMED 

When decoding some CBOR like a COSE_Sign1, the CBOR was not well-formed.

Most likely what was supposed to be CBOR was is either not or it has been corrupted.

T_COSE_ERR_NO_ALG_ID 

No algorithm ID was found when one is needed.

For example, when verifying a COSE_Sign1.

T_COSE_ERR_NO_KID 

No key ID was found when one is needed.

For example, when verifying a COSE_Sign1.

T_COSE_ERR_SIG_VERIFY 

Signature verification failed.

For example, the cryptographic operations completed successfully but hash wasn't as expected.

T_COSE_ERR_BAD_SHORT_CIRCUIT_KID 

Verification of a short-circuit signature failed.

T_COSE_ERR_INVALID_ARGUMENT 

Some (unspecified) argument was not valid.

T_COSE_ERR_INSUFFICIENT_MEMORY 

Out of heap memory.

T_COSE_ERR_FAIL 

General unspecific failure.

T_COSE_ERR_TAMPERING_DETECTED 

Equivalent to PSA_ERROR_TAMPERING_DETECTED.

T_COSE_ERR_UNKNOWN_KEY 

The key identified by a key slot of a key ID was not found.

T_COSE_ERR_WRONG_TYPE_OF_KEY 

The key was found, but it was the wrong type for the operation.

T_COSE_ERR_SIG_STRUCT 

Error constructing the Sig_structure when signing or verify.

T_COSE_ERR_SHORT_CIRCUIT_SIG 

Signature was short-circuit.

THe option to allow verification of short-circuit signatures was not set

Definition at line 44 of file t_cose_common.h.