New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix detach&attach not to create new COSEMessage instance #447
Fix detach&attach not to create new COSEMessage instance #447
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
=======================================
Coverage 97.24% 97.24%
=======================================
Files 32 32
Lines 3261 3262 +1
=======================================
+ Hits 3171 3172 +1
Misses 90 90
☔ View full report in Codecov by Sentry. |
I noticed that |
Co-authored-by: Ajitomi Daisuke <dajiaji@gmail.com>
Co-authored-by: Ajitomi Daisuke <dajiaji@gmail.com>
Co-authored-by: Ajitomi Daisuke <dajiaji@gmail.com>
…ma/python-cwt into add-detached-content-converter
@dajiaji COSEMessage.loads() on detached content message works fineThis code below prints like this, and it outputs what I expected.
import sys
import subprocess
from cwt import COSEMessage
"""
18([
/ protected: / h'A201260300',
/ unprotected: / {4: h'3131'},
/ payload: / null / detached /,
/ signature: / h'6520BBAF2081D7E0ED0F95F76EB0733D667005F7467CEC4B87B9381A6BA1EDE8E00DF29F32A37230F39A842A54821FDD223092819D7728EFB9D3A0080B75380B'
])
"""
expected_detached_cose_message = COSEMessage.loads(
bytes.fromhex(
"D28445A201260300A104423131F658406520BBAF2081D7E0ED0F95F76EB0733D667005F7467CEC4B87B9381A6BA1EDE8E00DF29F32A37230F39A842A54821FDD223092819D7728EFB9D3A0080B75380B"
)
)
output = subprocess.check_output(f"echo {expected_detached_cose_message.dumps().hex().upper()} | pretty2diag.rb -e", shell=True).decode(sys.stdout.encoding).rstrip("\n")
print(output) on the other hand, I expect that
|
Yes, I understand this negative side-effect. I can fix it on my next PR. |
No description provided.