keripy
keripy copied to clipboard
Why is `saidify` called on `credSubject` since the digest value is overwritten later?
Details:
in
test_protocoling.py / test_issuing
78 : credSubject is:
{'d': '', 'i': 'EELPMtVeoAMwq-cEvyqQkPlVlHHj86nNxpb-77KcM3DZ', 'dt': '2021-06-27T21:26:21.233257+00:00', 'LEI': '254900OPPU84GM83MG36'}
credSubject is given to saidify, the results assigned to:
84 : d
{'d': 'EL59_dE6fRq-BcOKQxdc5aPVHm6ZqmZfF3M1ImQLcpRn', 'i': 'EELPMtVeoAMwq-cEvyqQkPlVlHHj86nNxpb-77KcM3DZ', 'dt': '2021-06-27T21:26:21.233257+00:00', 'LEI': '254900OPPU84GM83MG36'}
then proving.py / credential
where 'data' is given above d value
'data' is merged with 'subject' resulting in:
74 : subject : in this test, same as 'data' --- except fields in different order
{'d': 'EL59_dE6fRq-BcOKQxdc5aPVHm6ZqmZfF3M1ImQLcpRn', 'dt': '2021-06-27T21:26:21.233257+00:00', 'i': 'EELPMtVeoAMwq-cEvyqQkPlVlHHj86nNxpb-77KcM3DZ', 'LEI': '254900OPPU84GM83MG36'}
then subject is given to saidify, the results assigned to:
94 : sad
{'d': 'EOM45RCy4W3Kt6-U_oUhaK4SYvRp-9MbLwBmlkn-wY1_', 'dt': '2021-06-27T21:26:21.233257+00:00', 'i': 'EELPMtVeoAMwq-cEvyqQkPlVlHHj86nNxpb-77KcM3DZ', 'LEI': '254900OPPU84GM83MG36'}
note: 'sad' is identical to 'subject', except 'd' field is OVERWRITTEN
for completeness, note that the credential's 'a' field maintains this latest value of 'sad'
97 : vc after saidify
{'v': 'ACDC10JSON00019e_', 'd': 'EA_XEmQ5ogD6Ui5xjUPeG6wHYLCb1hTIw69EHwxlbvle', 'i': 'EELPMtVeoAMwq-cEvyqQkPlVlHHj86nNxpb-77KcM3DZ', 'ri': 'EPzhcSAxNzgx-TgD_IJ59xJB7tAFCjIBWLzB9ZWesacD', 's': 'EMQWEcCnVRk1hatTNyK3sIykYSrrFvafX3bHQ9Gkk1kC', 'a': {'d': 'EOM45RCy4W3Kt6-U_oUhaK4SYvRp-9MbLwBmlkn-wY1_', 'dt': '2021-06-27T21:26:21.233257+00:00', 'i': 'EELPMtVeoAMwq-cEvyqQkPlVlHHj86nNxpb-77KcM3DZ', 'LEI': '254900OPPU84GM83MG36'}, 'e': {}}