mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-19 00:29:03 +00:00
chore(core): include T3B1 certificate for the emulator
This commit is contained in:
parent
0db727b21b
commit
a50e49afa9
BIN
core/embed/sec/optiga/unix/certs/T3B1.der
Normal file
BIN
core/embed/sec/optiga/unix/certs/T3B1.der
Normal file
Binary file not shown.
80
core/embed/sec/optiga/unix/certs/T3B1.h
Normal file
80
core/embed/sec/optiga/unix/certs/T3B1.h
Normal file
@ -0,0 +1,80 @@
|
||||
// This file was generated via ./gen.sh
|
||||
|
||||
static const unsigned char T3B1_der[] = {
|
||||
0x30, 0x82, 0x01, 0xa3, 0x30, 0x82, 0x01, 0x49, 0xa0, 0x03, 0x02, 0x01,
|
||||
0x02, 0x02, 0x04, 0x43, 0xd8, 0x69, 0x17, 0x30, 0x0a, 0x06, 0x08, 0x2a,
|
||||
0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x0b, 0x30,
|
||||
0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x5a, 0x31, 0x1e,
|
||||
0x30, 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x15, 0x54, 0x72, 0x65,
|
||||
0x7a, 0x6f, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20,
|
||||
0x73, 0x2e, 0x72, 0x2e, 0x6f, 0x2e, 0x31, 0x20, 0x30, 0x1e, 0x06, 0x03,
|
||||
0x55, 0x04, 0x03, 0x0c, 0x17, 0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x20,
|
||||
0x4d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x43, 0x41, 0x30, 0x22, 0x18, 0x0f, 0x32, 0x30, 0x32, 0x35,
|
||||
0x30, 0x34, 0x31, 0x34, 0x31, 0x32, 0x31, 0x38, 0x31, 0x33, 0x5a, 0x18,
|
||||
0x0f, 0x32, 0x30, 0x35, 0x35, 0x30, 0x34, 0x30, 0x37, 0x31, 0x32, 0x31,
|
||||
0x38, 0x31, 0x33, 0x5a, 0x30, 0x1d, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03,
|
||||
0x55, 0x04, 0x03, 0x0c, 0x12, 0x54, 0x33, 0x42, 0x31, 0x20, 0x54, 0x72,
|
||||
0x65, 0x7a, 0x6f, 0x72, 0x20, 0x53, 0x61, 0x66, 0x65, 0x20, 0x33, 0x30,
|
||||
0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01,
|
||||
0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,
|
||||
0x00, 0x04, 0x9b, 0xbf, 0x06, 0xda, 0xd9, 0xab, 0x59, 0x05, 0xe0, 0x54,
|
||||
0x71, 0xce, 0x16, 0xd5, 0x22, 0x2c, 0x89, 0xc2, 0xca, 0xa3, 0x9f, 0x26,
|
||||
0x26, 0x7a, 0xc0, 0x74, 0x71, 0x29, 0x88, 0x5f, 0xbd, 0x44, 0x1b, 0xcc,
|
||||
0x7f, 0xa8, 0x4d, 0xe1, 0x20, 0xa3, 0x67, 0x55, 0xda, 0xf3, 0x0a, 0x6f,
|
||||
0x47, 0xe8, 0xc0, 0xd4, 0xbd, 0xdc, 0x15, 0x03, 0x6e, 0xd2, 0xa3, 0x44,
|
||||
0x7d, 0xfa, 0x7a, 0x1d, 0x3e, 0x88, 0xa3, 0x41, 0x30, 0x3f, 0x30, 0x0e,
|
||||
0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02,
|
||||
0x00, 0x80, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff,
|
||||
0x04, 0x02, 0x30, 0x00, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04,
|
||||
0x18, 0x30, 0x16, 0x80, 0x14, 0x6b, 0xd4, 0xf9, 0x69, 0x8b, 0xd1, 0xaa,
|
||||
0xb1, 0xd7, 0x02, 0x50, 0x5a, 0x05, 0x58, 0x24, 0x08, 0x40, 0x16, 0xb5,
|
||||
0xfc, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,
|
||||
0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x5a, 0xc6, 0x35, 0x63,
|
||||
0x24, 0xb6, 0x6c, 0x2e, 0x73, 0xc1, 0xb7, 0xa1, 0xa5, 0xea, 0xb0, 0x7a,
|
||||
0x4e, 0xe6, 0x7b, 0x60, 0xea, 0x04, 0x2b, 0x57, 0x11, 0x66, 0x59, 0x6d,
|
||||
0x3e, 0x54, 0x94, 0x2b, 0x02, 0x21, 0x00, 0xe1, 0x4d, 0x9d, 0xcd, 0xd9,
|
||||
0x97, 0xc9, 0x86, 0xcb, 0xd8, 0xbe, 0x22, 0x50, 0xf9, 0x8c, 0xfe, 0xf2,
|
||||
0xaf, 0x12, 0xa2, 0xe8, 0x6e, 0x69, 0x95, 0xad, 0x09, 0x85, 0x77, 0xe9,
|
||||
0x70, 0x84, 0xc9, 0x30, 0x82, 0x01, 0xe1, 0x30, 0x82, 0x01, 0x88, 0xa0,
|
||||
0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x67, 0xfc, 0xfd, 0x25, 0x78, 0x25,
|
||||
0xb1, 0x8f, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04,
|
||||
0x03, 0x02, 0x30, 0x54, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
|
||||
0x06, 0x13, 0x02, 0x43, 0x5a, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55,
|
||||
0x04, 0x0a, 0x0c, 0x15, 0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x20, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x2e, 0x72, 0x2e, 0x6f,
|
||||
0x2e, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1c,
|
||||
0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x66,
|
||||
0x61, 0x63, 0x74, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x52, 0x6f, 0x6f,
|
||||
0x74, 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x35, 0x30, 0x34,
|
||||
0x31, 0x34, 0x31, 0x32, 0x31, 0x38, 0x34, 0x36, 0x5a, 0x18, 0x0f, 0x32,
|
||||
0x30, 0x35, 0x35, 0x30, 0x34, 0x31, 0x34, 0x31, 0x32, 0x31, 0x38, 0x34,
|
||||
0x36, 0x5a, 0x30, 0x4f, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
|
||||
0x06, 0x13, 0x02, 0x43, 0x5a, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55,
|
||||
0x04, 0x0a, 0x0c, 0x15, 0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x20, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x2e, 0x72, 0x2e, 0x6f,
|
||||
0x2e, 0x31, 0x20, 0x30, 0x1e, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x17,
|
||||
0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x66,
|
||||
0x61, 0x63, 0x74, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x41, 0x30,
|
||||
0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01,
|
||||
0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,
|
||||
0x00, 0x04, 0x10, 0xa6, 0xbc, 0x4f, 0x9e, 0xb5, 0x2f, 0xd4, 0x50, 0xbe,
|
||||
0x2c, 0x36, 0x51, 0x89, 0xea, 0x6a, 0x52, 0x3f, 0xdd, 0xdd, 0x62, 0xe4,
|
||||
0x45, 0x66, 0xdc, 0x34, 0x9a, 0x8c, 0x7f, 0x81, 0x31, 0x44, 0xcd, 0xe8,
|
||||
0x1c, 0x8c, 0x10, 0x6b, 0x74, 0xbf, 0xce, 0xae, 0x9c, 0x8c, 0xa5, 0x20,
|
||||
0x2a, 0xf6, 0x35, 0xce, 0x1a, 0x53, 0x30, 0xc4, 0x1c, 0x70, 0x8e, 0xbb,
|
||||
0xf5, 0x05, 0xe0, 0x25, 0xc3, 0x39, 0xa3, 0x47, 0x30, 0x45, 0x30, 0x0e,
|
||||
0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02,
|
||||
0x02, 0x04, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff,
|
||||
0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x1f,
|
||||
0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xc8,
|
||||
0xb5, 0xb2, 0x43, 0xb3, 0x30, 0x43, 0xcc, 0x08, 0xb4, 0xdc, 0x3a, 0x72,
|
||||
0xa1, 0xde, 0xcd, 0xcf, 0xd7, 0xea, 0xdb, 0x30, 0x0a, 0x06, 0x08, 0x2a,
|
||||
0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44,
|
||||
0x02, 0x20, 0x5a, 0xab, 0xde, 0x49, 0xac, 0xe0, 0x13, 0x60, 0x17, 0xef,
|
||||
0x28, 0x68, 0xfc, 0x99, 0x55, 0xf8, 0xd2, 0x3d, 0x00, 0xf9, 0x68, 0x42,
|
||||
0xf2, 0x28, 0x74, 0xa4, 0x7c, 0x68, 0x33, 0x3a, 0x0f, 0xc7, 0x02, 0x20,
|
||||
0x01, 0x2a, 0x32, 0x12, 0xb9, 0x0c, 0x99, 0x6c, 0x8c, 0x8c, 0xa3, 0xfb,
|
||||
0x22, 0x0e, 0x6e, 0xf7, 0x4c, 0x80, 0x84, 0xf9, 0x56, 0x3f, 0x95, 0x86,
|
||||
0xc9, 0xd5, 0xb5, 0xcb, 0xee, 0x67, 0x3a, 0x1c};
|
||||
static const unsigned int T3B1_der_len = 908;
|
@ -33,8 +33,8 @@
|
||||
#include "certs/T3T1.h"
|
||||
#define DEVICE_CERT_CHAIN T3T1_der
|
||||
#elif defined(TREZOR_MODEL_T3B1)
|
||||
#include "certs/T2B1.h"
|
||||
#define DEVICE_CERT_CHAIN T2B1_der
|
||||
#include "certs/T3B1.h"
|
||||
#define DEVICE_CERT_CHAIN T3B1_der
|
||||
#elif defined(TREZOR_MODEL_T3W1)
|
||||
#include "certs/T3W1.h"
|
||||
#define DEVICE_CERT_CHAIN T3W1_der
|
||||
|
@ -78,12 +78,7 @@ def test_authenticate_device(client: Client, challenge: bytes) -> None:
|
||||
|
||||
# Verify that the common name matches the Trezor model.
|
||||
common_name = cert.subject.get_attributes_for_oid(x509.oid.NameOID.COMMON_NAME)[0]
|
||||
if client.model == models.T3B1:
|
||||
# XXX TODO replace as soon as we have T3B1 staging
|
||||
internal_model = "T2B1"
|
||||
else:
|
||||
internal_model = client.model.internal_name
|
||||
assert common_name.value.startswith(internal_model)
|
||||
assert common_name.value.startswith(client.model.internal_name)
|
||||
|
||||
# Verify the signature of the challenge.
|
||||
data = b"\x13AuthenticateDevice:" + compact_size(len(challenge)) + challenge
|
||||
|
Loading…
Reference in New Issue
Block a user