Skip to content

Commit

Permalink
Merge branch 'development' into eddsa
Browse files Browse the repository at this point in the history
  • Loading branch information
polhenarejos committed Sep 17, 2023
2 parents abe9182 + 21035d6 commit 7c5bab8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/fido/cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ void cbor_thread() {
if (apdu.sw == 0) {
DEBUG_DATA(res_APDU + 1, res_APDU_size);
}
else {
res_APDU[0] = apdu.sw;
apdu.sw = 0;
}

finished_data_size = res_APDU_size + 1;

Expand Down
3 changes: 3 additions & 0 deletions src/fido/cbor_make_credential.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ int cbor_make_credential(const uint8_t *data, size_t len) {
curve = FIDO2_CURVE_ED25519;
}
}
else if (pubKeyCredParams[i].alg <= FIDO2_ALG_RS256 && pubKeyCredParams[i].alg >= FIDO2_ALG_RS512) {
// pass
}
else {
CBOR_ERROR(CTAP2_ERR_CBOR_UNEXPECTED_TYPE);
}
Expand Down
2 changes: 1 addition & 1 deletion src/fido/ctap2_cbor.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extern const bool _btrue, _bfalse;
do \
{ \
error = e; \
printf("Cbor ERROR [%s:%d]: %d\n", __FILE__, __LINE__, e); \
printf("Cbor ERROR [%s:%d]: %x\n", __FILE__, __LINE__, e); \
goto err; \
} while (0)

Expand Down
3 changes: 3 additions & 0 deletions src/fido/fido.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ extern int ecdh(uint8_t protocol, const mbedtls_ecp_point *Q, uint8_t *sharedSec
#define FIDO2_ALG_ES512 -36 //ECDSA-SHA512 P521
#define FIDO2_ALG_ECDH_ES_HKDF_256 -25 //ECDH-ES + HKDF-256
#define FIDO2_ALG_ES256K -47
#define FIDO2_ALG_RS256 -257
#define FIDO2_ALG_RS384 -258
#define FIDO2_ALG_RS512 -259

#define FIDO2_CURVE_P256 1
#define FIDO2_CURVE_P384 2
Expand Down
2 changes: 1 addition & 1 deletion src/fido/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef __VERSION_H_
#define __VERSION_H_

#define PICO_FIDO_VERSION 0x0506
#define PICO_FIDO_VERSION 0x0507

#define PICO_FIDO_VERSION_MAJOR ((PICO_FIDO_VERSION >> 8) & 0xff)
#define PICO_FIDO_VERSION_MINOR (PICO_FIDO_VERSION & 0xff)
Expand Down

0 comments on commit 7c5bab8

Please sign in to comment.