support different aaguid's in cert for different solo models
This commit is contained in:
@@ -69,6 +69,8 @@ uint8_t ctap_get_info(CborEncoder * encoder)
|
||||
CborEncoder map;
|
||||
CborEncoder options;
|
||||
CborEncoder pins;
|
||||
uint8_t aaguid[16];
|
||||
device_read_aaguid(aaguid);
|
||||
|
||||
ret = cbor_encoder_create_map(encoder, &map, 6);
|
||||
check_ret(ret);
|
||||
@@ -105,7 +107,7 @@ uint8_t ctap_get_info(CborEncoder * encoder)
|
||||
ret = cbor_encode_uint(&map, RESP_aaguid);
|
||||
check_ret(ret);
|
||||
{
|
||||
ret = cbor_encode_byte_string(&map, CTAP_AAGUID, 16);
|
||||
ret = cbor_encode_byte_string(&map, aaguid, 16);
|
||||
check_ret(ret);
|
||||
}
|
||||
|
||||
@@ -505,7 +507,7 @@ static int ctap_make_auth_data(struct rpId * rp, CborEncoder * map, uint8_t * au
|
||||
|
||||
cbor_encoder_init(&cose_key, cose_key_buf, *len - sizeof(CTAP_authData), 0);
|
||||
|
||||
memmove(authData->attest.aaguid, CTAP_AAGUID, 16);
|
||||
device_read_aaguid(authData->attest.aaguid);
|
||||
authData->attest.credLenL = sizeof(CredentialId) & 0x00FF;
|
||||
authData->attest.credLenH = (sizeof(CredentialId) & 0xFF00) >> 8;
|
||||
|
||||
|
@@ -19,9 +19,6 @@
|
||||
#define CTAP_VENDOR_FIRST 0x40
|
||||
#define CTAP_VENDOR_LAST 0xBF
|
||||
|
||||
// AAGUID For Solo
|
||||
#define CTAP_AAGUID ((uint8_t*)"\x88\x76\x63\x1b\xd4\xa0\x42\x7f\x57\x73\x0e\xc7\x1c\x9e\x02\x79")
|
||||
|
||||
#define MC_clientDataHash 0x01
|
||||
#define MC_rp 0x02
|
||||
#define MC_user 0x03
|
||||
|
@@ -211,4 +211,9 @@ void device_attestation_read_cert_der(uint8_t * dst);
|
||||
*/
|
||||
uint16_t device_attestation_cert_der_get_size();
|
||||
|
||||
/** Read the device's 16 byte AAGUID into a buffer.
|
||||
* @param dst buffer to write 16 byte AAGUID into.
|
||||
* */
|
||||
void device_read_aaguid(uint8_t * dst);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user