Added functions for writing COSE keys.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-08-17 01:19:27 +02:00
parent b2c4e0e1c1
commit 63e15b19bb
2 changed files with 84 additions and 0 deletions

View File

@@ -19,6 +19,9 @@
#define _CTAP2_CBOR_H_
#include "cbor.h"
#include "common.h"
#include "mbedtls/ecp.h"
#include "mbedtls/ecdh.h"
extern uint8_t *driver_prepare_response();
extern void driver_exec_finished(size_t size_next);
@@ -237,4 +240,8 @@ typedef struct CborCharString {
CBOR_CHECK(cbor_encode_boolean(&(p), v == ptrue ? true : false)); \
} } while (0)
extern CborError COSE_key(mbedtls_ecp_keypair *, CborEncoder *, CborEncoder *);
extern CborError COSE_key_shared(mbedtls_ecdh_context *key, CborEncoder *mapEncoderParent, CborEncoder *mapEncoder);
extern CborError COSE_public_key(int alg, CborEncoder *mapEncoderParent, CborEncoder *mapEncoder);
#endif //_CTAP2_CBOR_H_