summaryrefslogtreecommitdiffstats
path: root/regress/cred.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:20:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:20:30 +0000
commit31acb164b1ffc24a287b1fe97eea5e4beeaf5f5a (patch)
tree3aab995beff7993d741c493392c0e1f14376d79b /regress/cred.c
parentAdding upstream version 1.14.0. (diff)
downloadlibfido2-9290f1892283356a31d84cf961b3a696601037cf.tar.xz
libfido2-9290f1892283356a31d84cf961b3a696601037cf.zip
Adding upstream version 1.15.0.upstream/1.15.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'regress/cred.c')
-rw-r--r--regress/cred.c477
1 files changed, 477 insertions, 0 deletions
diff --git a/regress/cred.c b/regress/cred.c
index 61e603d..00c555e 100644
--- a/regress/cred.c
+++ b/regress/cred.c
@@ -1365,6 +1365,420 @@ const unsigned char attstmt_tpm_es256[3841] = {
0x4e
};
+const unsigned char x509_0_tpm_es256[1476] = {
+ 0x30, 0x82, 0x05, 0xc0, 0x30, 0x82, 0x03, 0xa8,
+ 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x30,
+ 0xcd, 0xf2, 0x7e, 0x81, 0xc0, 0x43, 0x85, 0xa2,
+ 0xd7, 0x29, 0xef, 0xf7, 0x9f, 0xa5, 0x2b, 0x30,
+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
+ 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x41,
+ 0x31, 0x3f, 0x30, 0x3d, 0x06, 0x03, 0x55, 0x04,
+ 0x03, 0x13, 0x36, 0x45, 0x55, 0x53, 0x2d, 0x53,
+ 0x54, 0x4d, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44,
+ 0x2d, 0x31, 0x41, 0x44, 0x42, 0x39, 0x39, 0x34,
+ 0x41, 0x42, 0x35, 0x38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0x03, 0x01, 0x00,
+ 0x01, 0xa3, 0x82, 0x01, 0xf3, 0x30, 0x82, 0x01,
+ 0xef, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f,
+ 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07,
+ 0x80, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13,
+ 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30,
+ 0x6d, 0x06, 0x03, 0x55, 0x1d, 0x20, 0x01, 0x01,
+ 0xff, 0x04, 0x63, 0x30, 0x61, 0x30, 0x5f, 0x06,
+ 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37,
+ 0x15, 0x1f, 0x30, 0x52, 0x30, 0x50, 0x06, 0x08,
+ 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x02,
+ 0x30, 0x44, 0x1e, 0x42, 0x00, 0x54, 0x00, 0x43,
+ 0x00, 0x50, 0x00, 0x41, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x54, 0x00, 0x72, 0x00, 0x75, 0x00, 0x73,
+ 0x00, 0x74, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x61,
+ 0x00, 0x74, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x72,
+ 0x00, 0x6d, 0x00, 0x20, 0x00, 0x20, 0x00, 0x49,
+ 0x00, 0x64, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x74,
+ 0x00, 0x69, 0x00, 0x74, 0x00, 0x79, 0x30, 0x10,
+ 0x06, 0x03, 0x55, 0x1d, 0x25, 0x04, 0x09, 0x30,
+ 0x07, 0x06, 0x05, 0x67, 0x81, 0x05, 0x08, 0x03,
+ 0x30, 0x59, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x01,
+ 0x01, 0xff, 0x04, 0x4f, 0x30, 0x4d, 0xa4, 0x4b,
+ 0x30, 0x49, 0x31, 0x16, 0x30, 0x14, 0x06, 0x05,
+ 0x67, 0x81, 0x05, 0x02, 0x01, 0x0c, 0x0b, 0x69,
+ 0x64, 0x3a, 0x35, 0x33, 0x35, 0x34, 0x34, 0x44,
+ 0x32, 0x30, 0x31, 0x17, 0x30, 0x15, 0x06, 0x05,
+ 0x67, 0x81, 0x05, 0x02, 0x02, 0x0c, 0x0c, 0x53,
+ 0x54, 0x33, 0x33, 0x48, 0x54, 0x50, 0x48, 0x41,
+ 0x48, 0x42, 0x34, 0x31, 0x16, 0x30, 0x14, 0x06,
+ 0x05, 0x67, 0x81, 0x05, 0x02, 0x03, 0x0c, 0x0b,
+ 0x69, 0x64, 0x3a, 0x30, 0x30, 0x34, 0x39, 0x30,
+ 0x30, 0x30, 0x34, 0x30, 0x1f, 0x06, 0x03, 0x55,
+ 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14,
+ 0x45, 0x1a, 0xec, 0xfc, 0x91, 0x70, 0xf8, 0x83,
+ 0x8b, 0x9c, 0x47, 0x2f, 0x0b, 0x9f, 0x07, 0xf3,
+ 0x2f, 0x7c, 0xa2, 0x8a, 0x30, 0x1d, 0x06, 0x03,
+ 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x55,
+ 0xa6, 0xee, 0xe3, 0x28, 0xdd, 0x40, 0x7f, 0x21,
+ 0xd2, 0x7b, 0x8c, 0x69, 0x2f, 0x8c, 0x08, 0x29,
+ 0xbc, 0x95, 0xb8, 0x30, 0x81, 0xb2, 0x06, 0x08,
+ 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01,
+ 0x04, 0x81, 0xa5, 0x30, 0x81, 0xa2, 0x30, 0x81,
+ 0x9f, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
+ 0x07, 0x30, 0x02, 0x86, 0x81, 0x92, 0x68, 0x74,
+ 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x61, 0x7a, 0x63,
+ 0x73, 0x70, 0x72, 0x6f, 0x64, 0x65, 0x75, 0x73,
+ 0x61, 0x69, 0x6b, 0x70, 0x75, 0x62, 0x6c, 0x69,
+ 0x73, 0x68, 0x2e, 0x62, 0x6c, 0x6f, 0x62, 0x2e,
+ 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x77, 0x69, 0x6e,
+ 0x64, 0x6f, 0x77, 0x73, 0x2e, 0x6e, 0x65, 0x74,
+ 0x2f, 0x65, 0x75, 0x73, 0x2d, 0x73, 0x74, 0x6d,
+ 0x2d, 0x6b, 0x65, 0x79, 0x69, 0x64, 0x2d, 0x31,
+ 0x61, 0x64, 0x62, 0x39, 0x39, 0x34, 0x61, 0x62,
+ 0x35, 0x38, 0x62, 0x65, 0x35, 0x37, 0x61, 0x30,
+ 0x63, 0x63, 0x39, 0x62, 0x39, 0x30, 0x30, 0x65,
+ 0x37, 0x38, 0x35, 0x31, 0x65, 0x31, 0x61, 0x34,
+ 0x33, 0x63, 0x30, 0x38, 0x36, 0x36, 0x30, 0x2f,
+ 0x62, 0x36, 0x63, 0x30, 0x64, 0x39, 0x38, 0x64,
+ 0x2d, 0x35, 0x37, 0x38, 0x61, 0x2d, 0x34, 0x62,
+ 0x66, 0x62, 0x2d, 0x61, 0x32, 0x64, 0x33, 0x2d,
+ 0x65, 0x64, 0x66, 0x65, 0x35, 0x66, 0x38, 0x32,
+ 0x30, 0x36, 0x30, 0x31, 0x2e, 0x63, 0x65, 0x72,
+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
+ 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03,
+ 0x82, 0x02, 0x01, 0x00, 0x2a, 0x08, 0x30, 0x1f,
+ 0xfd, 0x8f, 0x80, 0x9b, 0x4b, 0x37, 0x82, 0x61,
+ 0x86, 0x36, 0x57, 0x90, 0xb5, 0x1d, 0x1f, 0xa3,
+ 0xae, 0x68, 0xac, 0xa7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x00, 0x00, 0x00, 0x00,
+ 0x05, 0x23, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
+ 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05,
+ 0x00, 0x30, 0x81, 0x8c, 0x31, 0x0b, 0x30, 0x09,
+ 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55,
+ 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55,
+ 0x04, 0x08, 0x13, 0x0a, 0x57, 0x61, 0x73, 0x68,
+ 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x31, 0x10,
+ 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
+ 0x07, 0x52, 0x65, 0x64, 0x6d, 0x6f, 0x6e, 0x64,
+ 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04,
+ 0x0a, 0x13, 0x15, 0x4d, 0x69, 0x63, 0x72, 0x6f,
+ 0x73, 0x6f, 0x66, 0x74, 0x20, 0x43, 0x6f, 0x72,
+ 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x31, 0x36, 0x30, 0x34, 0x06, 0x03, 0x55, 0x04,
+ 0x03, 0x13, 0x2d, 0x4d, 0x69, 0x63, 0x72, 0x6f,
+ 0x73, 0x6f, 0x66, 0x74, 0x20, 0x54, 0x50, 0x4d,
+ 0x20, 0x52, 0x6f, 0x6f, 0x74, 0x20, 0x43, 0x65,
+ 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x74, 0x79, 0x20, 0x32, 0x30, 0x31, 0x34,
+ 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36,
+ 0x30, 0x33, 0x31, 0x39, 0x34, 0x30, 0x31, 0x36,
+ 0x5a, 0x17, 0x0d, 0x32, 0x37, 0x30, 0x36, 0x30,
+ 0x33, 0x31, 0x39, 0x34, 0x30, 0x31, 0x36, 0x5a,
+ 0x30, 0x41, 0x31, 0x3f, 0x30, 0x3d, 0x06, 0x03,
+ 0x55, 0x04, 0x03, 0x13, 0x36, 0x45, 0x55, 0x53,
+ 0x2d, 0x53, 0x54, 0x4d, 0x2d, 0x4b, 0x45, 0x59,
+ 0x49, 0x44, 0x2d, 0x31, 0x41, 0x44, 0x42, 0x39,
+ 0x39, 0x34, 0x41, 0x42, 0x35, 0x38, 0x42, 0x45,
+ 0x35, 0x37, 0x41, 0x30, 0x43, 0x43, 0x39, 0x42,
+ 0x39, 0x30, 0x30, 0x45, 0x37, 0x38, 0x35, 0x31,
+ 0x45, 0x31, 0x41, 0x34, 0x33, 0x43, 0x30, 0x38,
+ 0x36, 0x36, 0x30, 0x30, 0x82, 0x02, 0x22, 0x30,
+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
+ 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
+ 0x02, 0x0f, 0x00, 0x30, 0x82, 0x02, 0x0a, 0x02,
+ 0x82, 0x02, 0x01, 0x00, 0xdb, 0x03, 0x34, 0x82,
+ 0xfa, 0x81, 0x1c, 0x84, 0x0b, 0xa0, 0x0e, 0x60,
+ 0xd8, 0x9d, 0x84, 0xf4, 0x81, 0xc4, 0xe9, 0xff,
+ 0xcf, 0xe9, 0xa3, 0x57, 0x53, 0x60, 0xa8, 0x19,
+ 0xce, 0xbe, 0xe1, 0x97, 0xee, 0x5d, 0x8c, 0x9f,
+ 0xe4, 0xbd, 0xef, 0xbd, 0x94, 0x14, 0xe4, 0x74,
+ 0x41, 0x02, 0xe9, 0x03, 0x19, 0x9f, 0xdd, 0x48,
+ 0x2d, 0xbd, 0xca, 0x26, 0x47, 0x2c, 0x01, 0x31,
+ 0x5f, 0x34, 0xef, 0x59, 0x35, 0x48, 0x36, 0x3d,
+ 0x1e, 0x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0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
+ 0x79, 0x25, 0x32, 0x30, 0x32, 0x30, 0x31, 0x34,
+ 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x7d, 0x06, 0x08,
+ 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01,
+ 0x04, 0x71, 0x30, 0x6f, 0x30, 0x6d, 0x06, 0x08,
+ 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02,
+ 0x86, 0x61, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
+ 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x6d, 0x69, 0x63,
+ 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x70, 0x6b, 0x69, 0x6f, 0x70,
+ 0x73, 0x2f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x2f,
+ 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66,
+ 0x74, 0x25, 0x32, 0x30, 0x54, 0x50, 0x4d, 0x25,
+ 0x32, 0x30, 0x52, 0x6f, 0x6f, 0x74, 0x25, 0x32,
+ 0x30, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x25, 0x32, 0x30, 0x41,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
+ 0x25, 0x32, 0x30, 0x32, 0x30, 0x31, 0x34, 0x2e,
+ 0x63, 0x72, 0x74, 0x30, 0x0d, 0x06, 0x09, 0x2a,
+ 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
+ 0x05, 0x00, 0x03, 0x82, 0x02, 0x01, 0x00, 0x48,
+ 0x24, 0x32, 0xe8, 0xd6, 0x38, 0xda, 0x65, 0xec,
+ 0x1b, 0x18, 0x8e, 0x37, 0x07, 0xd5, 0x18, 0x5a,
+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 0xf1, 0x1e, 0x37,
+ 0x64, 0x15, 0x42, 0x96, 0x18, 0x3a, 0x89, 0xc8,
+ 0x14, 0x48, 0x89, 0x5c, 0x12, 0x88, 0x98, 0x0b,
+ 0x7b, 0x4e, 0xce, 0x1c, 0xda, 0xd5, 0xa4, 0xd3,
+ 0x32, 0x32, 0x74, 0x5b, 0xcc, 0xfd, 0x2b, 0x02,
+ 0xfb, 0xae, 0xd0, 0x5a, 0x4c, 0xc9, 0xc1, 0x35,
+ 0x19, 0x90, 0x5f, 0xca, 0x14, 0xeb, 0x4c, 0x17,
+ 0xd7, 0xe3, 0xe2, 0x5d, 0xb4, 0x49, 0xaa, 0xf0,
+ 0x50, 0x87, 0xc3, 0x20, 0x00, 0xda, 0xe9, 0x04,
+ 0x80, 0x64, 0xac, 0x9f, 0xcd, 0x26, 0x41, 0x48,
+ 0xe8, 0x4c, 0x46, 0xcc, 0x5b, 0xd7, 0xca, 0x4c,
+ 0x1b, 0x43, 0x43, 0x1e, 0xbd, 0x94, 0xe7, 0xa7,
+ 0xa6, 0x86, 0xe5, 0xd1, 0x78, 0x29, 0xa2, 0x40,
+ 0xc5, 0xc5, 0x47, 0xb6, 0x6d, 0x53, 0xde, 0xac,
+ 0x97, 0x74, 0x24, 0x57, 0xcc, 0x05, 0x93, 0xfd,
+ 0x52, 0x35, 0x29, 0xd5, 0xe0, 0xfa, 0x23, 0x0d,
+ 0xd7, 0xaa, 0x8b, 0x07, 0x4b, 0xf6, 0x64, 0xc7,
+ 0xad, 0x3c, 0xa1, 0xb5, 0xc5, 0x70, 0xaf, 0x46,
+ 0xfe, 0x9a, 0x82, 0x4d, 0x75, 0xb8, 0x6d
+};
+
+
/*
* Security Key By Yubico
* 5.1.X
@@ -2135,6 +2549,13 @@ valid_tpm_es256_cred(bool xfail)
assert(fido_cred_set_uv(c, FIDO_OPT_TRUE) == FIDO_OK);
assert(fido_cred_set_fmt(c, "tpm") == FIDO_OK);
assert(fido_cred_set_attstmt(c, attstmt_tpm_es256, sizeof(attstmt_tpm_es256)) == FIDO_OK);
+ assert(fido_cred_x5c_list_count(c) == 2);
+ assert(fido_cred_x5c_list_len(c, 0) == sizeof(x509_0_tpm_es256));
+ assert(memcmp(fido_cred_x5c_list_ptr(c, 0), x509_0_tpm_es256, sizeof(x509_0_tpm_es256)) == 0);
+ assert(fido_cred_x5c_list_len(c, 1) == sizeof(x509_1_tpm_es256));
+ assert(memcmp(fido_cred_x5c_list_ptr(c, 1), x509_1_tpm_es256, sizeof(x509_1_tpm_es256)) == 0);
+ assert(fido_cred_x5c_list_len(c, 2) == 0);
+ assert(fido_cred_x5c_list_ptr(c, 2) == NULL);
// XXX: RHEL9 has deprecated SHA-1 for signing.
assert(fido_cred_verify(c) == (xfail ? FIDO_ERR_INVALID_SIG : FIDO_OK));
assert(fido_cred_prot(c) == 0);
@@ -2147,6 +2568,61 @@ valid_tpm_es256_cred(bool xfail)
free_cred(c);
}
+static void
+push_kv(cbor_item_t *map, const char *key, cbor_item_t *value)
+{
+ struct cbor_pair kv;
+ cbor_item_t *tmp;
+
+ memset(&kv, 0, sizeof(kv));
+ assert(map != NULL && key != NULL && value != NULL);
+ assert((tmp = cbor_build_string(key)) != NULL);
+ /* XXX transfers ownership */
+ kv.key = cbor_move(tmp);
+ kv.value = cbor_move(value);
+ assert(cbor_map_add(map, kv));
+}
+
+static void
+attestation_object(void)
+{
+ struct cbor_load_result cbor;
+ unsigned char *attobj = NULL;
+ size_t len, alloclen = 0;
+ cbor_item_t *map;
+ fido_cred_t *c;
+
+ assert((map = cbor_new_definite_map(3)) != NULL);
+ push_kv(map, "fmt", cbor_build_string("tpm"));
+ push_kv(map, "attStmt", cbor_load(attstmt_tpm_es256,
+ sizeof(attstmt_tpm_es256), &cbor));
+ push_kv(map, "authData", cbor_load(authdata_tpm_es256,
+ sizeof(authdata_tpm_es256), &cbor));
+ assert((len = cbor_serialize_alloc(map, &attobj, &alloclen)));
+ cbor_decref(&map);
+
+ c = alloc_cred();
+ assert(fido_cred_set_type(c, COSE_ES256) == FIDO_OK);
+ assert(fido_cred_set_clientdata(c, cdh, sizeof(cdh)) == FIDO_OK);
+ assert(fido_cred_set_rp(c, rp_id, rp_name) == FIDO_OK);
+ assert(fido_cred_set_rk(c, FIDO_OPT_FALSE) == FIDO_OK);
+ assert(fido_cred_set_uv(c, FIDO_OPT_TRUE) == FIDO_OK);
+ assert(fido_cred_set_attobj(c, attobj, len) == FIDO_OK);
+ assert(strcmp(fido_cred_fmt(c), "tpm") == 0);
+ assert(fido_cred_attstmt_len(c) == sizeof(attstmt_tpm_es256));
+ assert(memcmp(fido_cred_attstmt_ptr(c), attstmt_tpm_es256, sizeof(attstmt_tpm_es256)) == 0);
+ assert(fido_cred_authdata_len(c) == sizeof(authdata_tpm_es256));
+ assert(memcmp(fido_cred_authdata_ptr(c), authdata_tpm_es256, sizeof(authdata_tpm_es256)) == 0);
+ assert(fido_cred_pubkey_len(c) == sizeof(pubkey_tpm_es256));
+ assert(memcmp(fido_cred_pubkey_ptr(c), pubkey_tpm_es256, sizeof(pubkey_tpm_es256)) == 0);
+ assert(fido_cred_id_len(c) == sizeof(id_tpm_es256));
+ assert(memcmp(fido_cred_id_ptr(c), id_tpm_es256, sizeof(id_tpm_es256)) == 0);
+ assert(fido_cred_aaguid_len(c) == sizeof(aaguid_tpm));
+ assert(memcmp(fido_cred_aaguid_ptr(c), aaguid_tpm, sizeof(aaguid_tpm)) == 0);
+ free_cred(c);
+ free(attobj);
+}
+
int
main(void)
{
@@ -2180,6 +2656,7 @@ main(void)
fmt_none();
valid_tpm_rs256_cred(xfail);
valid_tpm_es256_cred(xfail);
+ attestation_object();
exit(0);
}