Compare commits
4 Commits
3.1.1
...
cbor_safet
Author | SHA1 | Date | |
---|---|---|---|
eac22367db | |||
47a2b131e9 | |||
aeafd09007 | |||
8b6148ac90 |
@ -1 +1 @@
|
|||||||
3.1.0
|
3.1.1
|
||||||
|
@ -666,8 +666,8 @@ uint8_t ctap_parse_extensions(CborValue * val, CTAP_extensions * ext)
|
|||||||
if (ret == CborErrorOutOfMemory)
|
if (ret == CborErrorOutOfMemory)
|
||||||
{
|
{
|
||||||
printf2(TAG_ERR,"Error, rp map key is too large. Ignoring.\n");
|
printf2(TAG_ERR,"Error, rp map key is too large. Ignoring.\n");
|
||||||
cbor_value_advance(&map);
|
check_ret( cbor_value_advance(&map) );
|
||||||
cbor_value_advance(&map);
|
check_ret( cbor_value_advance(&map) );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
check_ret(ret);
|
check_ret(ret);
|
||||||
@ -1353,11 +1353,21 @@ uint8_t ctap_parse_client_pin(CTAP_clientPin * CP, uint8_t * request, int length
|
|||||||
break;
|
break;
|
||||||
case CP_getKeyAgreement:
|
case CP_getKeyAgreement:
|
||||||
printf1(TAG_CP,"CP_getKeyAgreement\n");
|
printf1(TAG_CP,"CP_getKeyAgreement\n");
|
||||||
|
if (cbor_value_get_type(&map) != CborBooleanType)
|
||||||
|
{
|
||||||
|
printf2(TAG_ERR,"Error, expecting cbor boolean\n");
|
||||||
|
return CTAP2_ERR_INVALID_CBOR_TYPE;
|
||||||
|
}
|
||||||
ret = cbor_value_get_boolean(&map, &CP->getKeyAgreement);
|
ret = cbor_value_get_boolean(&map, &CP->getKeyAgreement);
|
||||||
check_ret(ret);
|
check_ret(ret);
|
||||||
break;
|
break;
|
||||||
case CP_getRetries:
|
case CP_getRetries:
|
||||||
printf1(TAG_CP,"CP_getRetries\n");
|
printf1(TAG_CP,"CP_getRetries\n");
|
||||||
|
if (cbor_value_get_type(&map) != CborBooleanType)
|
||||||
|
{
|
||||||
|
printf2(TAG_ERR,"Error, expecting cbor boolean\n");
|
||||||
|
return CTAP2_ERR_INVALID_CBOR_TYPE;
|
||||||
|
}
|
||||||
ret = cbor_value_get_boolean(&map, &CP->getRetries);
|
ret = cbor_value_get_boolean(&map, &CP->getRetries);
|
||||||
check_ret(ret);
|
check_ret(ret);
|
||||||
break;
|
break;
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
const version_t firmware_version
|
||||||
const version_t firmware_version __attribute__ ((section (".flag"))) __attribute__ ((__used__)) = {
|
#ifdef SOLO
|
||||||
|
__attribute__ ((section (".flag"))) __attribute__ ((__used__))
|
||||||
|
#endif
|
||||||
|
= {
|
||||||
.major = SOLO_VERSION_MAJ,
|
.major = SOLO_VERSION_MAJ,
|
||||||
.minor = SOLO_VERSION_MIN,
|
.minor = SOLO_VERSION_MIN,
|
||||||
.patch = SOLO_VERSION_PATCH,
|
.patch = SOLO_VERSION_PATCH,
|
||||||
.reserved = 0
|
.reserved = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// from tinycbor, for a quick static_assert
|
// from tinycbor, for a quick static_assert
|
||||||
#include <compilersupport_p.h>
|
#include <compilersupport_p.h>
|
||||||
cbor_static_assert(sizeof(version_t) == 4);
|
cbor_static_assert(sizeof(version_t) == 4);
|
||||||
|
@ -84,4 +84,5 @@ cbor:
|
|||||||
cd ../../tinycbor/ && make clean
|
cd ../../tinycbor/ && make clean
|
||||||
cd ../../tinycbor/ && make CC="$(CC)" AR=$(AR) \
|
cd ../../tinycbor/ && make CC="$(CC)" AR=$(AR) \
|
||||||
LDFLAGS="$(LDFLAGS_LIB)" \
|
LDFLAGS="$(LDFLAGS_LIB)" \
|
||||||
CFLAGS="$(CFLAGS) -Os"
|
CFLAGS="$(CFLAGS) -Os -DCBOR_PARSER_MAX_RECURSIONS=3"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user