Bob, then please raise an issue / ticket in the project (c509 rust code). The code shall be updated to the latest draft of c509 cert.
Lijun Robert Moskowitz <[email protected]> schrieb am Mi., 11. Sept. 2024, 22:39: > Lijun, > > I am constrained ( :) ) by the c509 rust code and how it compiled on my > system. > > All help wrt this, I need. > > I just did my 2nd run-through in building out my DRIP wg test > environment. I really want to have correct c509 objects. > > Bob > > On 9/11/24 15:52, Lijun Liao wrote: > > There are 2 issues in you C509 output converted from the X.509 > certificate: > > 1. The type (second byte) shall be 0x03, but it is 0x01 in your C509. > > 2. The issuer shall be encoded as bstr with leading 0x00, but it is tsar > in your C509. > > > > For better comparison, here my output (157 bytes) > > > 8b034220f10c51002001003ffe3ff805aa16ed2392f6f0cb1a66de3abc1a68dc6ec4800a582026fd3a734b3366ffe4ab68dbd2230812fd0b197090ba1eaa7eb34ffa38ffb78f82228207502001003ffe3ff805aa28cd1ae2a3dae358409eee41eed53462f11be428d4350e9865b55d225a25ed956e6da9d5487cff1e5e3ccb4d7f819f240cec045bbdab5c4f2b1260f696a5728cd14e09bc0726dbba07. > > > > And for better understanding, here the textual output (using my own tool) > > > > My C509: > > 0: 8B # array(11) > > 1: 03 # [0]: simple(3) > > 2: 42 # [1]: bytes(2) > > 3: 20F1 > > 5: 0C # [2]: simple(12) > > 6: 51 # [3]: bytes(17) > > 7: 002001003FFE3FF805AA16ED2392F6F0CB > > 24: 1A 66DE3ABC # [4]: uint32(1725840060) > > 29: 1A 68DC6EC4 # [5]: uint32(1759276740) > > 34: 80 # [6]: array(0) > > 35: 0A # [7]: simple(10) > > 36: 58 20 # [8]: bytes(32) > > 38: 26FD3A734B3366FFE4AB68DBD2230812FD0B197090BA1EAA > > 62: 7EB34FFA38FFB78F > > 70: 82 # [9]: array(2) > > 71: 22 # [0]: simple(-3) > > 72: 82 # [1]: array(2) > > 73: 07 # [0]: simple(7) > > 74: 50 # [1]: bytes(16) > > 75: 2001003FFE3FF805AA28CD1AE2A3DAE3 > > 91: 58 40 # [10]: bytes(64) > > 93: 9EEE41EED53462F11BE428D4350E9865B55D225A25ED956E > > 117: 6DA9D5487CFF1E5E3CCB4D7F819F240CEC045BBDAB5C4F2B > > 141: 1260F696A5728CD14E09BC0726DBBA07 > > 157: > > > > And your C509: > > > > 0: 8B # array(11) > > 1: 01 # [0]: simple(1) > > 2: 42 # [1]: bytes(2) > > 3: 20F1 > > 5: 78 20 # [2]: text(32) > > 7: 32303031303033666665336666383035 # "2001003ffe3ff805" > > 23: 61613136656432333932663666306362 # "aa16ed2392f6f0cb" > > 39: 1A 66DE3ABC # [3]: uint32(1725840060) > > 44: 1A 68DC6EC4 # [4]: uint32(1759276740) > > 49: 80 # [5]: array(0) > > 50: 0A # [6]: simple(10) > > 51: 58 20 # [7]: bytes(32) > > 53: 26FD3A734B3366FFE4AB68DBD2230812FD0B197090BA1EAA > > 77: 7EB34FFA38FFB78F > > 85: 82 # [8]: array(2) > > 86: 22 # [0]: simple(-3) > > 87: 82 # [1]: array(2) > > 88: 07 # [0]: simple(7) > > 89: 50 # [1]: bytes(16) > > 90: 2001003FFE3FF805AA28CD1AE2A3DAE3 > > 106: 0C # [9]: simple(12) > > 107: 58 40 # [10]: bytes(64) > > 109: 9EEE41EED53462F11BE428D4350E9865B55D225A25ED956E > > 133: 6DA9D5487CFF1E5E3CCB4D7F819F240CEC045BBDAB5C4F2B > > 157: 1260F696A5728CD14E09BC0726DBBA07 > > 173: > > > > Lijun > > > >> On 11. Sep 2024, at 20:07, Robert Moskowitz <[email protected]> > wrote: > >> > >> Please check out the attached DER > >> > >> COSE_X509 (173 bytes) > >> 8B 01 42 20 F1 78 20 32 30 30 31 30 30 33 66 66 65 33 66 66 38 30 35 > >> 61 61 31 36 65 64 32 33 39 32 66 36 66 30 63 62 1A 66 DE 3A BC 1A 68 > >> DC 6E C4 80 0A 58 20 26 FD 3A 73 4B 33 66 FF E4 AB 68 DB D2 23 08 12 > >> FD 0B 19 70 90 BA 1E AA 7E B3 4F FA 38 FF B7 8F 82 22 82 07 50 20 01 > >> 00 3F FE 3F F8 05 AA 28 CD 1A E2 A3 DA E3 0C 58 40 9E EE 41 EE D5 34 > >> 62 F1 1B E4 28 D4 35 0E 98 65 B5 5D 22 5A 25 ED 95 6E 6D A9 D5 48 7C > >> FF 1E 5E 3C CB 4D 7F 81 9F 24 0C EC 04 5B BD AB 5C 4F 2B 12 60 F6 96 > >> A5 72 8C D1 4E 09 BC 07 26 DB BA 07 > >> > >> Thanks! > >> > >> On 9/11/24 10:18, Lijun Liao wrote: > >>> Robert, > >>> > >>> It seems your C509 and X509 do not match, and your C509 has the type > 01 (the second byte) , but it shall be 03. > >>> > >>> Here my output (which differs from yours but still has the same length > (174 bytes) > >>> > >>> > 8b034208710c78213230303130303330303030303030303530656461386136343430393361616464491a66d5edcf1a66fecc4f800a58202a2cebfbde017c38c4fd76f5c86a2d073b3ca84f4916930ce2b8f39b9dbf8f6d82228207502001003ffe3ff80570202237fb9c5d4c5840151524fb89d5059e1a40633e67e39c326d61b6df5dc1484193d9b52f54d9489d87df87cabe44ed9d14e0e555a195da41a44426476e1e9ff1720f4a4e5671a70a > >>> > >>> Lijun > >>> > >>>> On 11. Sep 2024, at 15:47, Robert Moskowitz <[email protected]> > wrote: > >>>> > >>>> My Bad, I was using PEM when I was told to use DER.... > >>>> > >>>> COSE_X509 (174 bytes) > >>>> 8B 01 42 17 45 78 21 32 30 30 31 30 30 33 66 66 65 33 66 66 38 30 35 > >>>> 61 61 31 36 65 64 32 33 39 32 66 36 66 30 63 62 49 1A 66 DE 3A BC 1A > >>>> 68 64 76 44 80 0A 58 20 26 FD 3A 73 4B 33 66 FF E4 AB 68 DB D2 23 08 > >>>> 12 FD 0B 19 70 90 BA 1E AA 7E B3 4F FA 38 FF B7 8F 82 22 82 07 50 20 > >>>> 01 00 3F FE 3F F8 05 AA 28 CD 1A E2 A3 DA E3 0C 58 40 C8 39 BE EB 65 > >>>> 37 0B 7E 81 5B CA 24 58 52 88 E7 EB 8A CD 2A 49 0B 5E 80 64 0B A4 82 > >>>> 2A E9 05 BC 47 34 B8 AE 26 77 38 91 3E 7C B7 29 C8 19 2A 75 48 87 E4 > >>>> 11 51 78 FC D8 78 A2 C1 9F 91 67 01 09 > >>>> > >>>> Nice reduction, ~68%. But how do I display that as text? > >>>> > >>>> On 9/9/24 09:03, Robert Moskowitz wrote: > >>>>> Still having challenges with the c509 code. > >>>>> > >>>>> Can someone convert this? I need to see what it comes out as in > c509 and get object size (DER is 256 bytes) > >>>>> > >>>>> Thanks > >>>>> > >>>>> -----BEGIN CERTIFICATE----- > >>>>> MIH9MIGwoAMCAQICAghxMAUGAytlcDAsMSowKAYDVQQDDCEyMDAxMDAzMDAwMDAw > >>>>> MDA1MGVkYThhNjQ0MDkzYWFkZEkwHhcNMjQwOTAyMTY1NDM5WhcNMjQxMDAzMTY1 > >>>>> NDM5WjAAMCowBQYDK2VwAyEAKizr+94BfDjE/Xb1yGotBzs8qE9JFpMM4rjzm52/ > >>>>> j22jIjAgMB4GA1UdEQEB/wQUMBKHECABAD/+P/gFcCAiN/ucXUwwBQYDK2VwA0EA > >>>>> FRUk+4nVBZ4aQGM+Z+OcMm1htt9dwUhBk9m1L1TZSJ2H34fKvkTtnRTg5VWhldpB > >>>>> pEQmR24en/FyD0pOVnGnCg== > >>>>> -----END CERTIFICATE----- > >>>>> > >>>>> _______________________________________________ > >>>>> COSE mailing list -- [email protected] > >>>>> To unsubscribe send an email to [email protected] > >>>> _______________________________________________ > >>>> COSE mailing list -- [email protected] > >>>> To unsubscribe send an email to [email protected] > >> <ua1-16376-16376.der><ua1-16376-16376.pem> > >
_______________________________________________ COSE mailing list -- [email protected] To unsubscribe send an email to [email protected]
