Gilles Peskine | 9311cf5 | 2019-03-01 20:05:05 +0100 | [diff] [blame^] | 1 | ASN.1 Write NULL |
| 2 | mbedtls_asn1_write_null:"0500" |
| 3 | |
Gilles Peskine | 3a032c3 | 2019-03-01 18:13:36 +0100 | [diff] [blame] | 4 | ASN.1 Write BOOLEAN FALSE |
| 5 | mbedtls_asn1_write_bool:0:"010100" |
| 6 | |
| 7 | ASN.1 Write BOOLEAN TRUE |
| 8 | mbedtls_asn1_write_bool:1:"0101ff" |
| 9 | |
| 10 | ASN.1 Write int 0 |
| 11 | mbedtls_asn1_write_int:0:"020100" |
| 12 | |
| 13 | ASN.1 Write int 1 |
| 14 | mbedtls_asn1_write_int:1:"020101" |
| 15 | |
| 16 | ASN.1 Write int 127 |
| 17 | mbedtls_asn1_write_int:0x7f:"02017f" |
| 18 | |
| 19 | ASN.1 Write int 128 |
| 20 | mbedtls_asn1_write_int:0x80:"02020080" |
| 21 | |
| 22 | ASN.1 Write int 255 |
| 23 | mbedtls_asn1_write_int:0xff:"020200ff" |
| 24 | |
| 25 | ASN.1 Write int 256 |
| 26 | mbedtls_asn1_write_int:0x100:"02020100" |
| 27 | |
| 28 | ASN.1 Write int 32767 |
| 29 | mbedtls_asn1_write_int:0x7fff:"02027fff" |
| 30 | |
| 31 | ASN.1 Write int 32768 |
| 32 | mbedtls_asn1_write_int:0x8000:"0203008000" |
| 33 | |
| 34 | ASN.1 Write int 65535 |
| 35 | mbedtls_asn1_write_int:0xffff:"020300ffff" |
| 36 | |
| 37 | ASN.1 Write int 65536 |
| 38 | mbedtls_asn1_write_int:0x10000:"0203010000" |
| 39 | |
| 40 | ASN.1 Write int 8388607 |
| 41 | mbedtls_asn1_write_int:0x7fffff:"02037fffff" |
| 42 | |
| 43 | ASN.1 Write int 8388608 |
| 44 | mbedtls_asn1_write_int:0x800000:"020400800000" |
| 45 | |
| 46 | ASN.1 Write int 0x12345678 |
| 47 | mbedtls_asn1_write_int:0x12345678:"020412345678" |
| 48 | |
| 49 | ASN.1 Write int 2147483647 |
| 50 | mbedtls_asn1_write_int:0x7fffffff:"02047fffffff" |
| 51 | |
| 52 | #ASN.1 Write mpi 0 |
| 53 | #mbedtls_asn1_write_mpi:"00":"020100" |
| 54 | |
| 55 | ASN.1 Write mpi 1 |
| 56 | mbedtls_asn1_write_mpi:"01":"020101" |
| 57 | |
| 58 | ASN.1 Write mpi 0x7f |
| 59 | mbedtls_asn1_write_mpi:"7f":"02017f" |
| 60 | |
| 61 | #ASN.1 Write mpi 0x80 |
| 62 | #mbedtls_asn1_write_mpi:"7f":"02020080" |
| 63 | |
| 64 | #ASN.1 Write mpi 0xff |
| 65 | #mbedtls_asn1_write_mpi:"7f":"020200ff" |
| 66 | |
| 67 | ASN.1 Write mpi 0x100 |
| 68 | mbedtls_asn1_write_mpi:"0100":"02020100" |
| 69 | |
| 70 | ASN.1 Write mpi, 127*8-1 bits |
| 71 | mbedtls_asn1_write_mpi:"7f7b16e05c1537de7c41cef1a0985d6a3ced98aec28e091874cbad6b5e40a5c956258f18861c28bed8ba808259339ee34b2e509c4080149474d5d5b86093f90c475a6443fc87e1a293d4151be625d652f1c32a00a018bba10c8a2ae5b2b0ee4be64e053dce9d07ec7919526c9dfcf2ec9fc3db485caa8e5a68a2cd0a427de8":"027f7f7b16e05c1537de7c41cef1a0985d6a3ced98aec28e091874cbad6b5e40a5c956258f18861c28bed8ba808259339ee34b2e509c4080149474d5d5b86093f90c475a6443fc87e1a293d4151be625d652f1c32a00a018bba10c8a2ae5b2b0ee4be64e053dce9d07ec7919526c9dfcf2ec9fc3db485caa8e5a68a2cd0a427de8" |
| 72 | |
| 73 | #ASN.1 Write mpi, 127*8 bits |
| 74 | #mbedtls_asn1_write_mpi:"e77b16e05c1537de7c41cef1a0985d6a3ced98aec28e091874cbad6b5e40a5c956258f18861c28bed8ba808259339ee34b2e509c4080149474d5d5b86093f90c475a6443fc87e1a293d4151be625d652f1c32a00a018bba10c8a2ae5b2b0ee4be64e053dce9d07ec7919526c9dfcf2ec9fc3db485caa8e5a68a2cd0a427de8":"028180e77b16e05c1537de7c41cef1a0985d6a3ced98aec28e091874cbad6b5e40a5c956258f18861c28bed8ba808259339ee34b2e509c4080149474d5d5b86093f90c475a6443fc87e1a293d4151be625d652f1c32a00a018bba10c8a2ae5b2b0ee4be64e053dce9d07ec7919526c9dfcf2ec9fc3db485caa8e5a68a2cd0a427de8" |
| 75 | |
| 76 | ASN.1 Write mpi, 127*8+1 bits |
| 77 | mbedtls_asn1_write_mpi:"108446d68934cc1af23c4cd909884d4bd737a1890e12f5ef8bf3d807d72feffa63c0bf2633345f8b8418d144617c871a7a0277ac0150eed4b3db7f9dff21114cd0d7f282400f03c931cb00c367550e374a1ed3762a1801ca714cfc8d5aac69707ca81e0661400ed0014d97cba48f94d835dd681fc3053c51958afbf7583cf49c":"028180108446d68934cc1af23c4cd909884d4bd737a1890e12f5ef8bf3d807d72feffa63c0bf2633345f8b8418d144617c871a7a0277ac0150eed4b3db7f9dff21114cd0d7f282400f03c931cb00c367550e374a1ed3762a1801ca714cfc8d5aac69707ca81e0661400ed0014d97cba48f94d835dd681fc3053c51958afbf7583cf49c" |
| 78 | |
| 79 | ASN.1 Write mpi, 255*8-1 bits |
| 80 | mbedtls_asn1_write_mpi:"7bd1913fcfb652896209ad3e62f5d04a8dfc71eb1698543c52200bd7bbf3c11dd9ff57c299a2f4da172b3d5bd7e29affddf8859be7d50a45537a0df15b17af603d18803fd17134847cba78d83e64bf9fee58364d6124add0541da7bad331cd35fb48186a74bc502ddb967602401c0db02b19e5d38f09e8618fa7f6a1a3f738629baffdc63d9d70d396007d943fd64ae696e5b7e88f2c6d6ec322b461dbddd36efa91d990343b66419cf4832a22dc9ad13021185a1bf007989a50ba3bfd1152b8db899482d3ed498d1b9fae243a3cdae9530d8b29fdb684f70cdc0c9b8527265312603b405e67d59d4b1d654ddc3b7fd5515acb32440dc80903c8474a2c136c":"0281ff7bd1913fcfb652896209ad3e62f5d04a8dfc71eb1698543c52200bd7bbf3c11dd9ff57c299a2f4da172b3d5bd7e29affddf8859be7d50a45537a0df15b17af603d18803fd17134847cba78d83e64bf9fee58364d6124add0541da7bad331cd35fb48186a74bc502ddb967602401c0db02b19e5d38f09e8618fa7f6a1a3f738629baffdc63d9d70d396007d943fd64ae696e5b7e88f2c6d6ec322b461dbddd36efa91d990343b66419cf4832a22dc9ad13021185a1bf007989a50ba3bfd1152b8db899482d3ed498d1b9fae243a3cdae9530d8b29fdb684f70cdc0c9b8527265312603b405e67d59d4b1d654ddc3b7fd5515acb32440dc80903c8474a2c136c" |
| 81 | |
| 82 | #ASN.1 Write mpi, 255*8 bits |
| 83 | #mbedtls_asn1_write_mpi:"fbd1913fcfb652896209ad3e62f5d04a8dfc71eb1698543c52200bd7bbf3c11dd9ff57c299a2f4da172b3d5bd7e29affddf8859be7d50a45537a0df15b17af603d18803fd17134847cba78d83e64bf9fee58364d6124add0541da7bad331cd35fb48186a74bc502ddb967602401c0db02b19e5d38f09e8618fa7f6a1a3f738629baffdc63d9d70d396007d943fd64ae696e5b7e88f2c6d6ec322b461dbddd36efa91d990343b66419cf4832a22dc9ad13021185a1bf007989a50ba3bfd1152b8db899482d3ed498d1b9fae243a3cdae9530d8b29fdb684f70cdc0c9b8527265312603b405e67d59d4b1d654ddc3b7fd5515acb32440dc80903c8474a2c136c":"0282010000fbd1913fcfb652896209ad3e62f5d04a8dfc71eb1698543c52200bd7bbf3c11dd9ff57c299a2f4da172b3d5bd7e29affddf8859be7d50a45537a0df15b17af603d18803fd17134847cba78d83e64bf9fee58364d6124add0541da7bad331cd35fb48186a74bc502ddb967602401c0db02b19e5d38f09e8618fa7f6a1a3f738629baffdc63d9d70d396007d943fd64ae696e5b7e88f2c6d6ec322b461dbddd36efa91d990343b66419cf4832a22dc9ad13021185a1bf007989a50ba3bfd1152b8db899482d3ed498d1b9fae243a3cdae9530d8b29fdb684f70cdc0c9b8527265312603b405e67d59d4b1d654ddc3b7fd5515acb32440dc80903c8474a2c136c" |
| 84 | |
| 85 | ASN.1 Write mpi, 256*8-1 bits |
| 86 | mbedtls_asn1_write_mpi:"7bd1913fcfb652896209ad3e62f5d04a8dfc71eb1698543c52200bd7bbf3c11dd9ff57c299a2f4da172b3d5bd7e29affddf8859be7d50a45537a0df15b17af603d18803fd17134847cba78d83e64bf9fee58364d6124add0541da7bad331cd35fb48186a74bc502ddb967602401c0db02b19e5d38f09e8618fa7f6a1a3f738629baffdc63d9d70d396007d943fd64ae696e5b7e88f2c6d6ec322b461dbddd36efa91d990343b66419cf4832a22dc9ad13021185a1bf007989a50ba3bfd1152b8db899482d3ed498d1b9fae243a3cdae9530d8b29fdb684f70cdc0c9b8527265312603b405e67d59d4b1d654ddc3b7fd5515acb32440dc80903c8474a2c136c89":"028201007bd1913fcfb652896209ad3e62f5d04a8dfc71eb1698543c52200bd7bbf3c11dd9ff57c299a2f4da172b3d5bd7e29affddf8859be7d50a45537a0df15b17af603d18803fd17134847cba78d83e64bf9fee58364d6124add0541da7bad331cd35fb48186a74bc502ddb967602401c0db02b19e5d38f09e8618fa7f6a1a3f738629baffdc63d9d70d396007d943fd64ae696e5b7e88f2c6d6ec322b461dbddd36efa91d990343b66419cf4832a22dc9ad13021185a1bf007989a50ba3bfd1152b8db899482d3ed498d1b9fae243a3cdae9530d8b29fdb684f70cdc0c9b8527265312603b405e67d59d4b1d654ddc3b7fd5515acb32440dc80903c8474a2c136c89" |
| 87 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 88 | ASN.1 Write OCTET STRING: length=0 |
| 89 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"":"0400" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 90 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 91 | ASN.1 Write OCTET STRING: length=1 |
| 92 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"41":"040141" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 93 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 94 | ASN.1 Write OCTET STRING: length=2 |
| 95 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"4142":"04024142" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 96 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 97 | ASN.1 Write OCTET STRING: length=127 |
| 98 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"99a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38":"047f99a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 99 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 100 | ASN.1 Write OCTET STRING: length=128 |
| 101 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"0199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38":"0481800199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 102 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 103 | ASN.1 Write OCTET STRING: length=255 |
| 104 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"633ed2cb0a2915dc4438a4c063017eb336cd9571d2a0585522c5073ca22a30ca7b8c9bd167d89ba1827bc6fb5d6ef6dcc52ee6eecc47e84ee0dd18fa3ebbdb6edfc679f037160d48d46a0d7e571335b24a28c8fd29b7f4a93d013b74e522bc1f5f605096bb99d438814b77b54d6dde608417b0a0ce9a8cb507fbeb95e9926b4bb6eec725599493d4b156ef3a5fd701426456029111c20f1d03c5d8999d2c042277ef91c5114a6c06218c1ba28d41ef08e4870d0cef260cba9de16d7d11ed5889b88fb93073746ebb158a4246cdb8a4ce403a5d1d598a0d11548f22070f833c1344d15e7a1445c133d19b8295b7c071bf2227178938031249d22d21c6f8e53d":"0481ff633ed2cb0a2915dc4438a4c063017eb336cd9571d2a0585522c5073ca22a30ca7b8c9bd167d89ba1827bc6fb5d6ef6dcc52ee6eecc47e84ee0dd18fa3ebbdb6edfc679f037160d48d46a0d7e571335b24a28c8fd29b7f4a93d013b74e522bc1f5f605096bb99d438814b77b54d6dde608417b0a0ce9a8cb507fbeb95e9926b4bb6eec725599493d4b156ef3a5fd701426456029111c20f1d03c5d8999d2c042277ef91c5114a6c06218c1ba28d41ef08e4870d0cef260cba9de16d7d11ed5889b88fb93073746ebb158a4246cdb8a4ce403a5d1d598a0d11548f22070f833c1344d15e7a1445c133d19b8295b7c071bf2227178938031249d22d21c6f8e53d" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 105 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 106 | ASN.1 Write OCTET STRING: length=256 |
| 107 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OCTET_STRING:"5a633ed2cb0a2915dc4438a4c063017eb336cd9571d2a0585522c5073ca22a30ca7b8c9bd167d89ba1827bc6fb5d6ef6dcc52ee6eecc47e84ee0dd18fa3ebbdb6edfc679f037160d48d46a0d7e571335b24a28c8fd29b7f4a93d013b74e522bc1f5f605096bb99d438814b77b54d6dde608417b0a0ce9a8cb507fbeb95e9926b4bb6eec725599493d4b156ef3a5fd701426456029111c20f1d03c5d8999d2c042277ef91c5114a6c06218c1ba28d41ef08e4870d0cef260cba9de16d7d11ed5889b88fb93073746ebb158a4246cdb8a4ce403a5d1d598a0d11548f22070f833c1344d15e7a1445c133d19b8295b7c071bf2227178938031249d22d21c6f8e53d":"048201005a633ed2cb0a2915dc4438a4c063017eb336cd9571d2a0585522c5073ca22a30ca7b8c9bd167d89ba1827bc6fb5d6ef6dcc52ee6eecc47e84ee0dd18fa3ebbdb6edfc679f037160d48d46a0d7e571335b24a28c8fd29b7f4a93d013b74e522bc1f5f605096bb99d438814b77b54d6dde608417b0a0ce9a8cb507fbeb95e9926b4bb6eec725599493d4b156ef3a5fd701426456029111c20f1d03c5d8999d2c042277ef91c5114a6c06218c1ba28d41ef08e4870d0cef260cba9de16d7d11ed5889b88fb93073746ebb158a4246cdb8a4ce403a5d1d598a0d11548f22070f833c1344d15e7a1445c133d19b8295b7c071bf2227178938031249d22d21c6f8e53d" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 108 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 109 | ASN.1 Write UTF8 STRING: length=0 |
| 110 | mbedtls_asn1_write_string:MBEDTLS_ASN1_UTF8_STRING:"":"0c00" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 111 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 112 | ASN.1 Write UTF8 STRING: length=1 |
| 113 | mbedtls_asn1_write_string:MBEDTLS_ASN1_UTF8_STRING:"41":"0c0141" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 114 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 115 | ASN.1 Write UTF8 STRING: length=128 |
| 116 | mbedtls_asn1_write_string:MBEDTLS_ASN1_UTF8_STRING:"0199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38":"0c81800199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38" |
Manuel Pégourié-Gonnard | 36178ff | 2014-05-29 14:26:03 +0200 | [diff] [blame] | 117 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 118 | ASN.1 Write PRINTABLE STRING: length=0 |
| 119 | mbedtls_asn1_write_string:MBEDTLS_ASN1_PRINTABLE_STRING:"":"1300" |
Manuel Pégourié-Gonnard | c22bb49 | 2014-05-29 17:16:45 +0200 | [diff] [blame] | 120 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 121 | ASN.1 Write PRINTABLE STRING: length=1 |
| 122 | mbedtls_asn1_write_string:MBEDTLS_ASN1_PRINTABLE_STRING:"41":"130141" |
Manuel Pégourié-Gonnard | c22bb49 | 2014-05-29 17:16:45 +0200 | [diff] [blame] | 123 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 124 | ASN.1 Write PRINTABLE STRING: length=128 |
| 125 | mbedtls_asn1_write_string:MBEDTLS_ASN1_PRINTABLE_STRING:"0199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38":"1381800199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38" |
Manuel Pégourié-Gonnard | c22bb49 | 2014-05-29 17:16:45 +0200 | [diff] [blame] | 126 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 127 | ASN.1 Write IA5 STRING: length=0 |
| 128 | mbedtls_asn1_write_string:MBEDTLS_ASN1_IA5_STRING:"":"1600" |
Manuel Pégourié-Gonnard | c22bb49 | 2014-05-29 17:16:45 +0200 | [diff] [blame] | 129 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 130 | ASN.1 Write IA5 STRING: length=1 |
| 131 | mbedtls_asn1_write_string:MBEDTLS_ASN1_IA5_STRING:"41":"160141" |
Manuel Pégourié-Gonnard | c22bb49 | 2014-05-29 17:16:45 +0200 | [diff] [blame] | 132 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 133 | ASN.1 Write IA5 STRING: length=128 |
| 134 | mbedtls_asn1_write_string:MBEDTLS_ASN1_IA5_STRING:"0199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38":"1681800199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38" |
Manuel Pégourié-Gonnard | c22bb49 | 2014-05-29 17:16:45 +0200 | [diff] [blame] | 135 | |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 136 | ASN.1 Write tagged string: length=0 |
| 137 | mbedtls_asn1_write_string:MBEDTLS_ASN1_IA5_STRING | MBEDTLS_ASN1_CONTEXT_SPECIFIC:"":"9600" |
| 138 | |
| 139 | ASN.1 Write tagged string: length=1 |
| 140 | mbedtls_asn1_write_string:MBEDTLS_ASN1_IA5_STRING | MBEDTLS_ASN1_CONTEXT_SPECIFIC:"41":"960141" |
| 141 | |
| 142 | ASN.1 Write tagged string: length=128 |
| 143 | mbedtls_asn1_write_string:MBEDTLS_ASN1_IA5_STRING | MBEDTLS_ASN1_CONTEXT_SPECIFIC:"0199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38":"9681800199a66790856f7199641f55cadabb660aaed6aa0d9ef8cef4417118c6e8c6e15becbaa21c63faf48726e92357a38b3079a0b9d60be7457ec6552f900dd032577167c91e829927343c3a769b362db4de0ad2ffb8f13cc2eeca9e52dc557118baa88b857477595622bc301a1ae2150030d652c4a482cf88d0ded85d6731ff2d38" |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 144 | |
Gilles Peskine | 9311cf5 | 2019-03-01 20:05:05 +0100 | [diff] [blame^] | 145 | ASN.1 Write OID: length=0 |
| 146 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OID:"":"0600" |
| 147 | |
| 148 | ASN.1 Write OID: length=1 |
| 149 | mbedtls_asn1_write_string:MBEDTLS_ASN1_OID:"41":"060141" |
| 150 | |
| 151 | ASN.1 Write AlgorithmIdentifier, null parameters |
| 152 | mbedtls_asn1_write_algorithm_identifier:"4f4944":8:"300d06034f4944" |
| 153 | |
| 154 | ASN.1 Write AlgorithmIdentifier, parameters (8 bytes) |
| 155 | mbedtls_asn1_write_algorithm_identifier:"4f4944":8:"300d06034f4944" |
| 156 | |
| 157 | ASN.1 Write AlgorithmIdentifier, total length=0x7f |
| 158 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0x7a:"307f06034f4944" |
| 159 | |
| 160 | ASN.1 Write AlgorithmIdentifier, total length=0x80 |
| 161 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0x7b:"30818006034f4944" |
| 162 | |
| 163 | ASN.1 Write AlgorithmIdentifier, total length=0xff |
| 164 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0xfa:"3081ff06034f4944" |
| 165 | |
| 166 | ASN.1 Write AlgorithmIdentifier, total length=0x100 |
| 167 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0xfb:"3082010006034f4944" |
| 168 | |
| 169 | ASN.1 Write AlgorithmIdentifier, total length=0xffff |
| 170 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0xfffa:"3082ffff06034f4944" |
| 171 | |
| 172 | ASN.1 Write AlgorithmIdentifier, total length=0x10000 |
| 173 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0xfffb:"308301000006034f4944" |
| 174 | |
| 175 | ASN.1 Write AlgorithmIdentifier, total length=0xffffff |
| 176 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0xfffffa:"3083ffffff06034f4944" |
| 177 | |
| 178 | ASN.1 Write AlgorithmIdentifier, total length=0x1000000 |
| 179 | mbedtls_asn1_write_algorithm_identifier:"4f4944":0xfffffb:"30840100000006034f4944" |
| 180 | |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 181 | ASN.1 Write / Read Length #0 (Len = 0, short form) |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 182 | mbedtls_asn1_write_len:0:"00":1:1 |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 183 | |
| 184 | ASN.1 Write / Read Length #1 (Len = 127, short form) |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 185 | mbedtls_asn1_write_len:127:"7F":1:1 |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 186 | |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 187 | ASN.1 Write / Read Length #2 (Len = 127, buffer too small) |
| 188 | mbedtls_asn1_write_len:127:"7F":0:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 189 | |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 190 | ASN.1 Write / Read Length #3 (Len = 128, long form) |
| 191 | mbedtls_asn1_write_len:128:"8180":2:2 |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 192 | |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 193 | ASN.1 Write / Read Length #4 (Len = 255, long form) |
| 194 | mbedtls_asn1_write_len:255:"81FF":2:2 |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 195 | |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 196 | ASN.1 Write / Read Length #5 (Len = 255, buffer too small) |
| 197 | mbedtls_asn1_write_len:255:"81FF":1:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL |
Paul Bakker | e325db9 | 2016-07-14 10:27:36 +0100 | [diff] [blame] | 198 | |
Paul Bakker | c7d6bd4 | 2016-07-14 11:39:56 +0100 | [diff] [blame] | 199 | ASN.1 Write / Read Length #6 (Len = 258, byte order) |
| 200 | mbedtls_asn1_write_len:258:"820102":3:3 |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 201 | |
Paul Bakker | c7d6bd4 | 2016-07-14 11:39:56 +0100 | [diff] [blame] | 202 | ASN.1 Write / Read Length #7 (Len = 65535, long form) |
Paul Bakker | 58bfb83 | 2016-07-14 11:02:31 +0100 | [diff] [blame] | 203 | mbedtls_asn1_write_len:65535:"82FFFF":3:3 |
| 204 | |
| 205 | ASN.1 Write / Read Length #8 (Len = 65535, buffer too small) |
| 206 | mbedtls_asn1_write_len:65535:"82FFFF":2:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL |
| 207 | |
Paul Bakker | c7d6bd4 | 2016-07-14 11:39:56 +0100 | [diff] [blame] | 208 | ASN.1 Write / Read Length #9 (Len = 66051, byte order) |
| 209 | mbedtls_asn1_write_len:66051:"83010203":4:4 |
| 210 | |
| 211 | ASN.1 Write / Read Length #10 (Len = 16777215, long form) |
| 212 | mbedtls_asn1_write_len:16777215:"83FFFFFF":4:4 |
| 213 | |
| 214 | ASN.1 Write / Read Length #11 (Len = 16777215, buffer too small) |
| 215 | mbedtls_asn1_write_len:16777215:"83FFFFFF":3:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL |
| 216 | |
| 217 | ASN.1 Write / Read Length #12 (Len = 16909060, byte order) |
| 218 | mbedtls_asn1_write_len:16909060:"8401020304":5:5 |
| 219 | |
| 220 | ASN.1 Write / Read Length #12 (Len = 16909060, buffer too small) |
| 221 | mbedtls_asn1_write_len:16909060:"8401020304":4:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 222 | |
| 223 | ASN.1 Write Named Bitstring / Unused bits #0 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 224 | test_asn1_write_bitstrings:"FF":8:"030200FF":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 225 | |
| 226 | ASN.1 Write Named Bitstring / Unused bits #1 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 227 | test_asn1_write_bitstrings:"FE":8:"030201FE":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 228 | |
| 229 | ASN.1 Write Named Bitstring / Unused bits #2 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 230 | test_asn1_write_bitstrings:"FC":7:"030202FC":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 231 | |
| 232 | ASN.1 Write Named Bitstring / Unused bits #3 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 233 | test_asn1_write_bitstrings:"F8":8:"030203F8":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 234 | |
| 235 | ASN.1 Write Named Bitstring / Unused bits #4 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 236 | test_asn1_write_bitstrings:"F0":6:"030204F0":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 237 | |
| 238 | ASN.1 Write Named Bitstring / Unused bits #5 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 239 | test_asn1_write_bitstrings:"E0":6:"030205E0":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 240 | |
| 241 | ASN.1 Write Named Bitstring / Unused bits #6 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 242 | test_asn1_write_bitstrings:"C0":8:"030206C0":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 243 | |
| 244 | ASN.1 Write Named Bitstring / Unused bits #7 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 245 | test_asn1_write_bitstrings:"80":8:"03020780":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 246 | |
| 247 | ASN.1 Write Named Bitstring / Empty bitstring |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 248 | test_asn1_write_bitstrings:"00":7:"030100":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 249 | |
| 250 | ASN.1 Write Named Bitstring / Empty bitstring (bits = 16) |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 251 | test_asn1_write_bitstrings:"0000":16:"030100":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 252 | |
| 253 | ASN.1 Write Named Bitstring / Empty bitstring (bits = 24) |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 254 | test_asn1_write_bitstrings:"FFFFFF":0:"030100":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 255 | |
| 256 | ASN.1 Write Named Bitstring / 15 trailing bits all unset |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 257 | test_asn1_write_bitstrings:"F88000":24:"030307F880":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 258 | |
| 259 | ASN.1 Write Named Bitstring / 15 trailing bits all set |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 260 | test_asn1_write_bitstrings:"F8FFFF":9:"030307F880":1 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 261 | |
| 262 | ASN.1 Write Bitstring / Unused bits #0 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 263 | test_asn1_write_bitstrings:"FF":8:"030200FF":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 264 | |
| 265 | ASN.1 Write Bitstring / Unused bits #1 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 266 | test_asn1_write_bitstrings:"FF":7:"030201FE":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 267 | |
| 268 | ASN.1 Write Bitstring / Unused bits #2 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 269 | test_asn1_write_bitstrings:"FF":6:"030202FC":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 270 | |
| 271 | ASN.1 Write Bitstring / Unused bits #3 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 272 | test_asn1_write_bitstrings:"FF":5:"030203F8":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 273 | |
| 274 | ASN.1 Write Bitstring / Unused bits #4 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 275 | test_asn1_write_bitstrings:"FF":4:"030204F0":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 276 | |
| 277 | ASN.1 Write Bitstring / Unused bits #5 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 278 | test_asn1_write_bitstrings:"FF":3:"030205E0":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 279 | |
| 280 | ASN.1 Write Bitstring / Unused bits #6 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 281 | test_asn1_write_bitstrings:"FF":2:"030206C0":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 282 | |
| 283 | ASN.1 Write Bitstring / Unused bits #7 |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 284 | test_asn1_write_bitstrings:"FF":1:"03020780":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 285 | |
| 286 | ASN.1 Write Bitstring / 1 trailing bit (bits 15) |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 287 | test_asn1_write_bitstrings:"0003":15:"0303010002":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 288 | |
| 289 | ASN.1 Write Bitstring / 0 bits |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 290 | test_asn1_write_bitstrings:"":0:"030100":0 |
Andres Amaya Garcia | 5d26163 | 2018-09-26 10:51:16 +0100 | [diff] [blame] | 291 | |
| 292 | ASN.1 Write Bitstring / long string all bits unset except trailing bits |
Gilles Peskine | 3f37dca | 2019-03-01 19:30:20 +0100 | [diff] [blame] | 293 | test_asn1_write_bitstrings:"000000000007":45:"030703000000000000":0 |