From 88aeb4ce1313a9e89209c08efa62fb6b7eb428c4 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 25 Sep 2022 11:42:35 +0200 Subject: tss: Make sure vinyl tags include eUICC,Gold and eUICC,Main digests ... as well as eUICC,ApProductionMode which was missing before. --- src/tss.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/tss.c b/src/tss.c index d8f9789..f162a82 100644 --- a/src/tss.c +++ b/src/tss.c @@ -1075,10 +1075,29 @@ int tss_request_add_vinyl_tags(plist_t request, plist_t parameters, plist_t over plist_dict_set_item(request, "@BBTicket", plist_new_bool(1)); plist_dict_set_item(request, "@eUICC,Ticket", plist_new_bool(1)); + _plist_dict_copy_bool(request, parameters, "eUICC,ApProductionMode", "ApProductionMode"); _plist_dict_copy_uint(request, parameters, "eUICC,ChipID", NULL); _plist_dict_copy_data(request, parameters, "eUICC,EID", NULL); _plist_dict_copy_data(request, parameters, "eUICC,RootKeyIdentifier", NULL); + if (!plist_dict_get_item(request, "eUICC,Gold")) { + plist_t n = plist_access_path(parameters, 2, "Manifest", "eUICC,Gold"); + if (n) { + plist_t p = plist_new_dict(); + _plist_dict_copy_data(p, n, "Digest", NULL); + plist_dict_set_item(request, "eUICC,Gold", p); + } + } + + if (!plist_dict_get_item(request, "eUICC,Main")) { + plist_t n = plist_access_path(parameters, 2, "Manifest", "eUICC,Main"); + if (n) { + plist_t p = plist_new_dict(); + _plist_dict_copy_data(p, n, "Digest", NULL); + plist_dict_set_item(request, "eUICC,Main", p); + } + } + /* set Nonce for eUICC,Gold component */ node = plist_dict_get_item(parameters, "EUICCGoldNonce"); if (node) { -- cgit v1.1-32-gdbae