This is a long shot, but I have been trying to convert a .ctrk file which has been downloaded from a Yamaha Motorbike Data logger to a readable format.
If I open the file with Notepad++ there is some readable text, mostly the GPRMC data which I can convert to GPS coordinates, speed, time, etc... however the file 'should' also contain 18(i think) other data points(Lean angles, engine RPMs, G forces etc...).
In Notepad++ the data between the GPRMC data just shows as Start of headers, Null, Escape characters,(ENO,DC4,EOT,STX) and such like.
RAW data in Hex
24 47 50 52 4D 43 2C 30 34 32 37 32 35 2E 38 30 30 2C 41 2C 33 33 34 38 2E 32 33 31 38 2C 53 2C 31 35 30 35 32 2E 32 31 31 30 2C 45 2C 30 2E 30 32 2C 32 37 36 2E 35 38 2C 32 30 30 32 31 35 2C 2C 2C 44 2A 37 35 0D 0A 01 00 19 00 C6 02 19 1B 04 05 14 02 DF 07 09 02 00 00 06 0D A9 00 06 00 80 01 00 1B 00 EA 02 19 1B 04 05 14 02 DF 07 11 05 00 00 08 96 7C 50 6A 58 2C 60 10 01 00 1B 00 EA 02 19 1B 04 05 14 02 DF 07 1B 05 00 00 08 FF FF FF FF 80 00 00 00 01 00 1A 00 FE 02 19 1B 04 05 14 02 DF 07 26 02 00 00 07 0C E8 E8 EB E8 28 40 01 00 1B 00 0C 03 19 1B 04 05 14 02 DF 07 15 02 00 00 08 00 06 00 01 F3 22 06 00 01 00 1B 00 0F 03 19 1B 04 05 14 02 DF 07 58 02 00 00 08 52 16 B1 7B 00 00 75 46 01 00 1B 00 13 03 19 1B 04 05 14 02 DF 07 60 02 00 00 08 00 02 00 93 00 00 00 8C 01 00 17 00 1D 03 19 1B 04 05 14 02 DF 07 64 02 00 00 04 00 00 00 00 01 00 19 00 1D 03 19 1B 04 05 14 02 DF 07 68 02 00 00 06 00 00 00 00 04 00 01 00 1B 00 23 03 19 1B 04 05 14 02 DF 07 50 02 00 00 08 1B 48 1B 0A 1F 40 20 00 02 00 56 00 26 03 19 1B 04 05 14 02 DF 07 24 47 50 52 4D 43 2C 30 34 32 37 32 35 2E 39 30 30 2C 41 2C 33 33 34 38 2E 32 33 31 38 2C 53 2C 31 35 30 35 32 2E 32 31 31 30 2C 45 2C 30 2E 30 32 2C 32 37 36 2E 35 38 2C 32 30 30 32 31 35 2C 2C 2C 44 2A 37 34
Any ideas how I'd go about decoding this data which I'm assuming is a proprietary format. I have no idea where to start.
Thanks
James
Data in Hex editor
[1]:https://imgur.com/a/A7hlqH5
Related
I have a raw H265 video file. I want to understand the exact mechanism to tell which bytes are separating every frame and another, in order to send it over the network to be decoded by a remote app.
I have a faint understanding about NAL units, and I tried to grasp what CSD-0, CSD-1, SPS, VPS, PPS are, but I couldn't put two and two together. I tried dividing the entire byte sequence of the file (they call it a bitstream I think) to chunks, on every incidence of a NAL header (00 00 00 01) but the result are just undecodable bytearrays, none of them corresponds to an actual frame.
So, what am I missing ? I welcome any code in any programming language as I have a broad understanding of a variety of languages, what matters here is the algorithm that is used to detect frames in a byte sequence of a raw H265 video file.
This is a small snippet of the bytearrays I obtain if I divide the entire file using only NAL headers. I noticed some patterns but I can never guess which sequence is actually starting a full frame.
00 00 00 01 44 00 E0 7E B0 26 40
00 00 00 01 26 00 AF 1F 80 05 67 73 37 09 4C 84 00 3C E9 03 39 91 14 5D F2 5A 95 B9 81 25 27 00 61 29 DF 00 00 6B 4A 00 19 AC 86 12 D3 00 5E 28 C5 1E D0 00 20 CD 6A 44 3F 8A 3E 11 FD 00 A9 7D 00 00 6C 50 D9 4F 6E F1 00 7C AE 46 E6 9F DC 51 9B 5F 2A 52 02 00 3A FF 00 69 00 6F 00 F5 16 94 00 E8 CB B8 00 E3 30 98 00 FB 31 00 0F 34 21 00 00 49 18 65 D4 76 00 00 47 00 D8 BC 00 00 42 C2 BA 00 9D 64 00 F7 DE EE 00 00 2C 00 58 A5 C6 A1 D1 9C 55 00 74 C7 9E ED 00 B6 00 41 00 E4 00 00 00 BB 00 F8 DB 3B 00 70 8F 00 96 24 F6 00 15 53 77 AD 2F 00 00 7B 00 B2 40 D7 B4 72 0A 00 7A C1 85 EC 00 00 2E 62 BD A2 8D 00 00 A0 00 00 00 00 00 FE 00 00 00 57 DA 00 97 00 00 C3 A4 00 45 00 0B 00 00 00 FA 07 00 00 00 EB 00 00 B7 71 00 C8 00 00 00 88 17 00 00 00 00 00 00 60 00 00 4D 00 00 00 00 00 00 00 56 00 00 00 33 00 00 00 00 00 13 00 00 32 00 AA 00 00 00 F4 00 2B 00 00 B5 EA 00 8E 00 00 00 00 00 00 00 00 2D 7E 00 FC 00 00 36 C4 B3 00 00 D2 DD 00 BF 00 75 00 1C 00 00 00 00 00 00 00 00 99 00 00 00 00 48 00 00 00 00 00 00 00 00 0D 68 00 00 00 AB 00 93 00 4B 3D 90 6D 00 00 00 00 C9 BE 00 00 00 00 23 00 00 00 00 00 00 92 00 00 00 22 00 00 00 00 00 00 00 00 00 00 87 00 00 00 00 5C 00 00 00 00 00 00 00 00 00 00 00 83 00 00 4E 00 00 00 00 00 00 00 43 00 00 00 00 00 00 00 00 00 00 04 00 00 00 82 00 35 00 10 00 00 00 00 CF 00 00 00 00 00 00 00 00 00 00 08 CE 00 E5 00 00 00 00 00 00 00 00 00 8C 00 A6 00 00 00 00 00 00 00 EF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F3 63 00 B0 00 00 00 00 00 00 00 E2 00 A7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5B 00 00 00 B1 00 00 00 00 00 00 00 66 00 00 1D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CC D5 00 00 00 00 00 00 00 E7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 00 00 00 59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F9 00 00 00 00 00 00 00 00 00 54
00 00 00 01 00 00 00 3E 06 00 00 00 00 00 00
00 00 00 01 02 00 D0 0D C4 1F 80 43 68 04 81 7F 49 2C 0A 52 22 CE 00 8C 00 6E 7A 6F A4 00 3F E5 A5 F0 A7 79 4B 08 67 2E 90 00 F6 72 1A 6D 14 16 53 32 24 EC A6 D6 00 87 33 55 65 27 C7 00 A0 91 ED 3C 13 00 00 60 00 11 8D CB 8A 00 CD 00 EA BA BE 00 E8 82 FC CF 23 61 D5 00 D4 B3 96 C1 00 FA 00 EB 00
00 00 00 01 00 00 00 B8 05 00 00 00 00 00 00
00 00 00 01 02 00 D0 15 C4 1F 80 85 D5 31 F3 B7 C0 E8 4F A3 3E 79 54 E3 45 5A 00 22 91 19 00 1E 30 99 4B 00 A2 AD 81 7C C7 F8 6E FB 46 00 CA EF 39 D8 41 56 A8 00 D3 98 00 A0 71 5E 3C 94 28 16 11 3B 00 A9 00 ED 53 32 74 33 57 2D 35 00 72 FC D4 A4 97 00 00 5C AB 58 0B FF 66 0D 00 CB 29 DF 26 00 64 1D 96 00 D9 00 AA 00 00 3A 00 8C 88 4E 03 DA 00 00 00 7F 04 5B 9A CD B0 FE 93 8F 2F 00 00 EC B6 37 00 77 17 6F 00 2C 9F F2 F5 00 4A 00 BD 00 00 00 2B 00 00 00 00 00 0E 00 E9 00 00 00 00 00 00 DD 00 73 00 00 E0 8A 00 00 00 DB 00 00 A6 B8 B4 78 FA 00 C3 D1 00 00 00 84 00 75 00 E4 00 B1 8B 00 C5 60 E2 7D 00 B3 C9 00 00 00 00 05 6A 00 00 00 3F 00 A5 00 1C 00 2E 00 5D E5 E7 00 61 47 00 00 00 00 00 5F 0C 00 BC 00 00 00 00 00 00 BF 00 00 14 00 BE F1 7E 40 CE 00 6B 95 00 00 00 00 34 4C AE C2 8D 00 00 00 00 00 00 00 C1 00 00 00 AC 00 00 00 50 00 00 00 00 00 00 00 B9 00 00 00 07 00 00 00 00 00 00 00 00 00 25 00 00 00 00 00 82 00 00 00 CC 9E 00 00 00 00 00 68 00 00 3D 00 00 00 00 00 EE 00 BA 00 00 38 00 00 55 00 00 87 42 00 CF 00 00 00 00 1A 00 00 00 00 00 6D 00 EB F4 00 00 00 A7 00 00 D7 00 00 00 00 00 00 00 00 70 00 00 00 00 00 00 00 00 00 00 00 36 B2 00 00 EA 00 00 00 00 00 00 00 4D 00 00 00 00 00 00 00 00 00 00 9D 00 00 00 00 00 00 00 00 65 00 00 83 00 00 00 00 51 00 00 20 67 27 89 00 00 00 00 00 00 00 E6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 00 00 86 00 00 00 9B 00 00 00 00 F7 13 00 00 00 00 00 00 00 1B 00 00 00 00 43 7B 00 00 00 00 00 00 00 00 00 E1 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2A 00 00 00 49 00 00 00 00 00 76 00 00 00 00 00 00 24 00 00 00 00 00 00 C8 F6 00 00 00 00 00 00 00 00 00 00 00 00 00 09 AF F9 9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00 00 00 00 00 8E 00 00 00 00 00 00 00 FD 00 00 00 00 00 00 00 00 00 00 00 12 00 00 00 00 00 00 63 00 00 00 00 00 00 00 00 00 62 00 00 00 00 00 00 00 00 00 00 59 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 01 00 00 00 28 06 00 00 00 00 00 00
00 00 00 01 02 00 D0 1D C4 1F 80 75 07 BB FC 82 83 7D 42 60 3D E1 05 70 E8 16 F6 DE F2 35 00 84 6E 54 0B 8C AB 17 46 1A 25 95 EA B4 00 00 26 5A 00 11 BA B3 E9 76 00 9E C3 00 2F 00 7A 56 91 13 DC 9A D4 19 6B 00 B5 00 A6 62 AF EB 38 66 2A 4C 00 C7 08 00 00 5C E0 BE 14 2C 00 5F 21 00 00 00 00 00 4E 00 0C 79 00 00 15 00 00 58 97 00 00 4A 53 00 0F 41 E7 99 AC 00 F1 00 EF 2E C2 51 C6 DA 00 23 00 CA 47 72 00 92 00 E3 28 AE 00 00 00 20 00 00 00 00 00 6C 93 06 10 55 00 00 00 F5 32 00 00 CC 27 7E 24 00 AA 00 00 45 00 00 00 7F CD 00 00 00 BF 00 88 00 00 85 ED BD AD 00 29 00 52 C5 FB 73 00 12 34 B6 00 00 00 00 6A 30 00 DF 43 00 00 D5 00 DD 5D A2 00 C1 E4 00 00 61 00 00 F0 F8 8A 00 49 00 00 CF 00 D6 87 A7 00 00 9F 00 00 00 00 9B 00 0D 00 00 C8 7C 00 00 A0 00 B7 74 3F 00 03 64 00 00 D3 EE 00 00 00 FE 00 E2 00 00 69 00 00 B8 00 00 67 78 00 0E 00
00 00 00 01 00 00 00 33 05 00 00 00 00 00 00
00 00 00 01 02 00 D0 25 C4 1F 80 05 D7 E3 8E F0 CE 0E 7B B3 CC AC F1 35 5A C8 AE A4 5D 00 7A 00 37 4A A7 6F FE 45 FB 00 ED 82 00 DF 00 92 4D F8 A8 AB 77 8C 47 44 9F 86 91 A9 7E 04 84 00 0D A6 00 38 62 00 BC F7 6B 3A 00 00 00 D9 6A 00 32 B6 19 00 DC 68 24 00 78 D2 6C C6 A2 48 0A 22 BB 00 6E B7 00 E8 1A 00 D1 0F C5 CB 6D 7D 14 C7 87 00 00 F5 1B 55 00 BD 00 06 00 00 00 F9 D6 4B E1 34 9E 4F 03 85 16 0B B9 00 C2 00 00 E5 00 D8 3F 5C F4 00 2B 3C 00 00 97 00 00 00 23 70 C3 00 00 D4 00 49 00 B0 00 2F DD 00 F3 A1 50 2D 00 00 00 63 71 00 BA 00 00 00 26 7C 07 E7 41 00 3D 00 00 00 00 00 00 00 00 00 00 C1 59 00 39 D3 00 00 27 00 00 00 81 5E 00 FC 00 72 00 10 00 00 00 00 00 00 00 00 00 29 00 00 00 BF 9D 00 00 00 00 3E 0C 00 00 31 CD 00 00 00 89 00 00 00 00 17 00 00 00 00 58 54 00 00 00 93 C0 30 00 5B 00 00 00 00 00 CF 00 46 67 00 00 00 E6 00 00
00 00 00 01 00 00 00 51 05 00 00 00 00 00 00
00 00 00 01 02 00 D0 2D C4 1F 80 06 40 BB 39 79 5A 11 50 9C 94 46 66 49 00 88 84 5F 98 03 19 67 85 6E 9B 26 C8 B1 00 05 FA 54 00 70 D2 0F E4 37 C2 6F F8 00 82 F5 4A 8E 72 F0 00 0D 2B 71 CC A2 33 A7 DF C9 00 00 4C EB AD 00 7A 89 E3 2A F4 0B 4F 00 00 29 E9 00 00 00 18 B9 00 00 DB 76 00 00 00 00 74 BC 5C 75 E2 00 24 34 27 56 F6 00 C5 D3 36 00 00 00 E8 00 00 A4 E1 00 00 43 45 47 69 90 00 B2 FB 1C A0 9E 57 CF 00 2E C6 BF A9 00 0A 00 00 00 68 35 22 14 FE 00 00 16 EF 55 20 00 09 EA 00 8A D5 83 00 00 0E DA 25 00 EE 60 91 00 00 B5 00 4D 00 00 1E 00 07 00 00 F9 00 5B 00 00 00 00 1B 00 00 00 00 00 3B 00 AE A1 1D D4 00 42 00 C3 00 00 61 C7 00 52 00 38 23 63 DD CB 00 F3 00 00 D1 00 00 59 00 00 00 00 00 EC 00 92 00 3C 51 00 00 00 00 00 7B E0 00 00 00 00 9A 00 28 C1 00 00 00 00 00 D6 41 00 FC 00 4E 00 00 00 00 00 00 00 13 00 00 00 00 F1 64 5E 00 00 8B 00 F7 00 65 00 00 A5 58 00 AC 00 B7 BA 00 3E 00 00 D8 9D BE 00 00 00 00 00 00 00 00 00 00 00 00 7D 21 00 FF 7F 00 5D 00 00 00 00 00 F2 15 00 00 B8 00 00 00 00 00 B3 00 00 00 00 00 99 AB 00 00 00 00 7E 00 00 FD 00 00 00 00 00 A3 00 00 08 93 00 00 00 3A 00 00 00 6A 00 00 73 00 AA 00 00 3D 00 00 62 00 00 00 9F 00 44 00 00 00 00 00 00 00 00 00 77 00 00 12 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 95 00 00 10 00 00 00 CD 00 00 A8 00 00 00 00 3F 00 00 00 00 00 B4 A6 00 00 00 00 00 00 00 D9 00 00 2F 00 53 00 00 00 00 00 00 DE 00 00 00 00 00 00 00 00 00 2C 00 00 00 00 00 E5 00 00 00 00 00 00 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6C 00 00 00 00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 01 00 00 00 53 09 00 00 00 00 00 00
00 00 00 01 02 00 D0 35 C4 08 E0 58 27 15 C1 8D 04 C7 00 71 6E A4 2B 00 CF 99 A3 13 14 C3 00 EE 29 00 00 9D 54 40 20 31 FF 00 00 F7 AF B3 FC 00 DB F9 18 00 6D 00 CE 56 C6 55 00 37 CA EC 00 7B 00 1D 00 8B 00 00 00 00 00 E9 87 0C AC 00 17 65 E3 EF FD DF 57 88 70 0B 3D E5 8E 9C B1 4F 7F 8C D5 11 BB F8 98 2F 64 00 9F 43 E8 30 A1 07 CB 00 36 CC 00 B9 2A 00 00 00 00 B4 F0 BE 00 E4 52 26 ED D2 00 4A 22 00 00 00 A2 00 00 00 3C 06 B0 F3 E7 00 00 00 9A 3B 24 00 1B 00 61 E2 90 00 96 00 00 00 00 00 00 00 69 62 E1 4C 6C 21 00 84 81 89 00 3A 00 91 5F 79 00 00 53 00 97 1A 46 00 00 00 00 86 00 A5 00 C2 00 00 00 CD 00 42 BC 00 00 FE 2E 00 00 EA D7 72 95 D1 1F 1E 94 41 00 0F 00 A9 00 00 00 6B 49 00 00 19 00 00 00 12 8A 00 00 00 00 00 00 00 00 00 00 F2 DC 00 F1 00 00 00 00 00 00 E6 00 FB BD 00 00 00 AA B7 C5 32 C0 4D 00 00 00 00 A8 0A 00 00 00 4B 00 FA 00 00 00 00 92 2D 00 25 00 00 83 D8 00 45 1C 00 BA 47 F5 44 00 73 60 00 77 00 00 7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 85 00 23 3F 00 00 00 00 A7 00 00 00 00 00 00 00 A6 00 4E 00 5E 00 00 00 00 00 00 D9 0D 00 00 00 00 00 00 00 00 03 DD 00 00 00 48 00 00 00 00 00 00 00 00 00 A0 00 00 63 00 00 00 00 00 00 00 AE 00 00 00 5A 93 00 00 00 80 00 10 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 66 00 00 00 00 00 00 05 00 DA 00 AB 00 74 00 00 00 00 00 00 00 00 00 9E 00 59 00 00 00 00 00 00 B2 00 3E 00 00 00 00 8F 00 AD 38 00
00 00 00 01 00 00 00 0B 08 00 00 00 00 00 00
00 00 00 01 02 00 D0 3D C4 08 E0 FC 99 48 A5 72 18 EF E8 97 FF 87 68 7E 9C A4 52 00 1B 58 E9 4A B1 1D 15 F8 00 00 23 00 D2 54 3A E3 64 04 00 BF DB C9 C6 8B 55 5B CF BB 0F D9 73 33 80 9A 00 ED 4C 00 60 00 00 00 00 2D A0 53 00 25 2C 00 00 7B 92 69 00 59 B5 00 0B 5A 42 62 28 75 F5 81 00 00 A3 79 94 F0 50 9F 9D 14 A1 D1 00 00 00 00 00 00 00 00 B7 00 00 00 F6 CC 1C D7 00 00 19 00 8A 3F 00 41 00 35 8E 00 B9 9E E6 00 7A CE A7 13 43 00 00 B0 00 6F 00 D4 BA 5F 65 AA 00 00 00 00 DF 00 00 06 00
00 00 00 01 00 00 00 8C 08 00 00 00 00 00 00
00 00 00 01 02 00 D0 45 C4 08 E0 4A 13 83 00 DE 66 A4 F9 F1 2C 2E B2 D4 E3 F7 3D FF 8C DF 4B A9 00 C6 72 5C 65 90 8A AB 00 C3 9D 74 8B 81 C8 D1 09 0D 19 00 30 0C BB 00 17 3A 00 00 C5 E1 E5 AD 24 59 64 7F 82 C9 FC BE A8 D8 A7 52 1D 95 D2 7C 85 00 53 97 D9 CC 42 F2 A0 14 B5 0E 5E 1B CE 70 37 00 00 22 F3 00 92 23 40 07 96 93 54 00 3E 00 E6 BF A3 75 5A DA F8 00 E9 00 A1 68 78 21 61 00 91 7D 6F 6E 00 51 C0 9E 04 71 00 00 8E 67 33 00 00 46 00 00 00 55 41 BC 4C 00 76 3C 00 0B B4 00 CF 00 00 00 00 00 00 00 36 00 79 2A 5D 27 00 00 00 11 00 00 89 F5 B3 E8 06 94 00 4E 00 00 4D 00 F0 00 00 00 D5 00 00 00 00 00 00 00 00 00 00 3B 00 00 9F 8D 2F 03 E7 00 00 6B 00 00 26 00 00 86 AC 9B 00 2B 00 3F 00 00 00 00 35 00 00 EE 8F 00 34 00 00 00 56 87 00 FA 00 00 48 00 00 00 00 00 00 00 00 00 E2 38 00 EA 05 00 00 00 00 1A 10 6C 00 00 00 00 00 00 00 00 00 00 00 57 00 00 00 AE 00 00 00 00 00 00 00 00 00 00 D6 00 15 00 00 00 58 00 00 00 00 98 00 00 00 5F 00 00 00 00 1E 69 29 00 00 43 00 CA 32 00 00 00 00 00 00 00 00 00 00 44 D7 00 00 B9 AF 00 00 00 00 00 00 00 00 9A 00 00 00 00 DC 00 00 00 00 00 00 00 00 00 80 00 16 A5 00 00 00 00 00 6D 00 EB 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 B6 00
00 00 00 01 00 00 00 43 08 00 00 00 00 00 00
00 00 00 01 02 00 D0 4D C4 08 E0 73 90 C8 4A 46 3B 83 F9 27 00 AE 6D 77 97 5F D2 BB B7 00 04 AC 60 57 76 A6 00 22 CE A9 2A 3E EF FF 8D C9 4C 1C 51 20 00 00 C7 F1 E6 10 17 E8 86 00 6B E9 F3 6C 7B 6A 4E DB 70 A5 2B 0A AA 1B 82 5A 9F 00 2F 09 71 ED 00 00 36 00 18 00 D7 E3 CC A4 00 56 00 62 45 A8 42 B5 C5 00 00 00 DF 05 00 2D FE 00 B6 21 25 D3 00 00 00 E5 00 3D 03 FC D4 11 9D 49 00 CB 00 00 0E 2E 53 00 FD 0F F2 00 D9 00 00 00 30 3F 0B 00 00 7E 88 12 00 95 C2 A1 07 6E F6 00 5D 47 DA AF 00 CD B1 00 E7 00 00 00 00 16 8F EA 00 00 06 00 00 F0 BE 00 00 00 B3 00 00 37 68 93 14 C6 00 33 00 69 00 AD 00 00 C0 00 00 00 F7 00 A3 8C 3C 00 15 C3 94 00 00 00 00 00 00 00 1A F8
00 00 00 01 00 00 00 AA 37 00 00 00 00 00 00
00 00 00 01 40 00 0C 00 FF 00 00 60 00 00 03 00 00 00 00 00 00 00 00 00 00 96 AC 00 00 00 00 00 04 00 00 00 00 29 A0
00 00 00 01 42 00 00 00 60 00 00 03 00 00 00 00 00 00 00 00 00 00 96 A0 0B 08 04 85 00 B9 24 C9 AE 59 CD C1 81 00 00 00 00 00 00 0A 00 00 00 00 64 00
00 00 00 01 44 00 E0 7E B0 26 40
00 00 00 01 26 00 AF 1F 80 05 67 5C CE 4A 0C 42 B8 29 A0 3F DE 25 7B 72 57 BB BE 9D 5A F6 CD E6 D9 35 54 B3 8F FB BD 23 1B 00 2E AC AA 03 00 6F A4 CC 8C 8E 00 65 22 8B 7F F0 1E 6C 91 00 1A 00 00 FF F1 C9 98 00 00 2B 00 E8 81 A9 3E 4D 96 99 5D 00 2A 00 00 C3 00 00 A8 00 33 6B 00 32 D5 B2 E9 E2 00 F8 00 02 00 46 EA CF DB 00 F5 7C C0 00 00 B1 00 00 00 00 40 76 1C 3C 62 3D 5B 4B 79 00 00 EF 8D 07 58 11 50 00 00 0E 36 48 20 00 53 00 38 00 82 00 0D FE 00 DF D4 4C 85 34 00 83 F4 00 E3 00 00 D6 F3 00 6D 00 51 9C 14 70 60 00 13 56 00 E5 21 00 00 00 00 12 00 00 00 00 C7 09 77 4E CB C2 00 00 B5 00 30 D3 66 00 00 00 00 0F D8 D0 00 00 00 24 00 C5 00 00 F7 00 61 9F 00 A7 00 00 00 00 00 00 31 74 00 FC 00 71 E0 00 EE 00 27 00 9B 00 00 E7 00 00 00 BA 00 00 00 00 00 00 64 00 08 00 00 00 00 17 00 0B B4 00 D1 00 00 00 B9 00 00 F9 00 00 00 00 00 9E 00 EB
00 00 00 01 00 00 00 B5 05 00 00 00 00 00 00
00 00 00 01 02 00 D0 0D C4 1F 80 72 AA B7 BF C0 B9 E2 41 96 13 00 BC D1 50 FC 79 20 46 C8 EF 2B 7E 00 71 4E 00 DB DC 22 37 8E F6 6F A6 00 00 67 12 47 B4 17 57 00 D8 5B 65 00 00 2D 83 34 6C 89 5E 4D 55 25 9A 7C 84 B8 00 9D 00 28 2A 3E 00 A1 00 E6 88 63 FB 00 45 76 D4 00 00 00 00 44 00 78 4B 32 D6 00 74 00 B5 60 00 09 00 C2 00 00 00 00 E4 53 00 11 3B 64 93 A4 77 CD 29 00 00 5C 75 7D 6E CE 00 69 00 90 1E 03 8A F3 00 00 B1 00 00 99 00 8C 6D CA 3F 00 9C E3 9B 35 D7 00 51 00 00 AB 97 FF 00 00 B3 8D 00 85 00 00 00 00 0E 58 06 00 00 00 FE 00 00 33 00 F1 91 00 00 00 66 BA A3 00 2E F9 00 48 86 00 00 1A 87 E9 00 04 AE 00 B0 3A 30 CB 54 00 00 EB F5 00 00 00 00 00 E1 00 00 00 00 00 00 7F C3 00 BD 00 00 00 08 00 00 52 00 E0 00 00 00 00 F2 26 00 EE EC 00 00 00 00 24 F7 00 81 16 00 00 00 00 00 70 00 00 00 00 00 15 00 00 00 00 43 00 00 38 00 00 00 00 1D 62 C9 00 00 00 00 00 F0 00 3D 00 00 0F 6B 00 00 A0 00 00 00 BB 00 00 00 00 00 2F 00 19 00 00 C7 00 00 61 00 00 00 00 10 00 00 94 00 00 00 ED 49 4A 00 00 56 00 00 00 00 00 00 00 00 00 00 A9 A8 00 00 00 00 00 00 0C 00 00 68 A2 00 00 00 40 59 A7 C1 00 7A 00 00 00 00 00 00
00 00 00 01 00 00 00 EC 05 00 00 00 00 00 00
I am trying to connect an openssl client to a server. I'm using the following command:
openssl s_client -cipher "AES256" -connect 15.213.94.8:6433 -msg
The Output is:
CONNECTED(00000003)
>>> TLS 1.2 Handshake [length 00ce], ClientHello
01 00 00 ca 03 03 f1 77 45 36 0d 10 84 27 a3 11
04 81 07 78 84 39 46 a2 de 44 53 8b b9 01 fd 57
14 d9 fe 67 61 ab 00 00 34 c0 30 c0 2c c0 28 c0
24 c0 14 c0 0a 00 a3 00 9f 00 6b 00 6a 00 39 00
38 c0 19 00 a7 00 6d 00 3a c0 32 c0 2e c0 2a c0
26 c0 0f c0 05 00 9d 00 3d 00 35 00 ff 01 00 00
6d 00 0b 00 04 03 00 01 02 00 0a 00 34 00 32 00
0e 00 0d 00 19 00 0b 00 0c 00 18 00 09 00 0a 00
16 00 17 00 08 00 06 00 07 00 14 00 15 00 04 00
05 00 12 00 13 00 01 00 02 00 03 00 0f 00 10 00
11 00 23 00 00 00 0d 00 20 00 1e 06 01 06 02 06
03 05 01 05 02 05 03 04 01 04 02 04 03 03 01 03
02 03 03 02 01 02 02 02 03 00 0f 00 01 01
<<< TLS 1.2 Handshake [length 0051], ServerHello
02 00 00 4d 03 03 5a ce f7 9f 32 15 3b 2b 7e 75
8d 02 6f ff e9 d1 44 e4 6f 05 cd 1c ec 70 0c 7c
d2 05 d2 b5 27 f5 20 6a 45 e2 43 62 20 e9 48 0e
aa fc 7e 2e c4 5b c6 0a 6d dd 7d b6 71 7d 05 a0
4c 60 09 61 1d 24 69 00 6b 00 00 05 ff 01 00 01
00
<<< TLS 1.2 Handshake [length 033f], Certificate
0b 00 03 3b 00 03 38 00 03 35 30 82 03 31 30 82
02 9a a0 03 02 01 02 02 04 5a cc 5e 97 30 0d 06
09 2a 86 48 86 f7 0d 01 01 05 05 00 30 81 dc 31
10 30 0e 06 03 55 04 0a 13 07 6e 73 73 74 73 31
34 31 34 30 32 06 03 55 04 0b 13 2b 47 65 6e 65
72 61 74 65 64 20 54 75 65 20 41 70 72 20 31 30
20 31 32 3a 31 39 3a 35 36 20 55 54 43 2b 2d 35
3a 2d 20 32 30 31 38 31 23 30 21 06 03 55 04 0b
13 1a 4e 6f 20 41 73 73 75 72 61 6e 63 65 20 2d
20 53 65 6c 66 2d 53 69 67 6e 65 64 31 3c 30 3a
06 03 55 04 0b 13 33 54 65 73 74 69 6e 67 20 4f
6e 6c 79 20 2d 20 44 6f 20 4e 6f 74 20 54 72 75
73 74 20 66 6f 72 20 53 65 63 75 72 65 20 54 72
61 6e 73 61 63 74 69 6f 6e 73 31 2f 30 2d 06 03
55 04 03 13 26 53 65 63 75 72 65 20 54 72 61 6e
73 70 6f 72 74 20 42 6f 6f 74 73 74 72 61 70 20
43 65 72 74 69 66 69 63 61 74 65 30 1e 17 0d 31
38 30 34 31 30 30 36 34 39 35 39 5a 17 0d 31 38
30 37 30 39 30 36 34 39 35 39 5a 30 81 dc 31 10
30 0e 06 03 55 04 0a 13 07 6e 73 73 74 73 31 34
31 34 30 32 06 03 55 04 0b 13 2b 47 65 6e 65 72
61 74 65 64 20 54 75 65 20 41 70 72 20 31 30 20
31 32 3a 31 39 3a 35 36 20 55 54 43 2b 2d 35 3a
2d 20 32 30 31 38 31 23 30 21 06 03 55 04 0b 13
1a 4e 6f 20 41 73 73 75 72 61 6e 63 65 20 2d 20
53 65 6c 66 2d 53 69 67 6e 65 64 31 3c 30 3a 06
03 55 04 0b 13 33 54 65 73 74 69 6e 67 20 4f 6e
6c 79 20 2d 20 44 6f 20 4e 6f 74 20 54 72 75 73
74 20 66 6f 72 20 53 65 63 75 72 65 20 54 72 61
6e 73 61 63 74 69 6f 6e 73 31 2f 30 2d 06 03 55
04 03 13 26 53 65 63 75 72 65 20 54 72 61 6e 73
70 6f 72 74 20 42 6f 6f 74 73 74 72 61 70 20 43
65 72 74 69 66 69 63 61 74 65 30 81 9f 30 0d 06
09 2a 86 48 86 f7 0d 01 01 01 05 00 03 81 8d 00
30 81 89 02 81 81 00 a0 80 77 3c 87 c4 f2 a0 23
ea 3c c2 03 90 e5 1f 07 2b da e0 3a 54 4f 54 b1
1b 99 07 e3 31 e8 fc ea c0 2c 1b 3b b1 2c b2 81
dc 52 4f 01 6c 86 72 26 e9 2f e5 51 e9 88 5f c5
da 74 1e 9c b2 f1 29 ce b2 b9 b3 af 1a 64 ce 47
df 5b 6b 0c b1 ad 2d 05 9e bf 97 42 a9 26 e9 92
f7 6c 15 23 bd fa 94 2f e6 54 2e 27 d3 dd ef 92
7e 3a 21 55 98 db 65 63 6c 3f ca a1 3b d7 e6 5e
09 77 0d 40 dc ad 5f 02 03 01 00 01 30 0d 06 09
2a 86 48 86 f7 0d 01 01 05 05 00 03 81 81 00 6e
18 05 ad 39 bc 64 47 b6 50 56 c2 6e da 4a db a4
f9 10 9a 86 63 4f 99 b5 36 93 7b 7a 59 78 b2 21
d7 50 a1 18 cc 08 81 a4 13 8e ce d5 03 13 0b 53
97 76 80 6b b2 3f e2 15 ad ca b4 ac fa 49 a5 70
e2 d8 5a 3e 43 eb 3d 28 7e 27 47 a7 df 27 e2 5a
29 1a 6a ba ef 32 56 fe 0f f5 00 dc fe 6c af fb
df c7 fe 0c b2 93 d9 99 6e 03 ae f7 9b cc 43 6f
7c 85 d8 65 11 96 fc a1 4b ee 25 d4 e6 0a 8c
depth=0 O = nssts99, OU = "Generated Tue Apr 10 12:19:56 UTC+-5:- 2018", OU = No Assurance - Self-Signed, OU = Testing Only - Do Not Trust for Secure Transactions, CN = Secure Transport Bootstrap Certificate
verify error:num=18:self signed certificate
verify return:1
depth=0 O = nssts99, OU = "Generated Tue Apr 10 12:19:56 UTC+-5:- 2018", OU = No Assurance - Self-Signed, OU = Testing Only - Do Not Trust for Secure Transactions, CN = Secure Transport Bootstrap Certificate
verify return:1
<<< TLS 1.2 Handshake [length 020e], ServerKeyExchange
0c 00 02 0a 00 80 84 cd 7a 4d c7 91 c6 75 30 c3
05 c9 d9 04 d4 4c 20 a5 52 e2 52 0e f1 7d 0c 3c
6a 98 75 91 ac 51 17 a5 45 1a 58 90 8e af 2b ac
29 f9 bd 39 33 a1 bd b2 cc 91 5b d6 49 19 98 fa
d4 b7 e7 7e 58 35 6c 83 fc 4b 63 e6 e9 96 aa 83
2b 44 f4 be fa dc c0 31 fa 61 58 49 bf 2f bc f5
82 b0 ab 8f b2 1d b4 87 a2 6e 3b e6 15 ef 5b fc
77 29 88 a7 5f fa 0d 9f 91 9e 25 33 21 c4 fa d6
5a 2b e9 dc 1f 17 00 80 42 93 80 8f 55 ab e4 1b
71 a2 d2 ec 93 5b 37 c5 71 36 cc 4f ab 06 d8 8f
63 48 23 2f f3 d6 34 e0 d5 f7 7a e6 f8 2e 0b 94
12 0b 4f d7 62 1c 9d 33 83 c5 cd 7c b0 c8 24 76
19 be a5 50 12 c7 77 e6 a8 85 53 18 36 e4 4d 4b
27 0b 0a 73 4a b6 33 8b 47 9c 94 d3 be b2 02 35
72 b0 15 62 26 b6 04 8e 73 2e eb e4 39 ea 14 8f
cd f8 28 16 74 20 02 30 cc 26 5f 16 c7 f2 92 7f
6d e0 cd 31 aa 60 93 d6 00 80 84 af 04 c2 f5 45
6c c6 a0 87 89 cd b3 dd 68 79 fe 4f ba c5 e2 db
0e 32 12 36 14 e9 e6 a3 ca 3f 87 bf 6a 89 32 f3
68 14 50 b1 b0 50 3f 3a ee 79 72 53 c7 3c 2c 5b
86 0e 2d e6 c3 15 d4 03 8a 6b 1f 03 05 89 88 9a
0a d9 ea 4c 3c 7a c7 8f af 40 b2 c8 a3 fe b2 db
43 e7 0e b3 4b b9 43 03 f6 97 46 33 57 ec fe 64
de f2 3b 60 b8 09 7e 5d 02 b0 51 21 4e 05 22 08
f6 ee 0d 27 2e 47 89 6a 9f e5 06 01 00 80 53 af
c7 d1 d3 63 d3 19 5f 3e a6 10 47 4c c5 dc 36 f8
7e 4d d0 a3 ce 1b 42 a8 cc 54 01 ac fc 95 85 3e
75 11 6d 2f 9a a0 67 65 e9 3e f2 f6 c2 00 91 4b
48 9d 8c 83 4b d7 a7 37 83 29 10 5d 2d f5 d8 4e
28 23 8e 7a e8 b6 23 75 3b 57 8d 3a 69 62 8a db
69 86 a4 79 5e 2c d0 0a e6 41 7c b4 38 a4 11 6e
f1 10 93 06 ae 23 3c 32 8f 9d 7b 19 25 44 1c cb
91 ea c5 89 a6 58 c8 bf c8 f0 ee 94 cd ce
<<< TLS 1.2 Handshake [length 0004], ServerHelloDone
0e 00 00 00
>>> TLS 1.2 Handshake [length 0086], ClientKeyExchange
10 00 00 82 00 80 10 95 d8 9b 00 89 95 f2 b6 2e
a5 98 00 88 fa 1b 42 5c ac 75 33 42 1c 0f 32 e7
d6 c7 95 81 07 e0 23 e5 bf d2 99 4a f6 16 81 31
95 64 59 c0 2f b8 52 08 16 e2 45 08 0a df 65 25
b5 5d 2d 7e e6 bb 46 d3 29 a5 74 1a d9 d1 99 57
c0 ea af d4 2f 22 14 5b 8a fa f6 b9 32 15 fe 32
2b b7 a1 82 b8 08 b6 9b 3d e2 7b 33 71 89 f2 48
7e 4d 82 24 e4 14 96 86 d5 db 0c c1 55 03 6a ff
bc 16 58 f1 b6 bc
>>> TLS 1.2 ChangeCipherSpec [length 0001]
01
>>> TLS 1.2 Handshake [length 0010], Finished
14 00 00 0c 52 16 05 75 ee db 9a 44 dc cc 6c bf
<<< TLS 1.2 ChangeCipherSpec [length 0001]
01
<<< TLS 1.2 Handshake [length 0010], Finished
14 00 00 0c 70 6b 32 0a 7e d5 ae 05 64 8b 88 ac---
Certificate chain
0 s:/O=nssts99/OU=Generated Tue Apr 10 12:19:56 UTC+-5:-2018/OU=No Assurance
Self-Signed/OU=Testing Only - Do Not Trust for Secure Transactions/CN=Secure
i:/O=nssts99/OU=Generated Tue Apr 10 12:19:56 UTC+-5:- 2018/OU=No Assurance
Self-Signed/OU=Testing Only - Do Not Trust for Secure Transactions/CN=Secure
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDMTCCApqgAwIBAgIEWsxelzANBgkqhkiG9w0BAQUFADCB3DEQMA4GA1UEChMH
bnNzdHMxNDE0MDIGA1UECxMrR2VuZXJhdGVkIFR1ZSBBcHIgMTAgMTI6MTk6NTYg
VVRDKy01Oi0gMjAxODEjMCEGA1UECxMaTm8gQXNzdXJhbmNlIC0gU2VsZi1TaWdu
bmNlIC0gU2VsZi1TaWduZWQxPDA6BgNVBAsTM1Rlc3RpbmcgT25seSAtIERvIE5v
dCBUcnVzdCBmb3IgU2VjdXJlIFRyYW5zYWN0aW9uczEvMC0GA1UEAxMmU2VjdXJl
l0KpJumS92wVI736lC/mVC4n093vkn46IVWY22VjbD/KoTvX5l4Jdw1A3K1fAgMB
AAEwDQYJKoZIhvcNAQEFBQADgYEAbhgFrTm8ZEe2UFbCbtpK26T5EJqGY0+ZtTaT
e3pZeLIh11ChGMwIgaQTjs7VAxMLU5d2gGuyP+IVrcq0rPpJpXDi2Fo+Q+s9KH4n
R6ffJ+JaKRpquu8yVv4P9QDc/myv+9/H/gyyk9mZbgOu95vMQ298hdhlEZb8oUvu
JdTmCow=
-----END CERTIFICATE-----
subject=/O=nssts14/OU=Generated Tue Apr 10 12:19:56 UTC+-5:- 2018/OU=No
Assurance - Self-Signed/OU=Testing Only - Do Not Trust for Secure Transactions/CN=Secure
issuer=/O=nssts14/OU=Generated Tue Apr 10 12:19:56 UTC+-5:- 2018/OU=No Assurance - Self-Signed/OU=Testing Only - Do Not Trust for Secure Transactions/CN=Secure
No client certificate CA names sent
SSL handshake has read 1569 bytes and written 441 bytes
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA256
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : DHE-RSA-AES256-SHA256
Session-ID: 6A45E2436220E9480EAAFC7E2EC45BC60A6DDD7DB6717D05A04C6009611D2469
Session-ID-ctx:
Master-Key:
3DDDE131C8480BC508F529263A14648AE2F6DFE9D3687AB6A9E5803D77E9FFF7
3C81B2BB836E1FAB4987EE67D0B238A0
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1523513247
Timeout : 300 (sec)
Verify return code: 18 (self signed certificate)
-------------------------------------------------
Above,it says Renegotiation Is Supported. Now when I give R as input for "Renegotiation" I get the following output:
R
RENEGOTIATING
>>> TLS 1.2 Handshake [length 00dd], ClientHello
01 00 00 d9 03 03 5b 61 2b 1f e8 81 a3 04 04 3b
d1 d0 b5 f6 11 6f 2c 73 72 ac 04 62 8d 84 a9 e5
fb bf 8e 2d 0e cb 00 00 32 c0 30 c0 2c c0 28 c0
24 c0 14 c0 0a 00 a3 00 9f 00 6b 00 6a 00 39 00
38 c0 19 00 a7 00 6d 00 3a c0 32 c0 2e c0 2a c0
26 c0 0f c0 05 00 9d 00 3d 00 35 01 00 00 7e ff
01 00 0d 0c 52 16 05 75 ee db 9a 44 dc cc 6c bf
00 0b 00 04 03 00 01 02 00 0a 00 34 00 32 00 0e
00 0d 00 19 00 0b 00 0c 00 18 00 09 00 0a 00 16
00 17 00 08 00 06 00 07 00 14 00 15 00 04 00 05
00 12 00 13 00 01 00 02 00 03 00 0f 00 10 00 11
00 23 00 00 00 0d 00 20 00 1e 06 01 06 02 06 03
05 01 05 02 05 03 04 01 04 02 04 03 03 01 03 02
03 03 02 01 02 02 02 03 00 0f 00 01 01
<<< TLS 1.2 Alert [length 0002], warning close_notify
01 00
1825587648:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake
failure:/home/ravi/101jssl-h01/openssl-1.0.1j/ssl/s3_pkt.c:615:
Why is it giving a ssl3_write_bytes error and handshake failure?
From the log it is obvious that server does not deal the first message "TLS 1.2 Handshake [length 00dd], ClientHello" properly and does not send the ServerHello message, so it sends an alert which notifies the close of connection to client. The client receives the alert message, and calls ssl3_write_bytes to deal this message. And current status is still in TLS renegotiation. So the handshake function will be called, and give out an error as received message is not expected. This is very clear in code
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
{
const unsigned char *buf=buf_;
unsigned int n,nw;
int i,tot;
s->rwstate=SSL_NOTHING;
OPENSSL_assert(s->s3->wnum <= INT_MAX);
tot=s->s3->wnum;
s->s3->wnum=0;
if (SSL_in_init(s) && !s->in_handshake)
{
i=s->handshake_func(s);
if (i < 0) return(i);
if (i == 0)
{
SSLerr(SSL_F_SSL3_WRITE_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
return -1;
}
}
......
I am setting up the https connection of my AEM application in a RHEL server hosted in AWS. Followed the documentation provided by Adobe. For the 1st author instance it worked successfully, but on my 2nd server and 3 server, it didnt.
I tried a couple of debugging to make sure that the connectivity is working and that no firewalls are blocking.
When I tried to openssl in debug mode I got the following:
It just hangs and doesn't proceed to the next one like in the 1st server:
2nd Server (with Issue):
openssl s_client -connect localhost:5433 -debug -msg
CONNECTED(00000003)
write to 0xfb16d0 [0xff5270] (249 bytes => 249 (0xF9))
0000 - 16 03 01 00 f4 01 00 00-f0 03 03 57 fe bd 40 06 ...........W..#.
0010 - 00 bf 15 c5 e0 83 79 18-b4 a3 f8 f0 2f b6 a8 70 ......y...../..p
0020 - b7 4f fc 48 6f e6 c6 0a-ef 08 de 00 00 84 c0 30 .O.Ho..........0
0030 - c0 2c c0 28 c0 24 c0 14-c0 0a 00 a3 00 9f 00 6b .,.(.$.........k
0040 - 00 6a 00 39 00 38 00 88-00 87 c0 32 c0 2e c0 2a .j.9.8.....2...*
0050 - c0 26 c0 0f c0 05 00 9d-00 3d 00 35 00 84 c0 2f .&.......=.5.../
0060 - c0 2b c0 27 c0 23 c0 13-c0 09 00 a2 00 9e 00 67 .+.'.#.........g
0070 - 00 40 00 33 00 32 c0 12-c0 08 00 9a 00 99 00 45 .#.3.2.........E
0080 - 00 44 00 16 00 13 c0 31-c0 2d c0 29 c0 25 c0 0e .D.....1.-.).%..
0090 - c0 04 c0 0d c0 03 00 9c-00 3c 00 2f 00 96 00 41 .........<./...A
00a0 - 00 0a 00 07 c0 11 c0 07-c0 0c c0 02 00 05 00 04 ................
00b0 - 00 ff 01 00 00 43 00 0b-00 04 03 00 01 02 00 0a .....C..........
00c0 - 00 08 00 06 00 19 00 18-00 17 00 23 00 00 00 0d ...........#....
00d0 - 00 22 00 20 06 01 06 02-06 03 05 01 05 02 05 03 .". ............
00e0 - 04 01 04 02 04 03 03 01-03 02 03 03 02 01 02 02 ................
00f0 - 02 03 01 01 00 0f 00 01-01 .........
>>> TLS 1.2 Handshake [length 00f4], ClientHello
01 00 00 f0 03 03 57 fe bd 40 06 00 bf 15 c5 e0
83 79 18 b4 a3 f8 f0 2f b6 a8 70 b7 4f fc 48 6f
e6 c6 0a ef 08 de 00 00 84 c0 30 c0 2c c0 28 c0
24 c0 14 c0 0a 00 a3 00 9f 00 6b 00 6a 00 39 00
38 00 88 00 87 c0 32 c0 2e c0 2a c0 26 c0 0f c0
05 00 9d 00 3d 00 35 00 84 c0 2f c0 2b c0 27 c0
23 c0 13 c0 09 00 a2 00 9e 00 67 00 40 00 33 00
32 c0 12 c0 08 00 9a 00 99 00 45 00 44 00 16 00
13 c0 31 c0 2d c0 29 c0 25 c0 0e c0 04 c0 0d c0
03 00 9c 00 3c 00 2f 00 96 00 41 00 0a 00 07 c0
11 c0 07 c0 0c c0 02 00 05 00 04 00 ff 01 00 00
43 00 0b 00 04 03 00 01 02 00 0a 00 08 00 06 00
19 00 18 00 17 00 23 00 00 00 0d 00 22 00 20 06
01 06 02 06 03 05 01 05 02 05 03 04 01 04 02 04
03 03 01 03 02 03 03 02 01 02 02 02 03 01 01 00
0f 00 01 01
Server 1 (without issue):
>>> TLS 1.2 Handshake [length 00f4], ClientHello
01 00 00 f0 03 03 57 fe cb 7b 28 ba ea e1 89 71
ad fb 1d 8b 97 e9 83 2b dc e4 53 c5 bf 75 8f 58
74 42 63 29 6b 20 00 00 84 c0 30 c0 2c c0 28 c0
24 c0 14 c0 0a 00 a3 00 9f 00 6b 00 6a 00 39 00
38 00 88 00 87 c0 32 c0 2e c0 2a c0 26 c0 0f c0
05 00 9d 00 3d 00 35 00 84 c0 2f c0 2b c0 27 c0
23 c0 13 c0 09 00 a2 00 9e 00 67 00 40 00 33 00
32 c0 12 c0 08 00 9a 00 99 00 45 00 44 00 16 00
13 c0 31 c0 2d c0 29 c0 25 c0 0e c0 04 c0 0d c0
03 00 9c 00 3c 00 2f 00 96 00 41 00 0a 00 07 c0
11 c0 07 c0 0c c0 02 00 05 00 04 00 ff 01 00 00
43 00 0b 00 04 03 00 01 02 00 0a 00 08 00 06 00
19 00 18 00 17 00 23 00 00 00 0d 00 22 00 20 06
01 06 02 06 03 05 01 05 02 05 03 04 01 04 02 04
03 03 01 03 02 03 03 02 01 02 02 02 03 01 01 00
0f 00 01 01
read from 0x17796d0 [0x17c27d0] (7 bytes => 7 (0x7))
0000 - 16 03 03 06 35 02 ....5.
0007 - <SPACES/NULS>
read from 0x17796d0 [0x17c27da] (1587 bytes => 1587 (0x633))
0000 - 00 4d 03 03 57 fe cb 7b-51 64 70 bc 08 c8 91 24 .M..W..{Qdp....$
0010 - c4 da 8c cf 94 94 7d c5-0f 45 ee 2c 86 99 1d ff ......}..E.,....
0020 - b6 a9 3e 66 20 57 fe cb-7b e7 b2 a4 56 15 3b 46 ..>f W..{...V.;F
0030 - 98 92 b4 95 56 7f 95 4e-4e f3 cd ce d8 cd 98 29 ....V..NN......)
0040 - c7 fe 1e 6f 8b 00 9f 00-00 05 ff 01 00 01 00 0b ...o............
0050 - 00 03 cd 00 03 ca 00 03-c7 30 82 03 c3 30 82 02 .........0...0..
0060 - ab a0 03 02 01 02 02 04-6e 0d a4 0f 30 0d 06 09 ........n...0...
0070 - 2a 86 48 86 f7 0d 01 01-0b 05 00 30 81 91 31 0b *.H........0..1.
This is MTU problem
Change MTU size
ifconfig ens160 mtu 1400
Its your firewall. You need to add a route or rule from the source Default GW to the target IP address.
When a csr is signed , I get crt file and then convert to pem. Is there a way to sign csr to get pem directly (one step without conversion)?
I tried "$ openssl ca ... -out cert.pem", but the generated "cert.pem" is still in crt format, i.e. it has human-readable portion before "-----BEGIN CERTIFICATE-----".
Thank you.
You need to use the outform parameter, which isn't available on all openssl commands, it is available in the x509 directive and req. If you are looking to create a self-signed certificate you can do it all in one line:
openssl req -outform PEM -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout mysitename.key -out mysitename.pem
Here is a difference between DER and PEM I created on the fly, see the difference?:
# cat mysitename.pem
-----BEGIN CERTIFICATE-----
MIIDtTCCAp2gAwIBAgIJANR/b/eOXlq+MA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQwHhcNMTQwMTAxMDYyNDAxWhcNMTUwMTAxMDYyNDAxWjBF
MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEAy92lHaC8sP6UkeoaoLH6xKOxQtrvtWmP6myqy100T/TAv7QqJnVzbDXd
ukfMCPRa4WVXi/dOtXUqqfpsGj0+I35A4P5ygVqErgBxtTXI7UGtPV7cVQ5JfaV+
F+Sj3EiDmil6sHy+0JZ7u3smg88QRCtelFJLbR+hnA4y1NaGY2wmmVtdzCTCkCQn
/BlLZhOV/TMzjZmBQj6/+f4vSMYH9OJ6CXVt7ylCWpy81zSv/tuv8Zmx8YJthJo1
6iiRjmL0Y78RykhAtbjMFe3tCeEuJsK8uzjmKipJXYNWFHl/hcXemVPfKbkqzkR0
fqVKVRpjXw/ZH03RAmUgrfIH6eVAZwIDAQABo4GnMIGkMB0GA1UdDgQWBBQTa5hF
UxN2WrOqoPebd31iLe6XNzB1BgNVHSMEbjBsgBQTa5hFUxN2WrOqoPebd31iLe6X
N6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV
BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJANR/b/eOXlq+MAwGA1UdEwQF
MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBACTRFbVO7tOn3PP0UCVX1k9xbRfj7ZUa
CuA6rFoDp8JogV8LZWeqPtiNjycaml94Wcc5z9cahvN/3sobfZ8yiYRUgkke5kor
el8R/I4u4X3BObU6Se66WCEuNQYj367gsa4HXju538zIw+i7oOIxbu1DI4UKxG/r
jCJAC7lXyl9c/sxPYqg3nSp7CAfqwqBlHoBCbAOzSvUfMxFwf5pGc2YVK8Q8c+pW
pVlDBroOKmCjLc9JAmJG4TQ2mADpGu0LY398trMOQJWhSV4x++tDYlw0mnV8rPF2
7bhKz11mZEsFPaJ1UAbthOYWCl2MvVJf9pmah5VEoXUyM+gw9LfeXW8=
-----END CERTIFICATE-----
# hexdump mysitename2.der
00 01 02 03 04 05 06 07 - 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF
00000000 30 82 03 B5 30 82 02 9D - A0 03 02 01 02 02 09 00 0...0...........
00000010 AE E1 5C 32 AA 72 47 CC - 30 0D 06 09 2A 86 48 86 ..\2.rG.0...*.H.
00000020 F7 0D 01 01 05 05 00 30 - 45 31 0B 30 09 06 03 55 .......0E1.0...U
00000030 04 06 13 02 41 55 31 13 - 30 11 06 03 55 04 08 13 ....AU1.0...U...
00000040 0A 53 6F 6D 65 2D 53 74 - 61 74 65 31 21 30 1F 06 .Some-State1!0..
00000050 03 55 04 0A 13 18 49 6E - 74 65 72 6E 65 74 20 57 .U....Internet W
00000060 69 64 67 69 74 73 20 50 - 74 79 20 4C 74 64 30 1E idgits Pty Ltd0.
00000070 17 0D 31 34 30 31 30 31 - 30 36 32 37 30 36 5A 17 ..140101062706Z.
00000080 0D 31 35 30 31 30 31 30 - 36 32 37 30 36 5A 30 45 .150101062706Z0E
00000090 31 0B 30 09 06 03 55 04 - 06 13 02 41 55 31 13 30 1.0...U....AU1.0
000000A0 11 06 03 55 04 08 13 0A - 53 6F 6D 65 2D 53 74 61 ...U....Some-Sta
000000B0 74 65 31 21 30 1F 06 03 - 55 04 0A 13 18 49 6E 74 te1!0...U....Int
000000C0 65 72 6E 65 74 20 57 69 - 64 67 69 74 73 20 50 74 ernet Widgits Pt
000000D0 79 20 4C 74 64 30 82 01 - 22 30 0D 06 09 2A 86 48 y Ltd0.."0...*.H
000000E0 86 F7 0D 01 01 01 05 00 - 03 82 01 0F 00 30 82 01 .............0..
000000F0 0A 02 82 01 01 00 B3 00 - 17 31 F1 CD 97 CB AE 68 .........1.....h
00000100 0C 9D 62 82 75 CF 78 C3 - 23 68 EF 57 8A 65 EB C1 ..b.u.x.#h.W.e..
00000110 37 0D 28 78 94 43 BF 1C - 18 FE 03 DB CC 0E D8 08 7.(x.C..........
00000120 AE CB B2 32 2F A4 F0 69 - E7 04 4B 98 93 DB CB 94 ...2/..i..K.....
00000130 A1 3B 9C 9F C8 2B 37 DB - 3B AD F9 15 79 55 D7 8B .;...+7.;...yU..
00000140 58 8A 5E 92 DC C5 2F B4 - C2 90 E5 58 C8 3E 6D 33 X.^.../....X.>m3
00000150 BA 67 B6 6D 83 03 01 F6 - B9 DB 71 0B 10 13 56 B2 .g.m......q...V.
00000160 F8 42 6F F7 AE 57 86 AA - AE AF D8 BF 39 9E 62 A0 .Bo..W......9.b.
00000170 14 1B D9 5E F4 22 76 0B - 44 58 D1 B2 E8 87 6C 3B ...^."v.DX....l;
00000180 72 7F D5 E2 89 26 5C 53 - F3 D4 2F 60 E2 67 C1 09 r....&\S../`.g..
00000190 AB 1A 8A 4A 8E 2A C2 07 - C3 CE 02 A3 F8 03 35 E1 ...J.*........5.
000001A0 D8 85 31 11 A6 7B B3 2D - D5 10 9C 74 48 7E 3A 19 ..1..{.-...tH~:.
000001B0 97 FD 89 4C 2E A8 0F 2E - CE FC A1 EE 73 41 15 1D ...L........sA..
000001C0 71 63 D3 DF ED DA 2C 5A - 7D 3F F2 06 2D C6 6E 10 qc....,Z}?..-.n.
000001D0 39 D7 6F D3 70 32 4A D8 - CC A3 B8 09 3C 52 62 93 9.o.p2J.....<Rb.
000001E0 2B 6E BF 6E FD D7 FA F7 - 19 3D 7D 6D 7C 20 5D 31 +n.n.....=}m| ]1
000001F0 82 07 CC 6E B1 A1 02 03 - 01 00 01 A3 81 A7 30 81 ...n..........0.
00000200 A4 30 1D 06 03 55 1D 0E - 04 16 04 14 09 A1 46 E7 .0...U........F.
00000210 3A E8 6E 17 95 7B 0D 15 - 66 3D BF 92 6D 5D 41 25 :.n..{..f=..m]A%
00000220 30 75 06 03 55 1D 23 04 - 6E 30 6C 80 14 09 A1 46 0u..U.#.n0l....F
00000230 E7 3A E8 6E 17 95 7B 0D - 15 66 3D BF 92 6D 5D 41 .:.n..{..f=..m]A
00000240 25 A1 49 A4 47 30 45 31 - 0B 30 09 06 03 55 04 06 %.I.G0E1.0...U..
00000250 13 02 41 55 31 13 30 11 - 06 03 55 04 08 13 0A 53 ..AU1.0...U....S
00000260 6F 6D 65 2D 53 74 61 74 - 65 31 21 30 1F 06 03 55 ome-State1!0...U
00000270 04 0A 13 18 49 6E 74 65 - 72 6E 65 74 20 57 69 64 ....Internet Wid
00000280 67 69 74 73 20 50 74 79 - 20 4C 74 64 82 09 00 AE gits Pty Ltd....
00000290 E1 5C 32 AA 72 47 CC 30 - 0C 06 03 55 1D 13 04 05 .\2.rG.0...U....
000002A0 30 03 01 01 FF 30 0D 06 - 09 2A 86 48 86 F7 0D 01 0....0...*.H....
000002B0 01 05 05 00 03 82 01 01 - 00 AE 59 7C 8F A0 F7 75 ..........Y|...u
000002C0 BA 83 63 9F AA A0 7F BF - B4 B1 EC A9 C5 DA 4B 4A ..c...........KJ
000002D0 D9 40 DC 21 1D 1A 3B 98 - D8 ED 21 40 00 98 A1 FA .#.!..;...!#....
000002E0 A6 7A 01 F0 C6 A8 E8 BD - 6E AA F5 FA 45 99 C4 20 .z......n...E..
000002F0 AD C8 C7 E3 81 BC FF CD - 48 1D 01 EC 44 3E A2 05 ........H...D>..
00000300 CD 0D 22 62 3B 85 AB A8 - EA 28 D0 AA 76 06 73 41 .."b;....(..v.sA
00000310 10 6D 7A 1B C9 E2 5B F4 - 93 8F 91 A4 25 1B C7 91 .mz...[.....%...
00000320 C7 31 2A D2 00 86 8A 94 - FE DB 48 87 52 A1 0F 3C .1*.......H.R..<
00000330 BF 2B 1C 32 5C D8 54 AD - 5A 88 31 3A 4C F3 72 37 .+.2\.T.Z.1:L.r7
00000340 30 39 A1 F1 6D 51 2E 4D - 9F D7 50 5C FE A6 91 CA 09..mQ.M..P\....
00000350 03 36 BA 4D 5F C0 48 8C - D4 FB BB 98 F1 85 11 DB .6.M_.H.........
00000360 BC 16 DA 99 52 A7 82 46 - 82 63 8F D3 F7 5F 00 96 ....R..F.c..._..
00000370 E1 C0 A4 CE 18 61 61 E9 - 84 C3 F6 BD B1 12 9D D4 .....aa.........
00000380 FE AF 87 7B 49 25 A4 0C - 51 5E 20 03 EE 32 64 65 ...{I%..Q^ ..2de
00000390 53 4B 8F CF FC AF 07 6F - 54 96 3F BF A8 85 11 D2 SK.....oT.?.....
000003A0 D3 25 51 60 78 1C DD D3 - 75 35 A8 B4 C9 A2 81 30 .%Q`x...u5.....0
000003B0 A4 87 7F A8 91 B4 32 09 - 5C ......2.\
I have an application written in vb.net which listen to a serial port, the following is the bytes I received:
B3 01 33 00 00 00 01
B0 01 33 00 00 00 02
B1 01 33 00 00 00 03
B6 01 33 00 00 00 04
B7 01 33 00 00 00 05
81 01 33 00 00 01 32
B0 01 33 00 00 02 00
82 01 33 00 00 02 32
B1 01 33 00 00 03 00
83 01 33 00 00 03 32
B6 01 33 00 00 04 00
84 01 33 00 00 04 32
B7 01 33 00 00 05 00
I want to get the correct calculation or process. How to get the first byte?
Which is B3, B0, B1 and so on.