TLS handshake failure - ssl

I have an embedded IOT device connected to real time DB FireBase. However, the server cancel the TLS handshake with fatal alert 0x46 = protocol_version. I have managed to get an hex dump of the whole handshake process.
Can someone explain me why the handshake was canceled?
My device is using TLS V1.2 as firebase expected as it can be seen in the header (16 3 3).
Update:
I've noticed that the first 4 bytes in the client random are zero. They need to be a calculated in seconds from 1970AD. There is no internal Time function (like we have in WIN32 or UNIX) and I used br_x509_minimal_set_time() to set the time for the BearSSL
Thanks,
Hexa dump:
Client Hello (Output from my IOT device to the peer)
16 3 1 0 E2 1 0 0 DE 3 3 0 0 0 0 E6 1F 4 48 79 54 47 D3 D7 CB FF C8 69 43 C8 66 7 ED DE 9C AF 96 8C F2 E 97 AD A6 0 0 5A CC A9 CC A8 C0 2B C0 2F C0 2C C0 30 C0 AC C0 AD C0 AE C0 AF C0 23 C0 27 C0 24 C0 28 C0 9 C0 13 C0 A C0 14 C0 2D C0 31 C0 2E C0 32 C0 25 C0 29 C0 26 C0 2A C0 4 C0 E C0 5 C0 F 0 9C 0 9D C0 9C C0 9D C0 A0 C0 A1 0 3C 0 3D 0 2F 0 35 C0 8 C0 12 C0 3 C0 D 0 A 1 0 0 5B FF 1 0 1 0 0 0 0 24 0 22 0 0 1F 69 72 6F 6E 6D 61 78 73 6F 73 62 75 74 74 6F 6E 2E 66 69 72 65 62 61 73 65 69 6F 2E 63 6F 6D 0 D 0 16 0 14 4 3 3 3 5 3 6 3 2 3 4 1 3 1 5 1 6 1 2 1 0 A 0 A 0 8 0 17 0 18 0 19 0 1D 0 B 0 2 1 0
Server hello (Input from the peer)
16 3 3 0 5B 2 0 0 57 3 3 5F DD D0 79 2B C1 D 5C 7 F3 C1 95 A2 D9 36 8C C7 4B DA 9F A2 22 D4 31 CF C9 C1 AB 86 5D CC A2 20 E3 4A 89 12 38 A0 31 D 9A 0 76 D0 E9 AE F2 F 9D 56 4C 36 4E A0 39 A5 AD D1 39 6B 3 33 8F 88 CC A8 0 0 F 0 0 0 0 FF 1 0 1 0 0 B 0 2 1 0
Certificate (Input)
16 3 3 9 FB B 0 9 F7 0 9 F4 0 5 A0 30 82 5 9C 30 82 4 84 A0 3 2 1 2 2 11 0 F0 CB F2 8F DF 22 56 9C 8 0 0 0 0 2F EE 22 30 D 6 9 2A 86 48 86 F7 D 1 1 B 5 0 30 42 31 B 30 9 6 3 55 4 6 13 2 55 53 31 1E 30 1C 6 3 55 4 A 13 15 47 6F 6F 67 6C 65 20 54 72 75 73 74 20 53 65 72 76 69 63 65 73 31 13 30 11 6 3 55 4 3 13 A 47 54 53 20 43 41 20 31 4F 31 30 1E 17 D 32 30 30 32 32 30 31 39 33 36 30 36 5A 17 D 32 31 30 32 31 38 31 39 33 36 30 36 5A 30 68 31 B 30 9 6 3 55 4 6 13 2 55 53 31 13 30 11 6 3 55 4 8 13 A 43 61 6C 69 66 6F 72 6E 69 61 31 16 30 14 6 3 55 4 7 13 D 4D 6F 75 6E 74 61 69 6E 20 56 69 65 77 31 13 30 11 6 3 55 4 A 13 A 47 6F 6F 67 6C 65 20 4C 4C 43 31 17 30 15 6 3 55 4 3 13 E 66 69 72 65 62 61 73 65 69 6F 2E 63 6F 6D 30 82 1 22 30 D 6 9 2A 86 48 86 F7 D 1 1 1 5 0 3 82 1 F 0 30 82 1 A 2 82 1 1 0 DF 51 84 12 1 76 47 89 16 CC BC E2 2E F5 27 E4 D2 44 2D 3A F7 D8 F2 9F F2 44 95 F4 A9 57 F4 D8 B2 66 EB 83 36 1D B5 94 99 A0 21 3E 17 CE 64 5A 61 EB 7F 2F F0 5C BD 44 5A 3 B9 E1 74 A7 BD 28 F0 51 9E 59 CE 98 5B 66 E3 E 1 22 50 A3 AA 9E 57 35 D0 AC 11 F6 2D 58 A7 13 C4 49 FA 3C 89 65 60 6E F9 E8 10 95 71 37 4A FA 11 F 4F 1B FA 7D 8C DB EC 2F 4A D4 EE 2A 86 A5 2F 11 44 85 E3 6B 6E 94 A9 BE 5A C6 FD 30 82 EE BB 2B 3C 69 BD 2B 3A E7 83 15 C1 3C B6 AB AB 62 DC 13 F8 9B 51 41 DF 21 C6 70 BA 4D BD F0 77 60 16 34 56 F CF B5 CF 29 24 46 D 21 6 E6 37 B 4D AE 8E C8 8D 2E 43 7E 81 20 50 2C 70 F6 55 12 2C 7B 1 62 1B B3 2F 66 C1 1D 61 8C 56 13 C B0 90 3A A 2 0 4C 22 1B 33 14 35 DF DD 41 C3 1A 6A 7D EA 3E EC 73 3E 4F FB 5A 46 40 98 10 35 4D 8A 73 AB 3B 63 E9 2 3 1 0 1 A3 82 2 65 30 82 2 61 30 E 6 3 55 1D F 1 1 FF 4 4 3 2 5 A0 30 13 6 3 55 1D 25 4 C 30 A 6 8 2B 6 1 5 5 7 3 1 30 C 6 3 55 1D 13 1 1 FF 4 2 30 0 30 1D 6 3 55 1D E 4 16 4 14 DA 22 8D DC A2 42 AB 7B 5 4A 6E F6 D3 60 3E D2 58 2C 13 42 30 1F 6 3 55 1D 23 4 18 30 16 80 14 98 D1 F8 6E 10 EB CF 9B EC 60 9F 18 90 1B A0 EB 7D 9 FD 2B 30 64 6 8 2B 6 1 5 5 7 1 1 4 58 30 56 30 27 6 8 2B 6 1 5 5 7 30 1 86 1B 68 74 74 70 3A 2F 2F 6F 63 73 70 2E 70 6B 69 2E 67 6F 6F 67 2F 67 74 73 31 6F 31 30 2B 6 8 2B 6 1 5 5 7 30 2 86 1F 68 74 74 70 3A 2F 2F 70 6B 69 2E 67 6F 6F 67 2F 67 73 72 32 2F 47 54 53 31 4F 31 2E 63 72 74 30 2B 6 3 55 1D 11 4 24 30 22 82 E 66 69 72 65 62 61 73 65 69 6F 2E 63 6F 6D 82 10 2A 2E 66 69 72 65 62 61 73 65 69 6F 2E 63 6F 6D 30 21 6 3 55 1D 20 4 1A 30 18 30 8 6 6 67 81 C 1 2 2 30 C 6 A 2B 6 1 4 1 D6 79 2 5 3 30 2F 6 3 55 1D 1F 4 28 30 26 30 24 A0 22 A0 20 86 1E 68 74 74 70 3A 2F 2F 63 72 6C 2E 70 6B 69 2E 67 6F 6F 67 2F 47 54 53 31 4F 31 2E 63 72 6C 30 82 1 3 6 A 2B 6 1 4 1 D6 79 2 4 2 4 81 F4 4 81 F1 0 EF 0 75 0 F6 5C 94 2F D1 77 30 22 14 54 18 8 30 94 56 8E E3 4D 13 19 33 BF DF C 2F 20 B CC 4E F1 64 E3 0 0 1 70 64 50 91 CE 0 0 4 3 0 46 30 44 2 20 2 A0 A AA 37 B4 C9 31 3F E9 41 83 35 63 EF D3 EE 45 E2 D9 CE E4 E E8 A4 1 A2 FC 9C 91 51 F1 2 20 60 2B 2 EB 2E 4D 49 C6 E0 D2 87 33 B0 BA EF 4D 79 A3 BE BA A9 17 92 16 6A 26 4F FC 0 50 5C 51 0 76 0 44 94 65 2E B0 EE CE AF C4 40 7 D8 A8 FE 28 C0 DA E6 82 BE D8 CB 31 B5 3F D3 33 96 B5 B6 81 A8 0 0 1 70 64 50 92 27 0 0 4 3 0 47 30 45 2 20 4D 5 84 E0 5 CA A6 14 51 9D C6 3E 5D 84 D6 A6 84 80 80 C B7 1C DD 46 E2 73 61 40 C1 E3 90 D1 2 21 0 CD 4C B6 65 EE 99 5F B1 BE 1D D6 45 83 C F4 33 AB 5C 84 7B EA AC D0 61 C7 48 F2 CE 44 9C D7 64 30 D 6 9 2A 86 48 86 F7 D 1 1 B 5 0 3 82 1 1 0 93 6B AB 76 2D D2 BB 81 1B 91 28 49 78 BD 8F EB 36 13 E6 6C F2 E4 92 26 68 9 E6 5 8E CB D7 62 6A 3F 1E 97 8C 47 57 AD 46 2E 16 A5 78 27 A3 49 46 F1 AE 76 60 83 C1 BB 75 65 18 9B C7 B5 EA D7 F9 24 4D 90 FC B9 57 ED C1 73 6A 88 EA 41 AB FC C D3 96 39 8E 56 CA A3 A3 45 E9 D6 70 AD 1C E5 15 15 6 74 1E B9 C6 D 51 A AE 31 6F 9 3F 50 69 59 7 43 FF 6E 6B ED 1 A3 1C FD 4E 21 9D 5 EB B8 74 8D A7 43 DB B2 C5 2 79 EB A 8D 1A B9 8 39 E FA 6D 4B 5 92 A6 15 93 FE 87 81 C9 80 AC 56 1 1A D4 7 85 F1 70 FC 76 57 7D EF 7E 78 3D C5 E9 FE F D5 2E D3 B8 27 6 B4 85 58 B2 F5 3F 8B 31 DF F6 AA 5B B AB 3 9C A B2 FB C2 90 AF FB 22 A1 7B 8F 6C 64 F8 C7 B4 85 6A 17 2B 91 CC CB 7 75 7D FE F5 76 C8 D2 9E 8E C1 37 D9 E7 73 CA 3C 7A 4 59 EA 59 C8 93 8B CB 7A 78 51 C0 0 4 4E 30 82 4 4A 30 82 3 32 A0 3 2 1 2 2 D 1 E3 B4 9A A1 8D 8A A9 81 25 69 50 B8 30 D 6 9 2A 86 48 86 F7 D 1 1 B 5 0 30 4C 31 20 30 1E 6 3 55 4 B 13 17 47 6C 6F 62 61 6C 53 69 67 6E 20 52 6F 6F 74 20 43 41 20 2D 20 52 32 31 13 30 11 6 3 55 4 A 13 A 47 6C 6F 62 61 6C 53 69 67 6E 31 13 30 11 6 3 55 4 3 13 A 47 6C 6F 62 61 6C 53 69 67 6E 30 1E 17 D 31 37 30 36 31 35 30 30 30 30 34 32 5A 17 D 32 31 31 32 31 35 30 30 30 30 34 32 5A 30 42 31 B 30 9 6 3 55 4 6 13 2 55 53 31 1E 30 1C 6 3 55 4 A 13 15 47 6F 6F 67 6C 65 20 54 72 75 73 74 20 53 65 72 76 69 63 65 73 31 13 30 11 6 3 55 4 3 13 A 47 54 53 20 43 41 20 31 4F 31 30 82 1 22 30 D 6 9 2A 86 48 86 F7 D 1 1 1 5 0 3 82 1 F 0 30 82 1 A 2 82 1 1 0 D0 18 CF 45 D4 8B CD D3 9C E4 40 EF 7E B4 DD 69 21 1B C9 CF 3C 8E 4C 75 B9 F 31 19 84 3D 9E 3C 29 EF 50 D 10 93 6F 5 80 80 9F 2A A0 BD 12 4B 2 E1 3D 9F 58 16 24 FE 30 9F B 74 77 55 93 1D 4B F7 4D E1 92 82 10 F6 51 AC C C3 B2 22 94 F 34 6B 98 10 49 E7 B 9D 83 39 DD 20 C6 1C 2D EF D1 18 61 65 E7 23 83 20 A8 23 12 FF D2 24 7F D4 2F E7 44 6A 5B 4D D7 50 66 B0 AF 9E 42 63 5 FB E0 1C C4 63 61 AF 9F 6A 33 FF 62 97 BD 48 D9 D3 7C 14 67 DC 75 DC 2E 69 E8 F8 6D 78 69 D0 B7 10 5 B8 F1 31 C2 3B 24 FD 1A 33 74 F8 23 E0 EC 6B 19 8A 16 C6 E3 CD A4 CD B DB B3 A4 59 60 38 88 3B AD 1D B9 C6 8C A7 53 1B FC BC D9 A4 AB BC DD 3C 61 D7 93 15 98 EE 81 BD 8F E2 64 47 20 40 6 4E D7 AC 97 E8 B9 C0 59 12 A1 49 25 23 E4 ED 70 34 2C A5 B4 63 7C F9 A3 3D 83 D1 CD 6D 24 AC 7 2 3 1 0 1 A3 82 1 33 30 82 1 2F 30 E 6 3 55 1D F 1 1 FF 4 4 3 2 1 86 30 1D 6 3 55 1D 25 4 16 30 14 6 8 2B 6 1 5 5 7 3 1 6 8 2B 6 1 5 5 7 3 2 30 12 6 3 55 1D 13 1 1 FF 4 8 30 6 1 1 FF 2 1 0 30 1D 6 3 55 1D E 4 16 4 14 98 D1 F8 6E 10 EB CF 9B EC 60 9F 18 90 1B A0 EB 7D 9 FD 2B 30 1F 6 3 55 1D 23 4 18 30 16 80 14 9B E2 7 57 67 1C 1E C0 6A 6 DE 59 B4 9A 2D DF DC 19 86 2E 30 35 6 8 2B 6 1 5 5 7 1 1 4 29 30 27 30 25 6 8 2B 6 1 5 5 7 30 1 86 19 68 74 74 70 3A 2F 2F 6F 63 73 70 2E 70 6B 69 2E 67 6F 6F 67 2F 67 73 72 32 30 32 6 3 55 1D 1F 4 2B 30 29 30 27 A0 25 A0 23 86 21 68 74 74 70 3A 2F 2F 63 72 6C 2E 70 6B 69 2E 67 6F 6F 67 2F 67 73 72 32 2F 67 73 72 32 2E 63 72 6C 30 3F 6 3 55 1D 20 4 38 30 36 30 34 6 6 67 81 C 1 2 2 30 2A 30 28 6 8 2B 6 1 5 5 7 2 1 16 1C 68 74 74 70 73 3A 2F 2F 70 6B 69 2E 67 6F 6F 67 2F 72 65 70 6F 73 69 74 6F 72 79 2F 30 D 6 9 2A 86 48 86 F7 D 1 1 B 5 0 3 82 1 1 0 1A 80 3E 36 79 FB F3 2E A9 46 37 7D 5E 54 16 35 AE C7 4E 8 99 FE BD D1 34 69 26 52 66 7 3D A BA 49 CB 62 F4 F1 1A 8E FC 11 4F 68 96 4C 74 2B D3 67 DE B2 A3 AA 5 8D 84 4D 4C 20 65 F A5 96 DA D 16 F8 6C 3B DB 6F 4 23 88 6B 3A 6C C1 60 BD 68 9F 71 8E EE 2D 58 34 7 F0 D5 54 E9 86 59 FD 7B 5E D 21 94 F5 8C C9 A8 F8 D8 F2 AD CC F 1A F3 9A A7 A9 4 27 F9 A3 C9 B0 FF 2 78 6B 61 BA C7 35 2B E8 56 FA 4F C3 1C C ED B6 3C B4 4B EA ED CC E1 3C EC DC D 8C D6 3E 9B CA 42 58 8B CC 16 21 17 40 BC A2 D6 66 EF DA C4 15 5B CD 89 AA 9B 9 26 E7 32 D2 D 6E 67 20 2 5B 10 B0 90 9 9C C 1F 9E AD D8 3B EA A1 FC 6C E8 10 5C 8 52 19 51 2A 71 BB AC 7A B5 DD 15 ED 2B C9 8 2A 2C 8A B4 A6 21 AB 63 FF D7 52 49 50 D0 89 B7 AD F2 AF FB 50 AE 2F E1 95 D F3 46 AD 9D 9C F5 CA
Server key exchange (Input)
16 3 3 1 2C C 0 1 28 3 0 1D 20 69 4A A 2A 99 52 9D E1 E3 32 BB 19 71 1F CC 9A 31 19 99 9B B 3D 7B 2A 87 E 53 F2 B6 E8 57 56 4 1 1 0 5 D4 B0 F5 6C 91 1C 62 94 8 B3 E F8 CE 21 32 69 A5 1B C5 4 62 64 EA C 7E 0 99 98 FD B1 60 78 78 9D A6 33 72 2E 36 65 71 F6 5 73 1F 34 4D 37 13 71 D A3 6A B7 39 F9 DD A6 F8 37 B 84 E7 62 FE 66 42 98 93 45 5 35 DD 8A B9 2C 29 A 34 D6 22 CA B8 8 FA 5A C7 49 27 F9 47 8F B2 CF FC 51 75 5D 5C 33 EC 28 E F7 EC 70 95 E8 C7 B3 10 2B E9 9 B E B2 B3 7E 3D 53 60 BD 38 99 8E 66 83 A6 9C EF 4F 39 1F 8D 2A 10 6B 6E DE 41 B2 0 37 E9 3 C1 1 FB 43 C6 42 95 AC 40 1 12 9 4 2C BC 29 50 DE 8B BC B5 D1 12 7A 71 B4 7F DB EC CB B0 35 7D 84 8B 60 19 72 5D 70 D FA 7A 4B 1 C1 BA BC BC D 5F 18 43 56 E4 B7 1 75 1E B0 92 C5 5E 9 36 F8 65 EC DE 23 22 79 5F E4 75 FD AB 85 DB DF 25 D9 32 EA D0 4D E5 64 9B 17 EE 8D EE D2 3A 36 3D 97 FB DA 33 FC FD B7 A3 A0 E1 A1 5A
Server hello done (Input)
16 3 3 0 4 E 0 0 0
Client key exchange (Output)
16 3 3 0 25 10 0 0 21 20 4B EA B1 D1 7F 14 56 5D 76 1A 6B 56 B6 93 8B 76 3D EA E5 D2 95 2C C3 1 45 B5 5D F2 4F FF 91 75
Client change cipher spec (Output)
14 3 3 0 1 1
Client handshake finish (Output)
16 3 3 0 20 C4 46 D6 2C 6F A9 E9 E8 E4 BE 7B DA 5F 3E 7F 11 D6 83 31 EA 71 D7 4F CF 5E 62 36 5A F 6 AC 7F
Server fatal alert (Input)
15 3 3 0 2 2 46

Related

Boto's multipart upload API is not working in AWS eu-central-1 region

I am trying to use boto's multipart upload API in my application. But it is failing with
The request signature we calculated does not match the signature you
provided. Check your key and signing method
Here are the error details
import boto
import boto3
s3_conn = boto.s3.connect_to_region('eu-central-1', aws_access_key_id=******, aws_secret_access_key=*****)
buckt = s3_conn.get_bucket('phoenix-4-147757042135')
mpuid = buckt.initiate_multipart_upload('4/5137/data_6000C298-a994-efe2-7e3b-efb3fd5a6c76/FULL/amar')
mpuid.copy_part_from_key('phoenix-4-147757042135', '4/5137/data_6000C298-a994-efe2-7e3b-efb3fd5a6c76/FULL/10000000', 1, 0, 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/boto-2.39.0-py2.6.egg/boto/s3/multipart.py", line 306, in copy_part_from_key
query_args=query_args)
File "/usr/lib/python2.6/site-packages/boto-2.39.0-py2.6.egg/boto/s3/bucket.py", line 889, in copy_key
response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>ASIAIZZPTQJ3AWY3WG2Q</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256
20161110T051801Z
20161110/eu-central-1/s3/aws4_request
bb44a9b3366ce1702d2850188d998eab092746bea906b50481ffe814137efde9</StringToSign><SignatureProvided>2d8b63e0c6f29d602e34ab426bf5704fcaaf6ae15c19550f047931a1da351211</SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 31 36 31 31 31 30 54 30 35 31 38 30 31 5a 0a 32 30 31 36 31 31 31 30 2f 65 75 2d 63 65 6e 74 72 61 6c 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 62 62 34 34 61 39 62 33 33 36 36 63 65 31 37 30 32 64 32 38 35 30 31 38 38 64 39 39 38 65 61 62 30 39 32 37 34 36 62 65 61 39 30 36 62 35 30 34 38 31 66 66 65 38 31 34 31 33 37 65 66 64 65 39</StringToSignBytes><CanonicalRequest>PUT
/4/5137/data_6000C298-a994-efe2-7e3b-efb3fd5a6c76/FULL/amar
partNumber=1&uploadId=PMd350jeac8vLRuC7qf9CEBckNBqXGWdaEL32a.bCw3Zet.K1IInwYmDEEnkU98.xHSnlucJLeis49yMg2M.NoyOdwAVU8VMYcve6Sv5ExJ8Yh9pc7UJrxli5O2p6PqxH83.I_pcIGttaybTT0ul2nwc79DOUSIpKO8TlMosfNI-
host:phoenix-4-147757042135.s3.eu-central-1.amazonaws.com
user-agent:Boto/2.39.0 Python/2.6.6 Linux/2.6.32-431.20.3.el6.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-copy-source:phoenix-4-147757042135/4/5137/data_6000C298-a994-efe2-7e3b-efb3fd5a6c76/FULL/10000000
x-amz-copy-source-range:bytes=0-1
x-amz-date:20161110T051801Z
x-amz-security-token:FQoDYXdzEFYaDOR7x87//+eMX2hqwyK9A6+FKe1SX8gN2bpcbRJPuJxLZC+zP62TnzqoXA1lPvdKhjWpJI0v0UZ46Y+IcvbflIQXq438R8kC5QHJZHLx/fsDC7lPYLuDPA3d43V+cc28cn44pjD34DQpy0RKGMc7GJljZR+ijOb3m8e6bxv4c4kN83Kv+Gs7UBBa5EoGeg4NHN3neNN8g2u68Ad0uouPDV1Wvuiijbfp6ZIaT4LZFbq3mE11ZXiBjQDSDTDcLpO+ek3VCck6bpzquT/jDc8Jzrm6/rS8Giqs/xWLiATa4VqxVXzvbQ2Pu4Tv0kfCU7uc6DWMrBMhejj97s/HKLU0b12mcQ65T+FcieYALPfM4qPf27ZZVsjXWkCzkrMu8qOAblqpVCG15A2snZn0Ke6T7JF6ONGKkr1jSQ3Tv93C5/j6HuQOIcsuRKDLkBLgffOAyIzDzY2xBQvBIABTk0ENcLkgYzNLKsWLFuI3Pry24qcXVCSzXruyEE2neqZp8ohAvVh0WPZOtxmPOTbGgqRn2xEgb3yODAyz7+KOemRvfyGgxBGmvvSnuLrr24vY/6Inm49Q736eT7d5xmzflbLG6cdtBejyKmgttcOpuiEo9f2PwQU=
host;user-agent;x-amz-content-sha256;x-amz-copy-source;x-amz-copy-source-range;x-amz-date;x-amz-security-token
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</CanonicalRequest><CanonicalRequestBytes>50 55 54 0a 2f 34 2f 35 31 33 37 2f 64 61 74 61 5f 36 30 30 30 43 32 39 38 2d 61 39 39 34 2d 65 66 65 32 2d 37 65 33 62 2d 65 66 62 33 66 64 35 61 36 63 37 36 2f 46 55 4c 4c 2f 61 6d 61 72 0a 70 61 72 74 4e 75 6d 62 65 72 3d 31 26 75 70 6c 6f 61 64 49 64 3d 50 4d 64 33 35 30 6a 65 61 63 38 76 4c 52 75 43 37 71 66 39 43 45 42 63 6b 4e 42 71 58 47 57 64 61 45 4c 33 32 61 2e 62 43 77 33 5a 65 74 2e 4b 31 49 49 6e 77 59 6d 44 45 45 6e 6b 55 39 38 2e 78 48 53 6e 6c 75 63 4a 4c 65 69 73 34 39 79 4d 67 32 4d 2e 4e 6f 79 4f 64 77 41 56 55 38 56 4d 59 63 76 65 36 53 76 35 45 78 4a 38 59 68 39 70 63 37 55 4a 72 78 6c 69 35 4f 32 70 36 50 71 78 48 38 33 2e 49 5f 70 63 49 47 74 74 61 79 62 54 54 30 75 6c 32 6e 77 63 37 39 44 4f 55 53 49 70 4b 4f 38 54 6c 4d 6f 73 66 4e 49 2d 0a 68 6f 73 74 3a 70 68 6f 65 6e 69 78 2d 34 2d 31 34 37 37 35 37 30 34 32 31 33 35 2e 73 33 2e 65 75 2d 63 65 6e 74 72 61 6c 2d 31 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 75 73 65 72 2d 61 67 65 6e 74 3a 42 6f 74 6f 2f 32 2e 33 39 2e 30 20 50 79 74 68 6f 6e 2f 32 2e 36 2e 36 20 4c 69 6e 75 78 2f 32 2e 36 2e 33 32 2d 34 33 31 2e 32 30 2e 33 2e 65 6c 36 2e 78 38 36 5f 36 34 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35 0a 78 2d 61 6d 7a 2d 63 6f 70 79 2d 73 6f 75 72 63 65 3a 70 68 6f 65 6e 69 78 2d 34 2d 31 34 37 37 35 37 30 34 32 31 33 35 2f 34 2f 35 31 33 37 2f 64 61 74 61 5f 36 30 30 30 43 32 39 38 2d 61 39 39 34 2d 65 66 65 32 2d 37 65 33 62 2d 65 66 62 33 66 64 35 61 36 63 37 36 2f 46 55 4c 4c 2f 31 30 30 30 30 30 30 30 0a 78 2d 61 6d 7a 2d 63 6f 70 79 2d 73 6f 75 72 63 65 2d 72 61 6e 67 65 3a 62 79 74 65 73 3d 30 2d 31 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 31 36 31 31 31 30 54 30 35 31 38 30 31 5a 0a 78 2d 61 6d 7a 2d 73 65 63 75 72 69 74 79 2d 74 6f 6b 65 6e 3a 46 51 6f 44 59 58 64 7a 45 46 59 61 44 4f 52 37 78 38 37 2f 2f 2b 65 4d 58 32 68 71 77 79 4b 39 41 36 2b 46 4b 65 31 53 58 38 67 4e 32 62 70 63 62 52 4a 50 75 4a 78 4c 5a 43 2b 7a 50 36 32 54 6e 7a 71 6f 58 41 31 6c 50 76 64 4b 68 6a 57 70 4a 49 30 76 30 55 5a 34 36 59 2b 49 63 76 62 66 6c 49 51 58 71 34 33 38 52 38 6b 43 35 51 48 4a 5a 48 4c 78 2f 66 73 44 43 37 6c 50 59 4c 75 44 50 41 33 64 34 33 56 2b 63 63 32 38 63 6e 34 34 70 6a 44 33 34 44 51 70 79 30 52 4b 47 4d 63 37 47 4a 6c 6a 5a 52 2b 69 6a 4f 62 33 6d 38 65 36 62 78 76 34 63 34 6b 4e 38 33 4b 76 2b 47 73 37 55 42 42 61 35 45 6f 47 65 67 34 4e 48 4e 33 6e 65 4e 4e 38 67 32 75 36 38 41 64 30 75 6f 75 50 44 56 31 57 76 75 69 69 6a 62 66 70 36 5a 49 61 54 34 4c 5a 46 62 71 33 6d 45 31 31 5a 58 69 42 6a 51 44 53 44 54 44 63 4c 70 4f 2b 65 6b 33 56 43 63 6b 36 62 70 7a 71 75 54 2f 6a 44 63 38 4a 7a 72 6d 36 2f 72 53 38 47 69 71 73 2f 78 57 4c 69 41 54 61 34 56 71 78 56 58 7a 76 62 51 32 50 75 34 54 76 30 6b 66 43 55 37 75 63 36 44 57 4d 72 42 4d 68 65 6a 6a 39 37 73 2f 48 4b 4c 55 30 62 31 32 6d 63 51 36 35 54 2b 46 63 69 65 59 41 4c 50 66 4d 34 71 50 66 32 37 5a 5a 56 73 6a 58 57 6b 43 7a 6b 72 4d 75 38 71 4f 41 62 6c 71 70 56 43 47 31 35 41 32 73 6e 5a 6e 30 4b 65 36 54 37 4a 46 36 4f 4e 47 4b 6b 72 31 6a 53 51 33 54 76 39 33 43 35 2f 6a 36 48 75 51 4f 49 63 73 75 52 4b 44 4c 6b 42 4c 67 66 66 4f 41 79 49 7a 44 7a 59 32 78 42 51 76 42 49 41 42 54 6b 30 45 4e 63 4c 6b 67 59 7a 4e 4c 4b 73 57 4c 46 75 49 33 50 72 79 32 34 71 63 58 56 43 53 7a 58 72 75 79 45 45 32 6e 65 71 5a 70 38 6f 68 41 76 56 68 30 57 50 5a 4f 74 78 6d 50 4f 54 62 47 67 71 52 6e 32 78 45 67 62 33 79 4f 44 41 79 7a 37 2b 4b 4f 65 6d 52 76 66 79 47 67 78 42 47 6d 76 76 53 6e 75 4c 72 72 32 34 76 59 2f 36 49 6e 6d 34 39 51 37 33 36 65 54 37 64 35 78 6d 7a 66 6c 62 4c 47 36 63 64 74 42 65 6a 79 4b 6d 67 74 74 63 4f 70 75 69 45 6f 39 66 32 50 77 51 55 3d 0a 0a 68 6f 73 74 3b 75 73 65 72 2d 61 67 65 6e 74 3b 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3b 78 2d 61 6d 7a 2d 63 6f 70 79 2d 73 6f 75 72 63 65 3b 78 2d 61 6d 7a 2d 63 6f 70 79 2d 73 6f 75 72 63 65 2d 72 61 6e 67 65 3b 78 2d 61 6d 7a 2d 64 61 74 65 3b 78 2d 61 6d 7a 2d 73 65 63 75 72 69 74 79 2d 74 6f 6b 65 6e 0a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35</CanonicalRequestBytes><RequestId>3EDF2BFB155307CF</RequestId><HostId>q5lLYag9EJC/liFWejbNHWgFPZUDMLG3bBP5xM2+u87HlsO4alkoEu5r7xIcOih+YPcGFeCVJ20=</HostId></Error>
Thanks John Rotenstein & Jordon Phillips for your help.
My issue got resolved by using boto3 for multipart. I was facing above issue with boto for multipart in eu-central-region

"mono nuget.exe push ..." produces invalid multipart PUT request

Using nuget.exe via mono on Mac OS X Yosemite (10.10.3) appears to produce an HTTP PUT request that is missing a carriage-return (CR) just before the final multipart boundary.
mono installed via brew
mono: stable 4.0.1.44 (bottled)
nuget.exe version
NuGet Version: 2.8.60318.667
the following push command
mono nuget.exe push SimplePackage.1.0.0.nupkg -source nuget-hosted
Produces the following multipart content which was captured via Charles
PUT /repository/nuget-hosted/ HTTP/1.0
User-Agent: NuGet Command Line/2.8.60318.667 (Unix 14.3.0.0)
X-NuGet-ApiKey: 79982994-af3c-3bb8-a74f-17e1df492a89
Content-Type: multipart/form-data; boundary=---------------------------8d273112e43fb92
Content-Length: 2371
Host: 127.0.0.1:8081
00000000 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
00000010 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 38 64 32 -------------8d2
00000020 37 33 31 31 32 65 34 33 66 62 39 32 0d 0a 43 6f 73112e43fb92 Co
00000030 6e 74 65 6e 74 2d 44 69 73 70 6f 73 69 74 69 6f ntent-Dispositio
00000040 6e 3a 20 66 6f 72 6d 2d 64 61 74 61 3b 20 6e 61 n: form-data; na
00000050 6d 65 3d 22 70 61 63 6b 61 67 65 22 3b 20 66 69 me="package"; fi
00000060 6c 65 6e 61 6d 65 3d 22 70 61 63 6b 61 67 65 22 lename="package"
00000070 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 Content-Type:
00000080 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6f 63 74 65 application/octe
00000090 74 2d 73 74 72 65 61 6d 0d 0a 0d 0a 50 4b 03 04 t-stream PK
000000a0 14 00 00 00 00 00 ee 40 19 50 33 29 50 0a a6 01 # P3)P
000000b0 00 00 a6 01 00 00 0b 00 00 00 5f 72 65 6c 73 2f _rels/
000000c0 2e 72 65 6c 73 ef bb bf 3c 3f 78 6d 6c 20 76 65 .rels <?xml ve
000000d0 72 73 69 6f 6e 3d 22 31 2e 30 22 3f 3e 3c 52 65 rsion="1.0"?><Re
000000e0 6c 61 74 69 6f 6e 73 68 69 70 73 20 78 6d 6c 6e lationships xmln
000000f0 73 3d 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 s="http://schema
00000100 73 2e 6f 70 65 6e 78 6d 6c 66 6f 72 6d 61 74 73 s.openxmlformats
00000110 2e 6f 72 67 2f 70 61 63 6b 61 67 65 2f 32 30 30 .org/package/200
00000120 36 2f 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 22 6/relationships"
00000130 3e 3c 52 65 6c 61 74 69 6f 6e 73 68 69 70 20 49 ><Relationship I
00000140 64 3d 22 52 65 30 22 20 54 61 72 67 65 74 3d 22 d="Re0" Target="
00000150 2f 53 69 6d 70 6c 65 50 61 63 6b 61 67 65 2e 6e /SimplePackage.n
00000160 75 73 70 65 63 22 20 54 79 70 65 3d 22 68 74 74 uspec" Type="htt
00000170 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 p://schemas.micr
00000180 6f 73 6f 66 74 2e 63 6f 6d 2f 70 61 63 6b 61 67 osoft.com/packag
00000190 69 6e 67 2f 32 30 31 30 2f 30 37 2f 6d 61 6e 69 ing/2010/07/mani
000001a0 66 65 73 74 22 20 2f 3e 3c 52 65 6c 61 74 69 6f fest" /><Relatio
000001b0 6e 73 68 69 70 20 49 64 3d 22 52 65 31 22 20 54 nship Id="Re1" T
000001c0 61 72 67 65 74 3d 22 2f 70 61 63 6b 61 67 65 2f arget="/package/
000001d0 73 65 72 76 69 63 65 73 2f 6d 65 74 61 64 61 74 services/metadat
000001e0 61 2f 63 6f 72 65 2d 70 72 6f 70 65 72 74 69 65 a/core-propertie
000001f0 73 2f 31 2e 70 73 6d 64 63 70 22 20 54 79 70 65 s/1.psmdcp" Type
00000200 3d 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 ="http://schemas
00000210 2e 6f 70 65 6e 78 6d 6c 66 6f 72 6d 61 74 73 2e .openxmlformats.
00000220 6f 72 67 2f 70 61 63 6b 61 67 65 2f 32 30 30 36 org/package/2006
00000230 2f 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 2f 6d /relationships/m
00000240 65 74 61 64 61 74 61 2f 63 6f 72 65 2d 70 72 6f etadata/core-pro
00000250 70 65 72 74 69 65 73 22 20 2f 3e 3c 2f 52 65 6c perties" /></Rel
00000260 61 74 69 6f 6e 73 68 69 70 73 3e 50 4b 03 04 14 ationships>PK
00000270 00 02 00 08 00 1e 43 19 50 3a 26 b1 df a6 01 00 C P:&
00000280 00 53 03 00 00 14 00 00 00 53 69 6d 70 6c 65 50 S SimpleP
00000290 61 63 6b 61 67 65 2e 6e 75 73 70 65 63 85 53 c1 ackage.nuspec S
000002a0 4e e3 30 14 bc f3 15 56 ee c4 2d d2 4a 08 b9 46 N 0 V - J F
000002b0 ab 62 89 ae a2 16 35 e5 1c 19 fb 35 31 c4 76 b0 b 5 51 v
000002c0 9d 5d fa 6d 7b d8 4f da 5f 58 07 27 10 90 56 5c ] m{ O _X ' V\
000002d0 a2 bc 99 79 e3 e7 97 c9 df df 7f c8 f5 8b 6e d1 y n
000002e0 4f 70 5e 59 b3 ca 96 f9 22 43 60 84 95 ca d4 ab Op^Y "C`
000002f0 ac 0f c7 f3 cb ec 9a 9e 91 8e 8b 27 5e 03 8a 6a '^ j
00000300 e3 57 59 13 42 77 85 b1 17 0d 68 ee 73 ad 84 b3 WY Bw h s
00000310 de 1e 43 2e ac c6 49 1b 0d f0 c5 62 b9 c4 8b 4b C. I b K
00000320 6c 7a df 81 c8 5f bc cc e8 19 42 44 43 e0 92 07 lz _ BDC
00000330 3e 14 b1 54 92 96 4a 77 2d dc a5 53 08 8e 48 a2 > T Jw- S H
00000340 c6 c9 68 1c 2c 5f 10 3c 95 89 e4 7d 68 ac f3 f4 h ,_ < }h
00000350 c1 71 f9 00 e2 89 e0 09 49 bc fd 65 e0 03 3d 02 q I e =
00000360 89 6d 95 00 e3 e1 de b5 74 bc 4e b1 59 b3 6d c9 m t N Y m
00000370 aa fb 7d 51 dd b2 3d ab 76 fb ea 86 15 ec c0 aa }Q = v
00000380 c3 ed a6 ac 8a cd 96 11 3c eb 4b 46 9d b3 8f 20 < KF
00000390 c2 cc e8 6e bf fb c1 d6 87 2f 8c 66 7d e3 1e 84 n / f}
000003a0 35 33 97 cd 7a b7 fd c2 62 ea 48 fd 0e 9e 7b e5 53 z b H {
000003b0 a0 48 03 7e 17 02 ba c0 8d 00 7a e4 ad 8f 5b fd H ~ z [
000003c0 2f 9f da 25 78 e1 54 17 86 05 8f 5f 02 cd 30 82 / %x T _ 0
000003d0 e7 82 e9 c4 16 b8 87 ad 0d e0 69 d9 6b cd dd 09 i k
000003e0 d9 23 12 0d 37 35 78 a4 b9 04 a4 0c 0a 8d f2 68 # 75x h
000003f0 14 0f 7c 68 00 8d 91 ca 87 b9 66 2e c9 58 d8 ee |h f. X
00000400 e4 54 dd 04 ba 9e de 50 4c d3 37 82 df 99 a4 0c T PL 7
00000410 bc f6 f4 c0 eb 25 8a 8f 0b 82 5f eb e9 42 1d 18 % _ B
00000420 19 e3 ac 26 df 39 78 42 4a ae b2 92 0f c1 bb 79 & 9xBJ y
00000430 03 b3 4f 3f 03 1e bd f0 67 33 82 df 53 4c c6 cc O? g3 SL
00000440 03 fd 07 50 4b 03 04 14 00 00 00 00 00 b2 45 19 PK E
00000450 50 a1 9f 60 dd 5f 02 00 00 5f 02 00 00 32 00 00 P ` _ _ 2
00000460 00 70 61 63 6b 61 67 65 2f 73 65 72 76 69 63 65 package/service
00000470 73 2f 6d 65 74 61 64 61 74 61 2f 63 6f 72 65 2d s/metadata/core-
00000480 70 72 6f 70 65 72 74 69 65 73 2f 31 2e 70 73 6d properties/1.psm
00000490 64 63 70 ef bb bf 3c 3f 78 6d 6c 20 76 65 72 73 dcp <?xml vers
000004a0 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 ion="1.0" encodi
000004b0 6e 67 3d 22 55 54 46 2d 38 22 3f 3e 3c 63 6f 72 ng="UTF-8"?><cor
000004c0 65 50 72 6f 70 65 72 74 69 65 73 20 78 6d 6c 6e eProperties xmln
000004d0 73 3a 64 63 3d 22 68 74 74 70 3a 2f 2f 70 75 72 s:dc="http://pur
000004e0 6c 2e 6f 72 67 2f 64 63 2f 65 6c 65 6d 65 6e 74 l.org/dc/element
000004f0 73 2f 31 2e 31 2f 22 20 78 6d 6c 6e 73 3a 64 63 s/1.1/" xmlns:dc
00000500 74 65 72 6d 73 3d 22 68 74 74 70 3a 2f 2f 70 75 terms="http://pu
00000510 72 6c 2e 6f 72 67 2f 64 63 2f 74 65 72 6d 73 2f rl.org/dc/terms/
00000520 22 20 78 6d 6c 6e 73 3a 78 73 69 3d 22 68 74 74 " xmlns:xsi="htt
00000530 70 3a 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 32 p://www.w3.org/2
00000540 30 30 31 2f 58 4d 4c 53 63 68 65 6d 61 2d 69 6e 001/XMLSchema-in
00000550 73 74 61 6e 63 65 22 20 78 6d 6c 6e 73 3d 22 68 stance" xmlns="h
00000560 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6f 70 ttp://schemas.op
00000570 65 6e 78 6d 6c 66 6f 72 6d 61 74 73 2e 6f 72 67 enxmlformats.org
00000580 2f 70 61 63 6b 61 67 65 2f 32 30 30 36 2f 6d 65 /package/2006/me
00000590 74 61 64 61 74 61 2f 63 6f 72 65 2d 70 72 6f 70 tadata/core-prop
000005a0 65 72 74 69 65 73 22 3e 3c 64 63 3a 63 72 65 61 erties"><dc:crea
000005b0 74 6f 72 3e 62 72 61 64 62 65 63 6b 3c 2f 64 63 tor>bradbeck</dc
000005c0 3a 63 72 65 61 74 6f 72 3e 3c 64 63 3a 64 65 73 :creator><dc:des
000005d0 63 72 69 70 74 69 6f 6e 3e 50 61 63 6b 61 67 65 cription>Package
000005e0 20 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 64 63 description</dc
000005f0 3a 64 65 73 63 72 69 70 74 69 6f 6e 3e 3c 64 63 :description><dc
00000600 3a 69 64 65 6e 74 69 66 69 65 72 3e 53 69 6d 70 :identifier>Simp
00000610 6c 65 50 61 63 6b 61 67 65 3c 2f 64 63 3a 69 64 lePackage</dc:id
00000620 65 6e 74 69 66 69 65 72 3e 3c 6b 65 79 77 6f 72 entifier><keywor
00000630 64 73 3e 54 61 67 31 20 54 61 67 32 3c 2f 6b 65 ds>Tag1 Tag2</ke
00000640 79 77 6f 72 64 73 3e 3c 6c 61 73 74 4d 6f 64 69 ywords><lastModi
00000650 66 69 65 64 42 79 3e 4e 75 47 65 74 2c 20 56 65 fiedBy>NuGet, Ve
00000660 72 73 69 6f 6e 3d 32 2e 38 2e 36 30 33 31 38 2e rsion=2.8.60318.
00000670 36 36 37 2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 667, Culture=neu
00000680 74 72 61 6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 tral, PublicKeyT
00000690 6f 6b 65 6e 3d 6e 75 6c 6c 3b 55 6e 69 78 20 31 oken=null;Unix 1
000006a0 34 2e 33 2e 30 2e 30 3b 2e 4e 45 54 20 46 72 61 4.3.0.0;.NET Fra
000006b0 6d 65 77 6f 72 6b 20 34 3c 2f 6c 61 73 74 4d 6f mework 4</lastMo
000006c0 64 69 66 69 65 64 42 79 3e 3c 76 65 72 73 69 6f difiedBy><versio
000006d0 6e 3e 31 2e 30 2e 30 3c 2f 76 65 72 73 69 6f 6e n>1.0.0</version
000006e0 3e 3c 2f 63 6f 72 65 50 72 6f 70 65 72 74 69 65 ></corePropertie
000006f0 73 3e 50 4b 03 04 14 00 02 00 08 00 fc 46 19 50 s>PK F P
00000700 c1 13 c7 c6 bf 00 00 00 74 01 00 00 13 00 00 00 t
00000710 5b 43 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e [Content_Types].
00000720 78 6d 6c 8d 90 3d 0e c2 30 0c 85 af 12 65 45 6d xml = 0 eEm
00000730 0a 03 03 ea cf 00 dc 80 0b 44 c1 d0 88 36 b1 62 D 6 b
00000740 b7 2a 67 63 e0 48 5c 81 d0 b2 00 12 ea 68 bf e7 *gc H\ h
00000750 ef 3d f9 71 bb e7 d5 d0 36 a2 87 40 d6 bb 42 2e = q 6 # B.
00000760 d3 4c 56 65 7e b8 22 90 88 8a a3 42 d6 cc b8 51 LVe~ " B Q
00000770 8a 4c 0d ad a6 d4 23 b8 a8 9c 7c 68 35 c7 31 9c L # |h5 1
00000780 15 6a 73 d1 67 50 ab 2c 5b 2b e3 1d 83 e3 84 5f js gP ,[+ _
00000790 0c 59 e6 3b 38 e9 ae 61 b1 9d f6 2f 74 21 35 62 Y ;8 a /t!5b
000007a0 63 8d e6 18 aa 7a 77 fc 82 26 6f 60 1a a0 19 3d c zw &o` =
000007b0 54 5b a4 45 34 48 b1 1f 22 65 2a 1b 55 92 42 cd T[ E4H "e* U B
000007c0 88 f0 86 81 3f 6e 5d 47 08 66 de f5 9f 82 c6 07 ?n]G f
000007d0 48 30 44 35 b0 85 df 8a 48 ed d1 e0 18 a3 c6 a7 H0D5 H
000007e0 96 4f 50 4b 01 02 00 00 14 00 00 00 00 00 ee 40 OPK #
000007f0 19 50 33 29 50 0a a6 01 00 00 a6 01 00 00 0b 00 P3)P
00000800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000810 5f 72 65 6c 73 2f 2e 72 65 6c 73 50 4b 01 02 00 _rels/.relsPK
00000820 00 14 00 02 00 08 00 1e 43 19 50 3a 26 b1 df a6 C P:&
00000830 01 00 00 53 03 00 00 14 00 00 00 00 00 00 00 01 S
00000840 00 00 00 00 00 cf 01 00 00 53 69 6d 70 6c 65 50 SimpleP
00000850 61 63 6b 61 67 65 2e 6e 75 73 70 65 63 50 4b 01 ackage.nuspecPK
00000860 02 00 00 14 00 00 00 00 00 b2 45 19 50 a1 9f 60 E P `
00000870 dd 5f 02 00 00 5f 02 00 00 32 00 00 00 00 00 00 _ _ 2
00000880 00 01 00 00 00 00 00 a7 03 00 00 70 61 63 6b 61 packa
00000890 67 65 2f 73 65 72 76 69 63 65 73 2f 6d 65 74 61 ge/services/meta
000008a0 64 61 74 61 2f 63 6f 72 65 2d 70 72 6f 70 65 72 data/core-proper
000008b0 74 69 65 73 2f 31 2e 70 73 6d 64 63 70 50 4b 01 ties/1.psmdcpPK
000008c0 02 00 00 14 00 02 00 08 00 fc 46 19 50 c1 13 c7 F P
000008d0 c6 bf 00 00 00 74 01 00 00 13 00 00 00 00 00 00 t
000008e0 00 01 00 00 00 00 00 56 06 00 00 5b 43 6f 6e 74 V [Cont
000008f0 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d 6c 50 4b ent_Types].xmlPK
00000900 05 06 00 00 00 00 04 00 04 00 1c 01 00 00 46 07 F
00000910 00 00 00 00 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d -----------
00000920 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
00000930 2d 2d 38 64 32 37 33 31 31 32 65 34 33 66 62 39 --8d273112e43fb9
00000940 32 2d 2d 2--
In the row 00000910, I believe the multipart content-type specification (http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html) requires a carriage-return (Ox0d) and a line-feed (0x0a) prior to the final boundary which, in this case, starts with - (0x2d). But this row contains 00 0a 2d, which is missing the CR (0d).
The current implementation of MultipartWebRequest::CreateMultipartRequest doesn't appear to ensure that there is a CRLF before the closing boundary. It uses Environment.NewLine, which on Unix via mono, I believe will be just LF and not CRLF as on Windows.

Jetty websocket client: Not Valid UTF8

Any advice on how to fix this problem would be much appreciated.
I am using the jetty websocket (9.2.6.v20141205) client to connect via apache2 proxy_wstunnel to tomcat7 websocket server.
I get the following error intermittently:
org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte 88 in state 0
at org.eclipse.jetty.util.Utf8Appendable.appendByte(Utf8Appendable.java:195)
at org.eclipse.jetty.util.Utf8Appendable.append(Utf8Appendable.java:105)
at org.eclipse.jetty.util.Utf8LineParser.parseByte(Utf8LineParser.java:86)
at org.eclipse.jetty.util.Utf8LineParser.parseByte(Utf8LineParser.java:78)
at org.eclipse.jetty.util.Utf8LineParser.parse(Utf8LineParser.java:61)
at org.eclipse.jetty.websocket.common.io.http.HttpResponseHeaderParser.parse(HttpResponseHeaderParser.java:78)
at org.eclipse.jetty.websocket.client.io.UpgradeConnection.read(UpgradeConnection.java:201)
at org.eclipse.jetty.websocket.client.io.UpgradeConnection.onFillable(UpgradeConnection.java:150)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546)
at java.lang.Thread.run(Thread.java:745)
If I remove the apache2 proxy_wstunnel then the error goes away. I've also noticed in the ngrep logs that apache is giving a 500 error, but even if I turn on LogLevel debug I don't see relevant logs. This has consumed several hours of my time. There is also no errors in the tomcat logs.
I do want to continue using wstunnel. Perhaps this is a jetty bug or apache bug?
Here is the ngrep logs:
filter: (ip or ip6) and ( port 80 )
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [S]
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AS]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AP]
47 45 54 20 2f 74 72 61 6e 73 6c 61 74 6f 72 2d GET /trandomain-
73 72 76 2f 77 73 20 48 54 54 50 2f 31 2e 31 0d srv/ws HTTP/1.1.
0a 48 6f 73 74 3a 20 77 73 2e 73 6c 61 74 6f 72 .Host: ws.domain
2e 69 6f 0d 0a 55 70 67 72 61 64 65 3a 20 77 65 .io..Upgrade: we
62 73 6f 63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 bsocket..Connect
69 6f 6e 3a 20 55 70 67 72 61 64 65 0d 0a 53 65 ion: Upgrade..Se
63 2d 57 65 62 53 6f 63 6b 65 74 2d 4b 65 79 3a c-WebSocket-Key:
20 56 50 54 4a 79 42 6b 30 36 38 65 7a 66 30 62 VPTJyBk068ezf0b
34 57 66 41 39 73 51 3d 3d 0d 0a 53 65 63 2d 57 4WfA9sQ==..Sec-W
65 62 53 6f 63 6b 65 74 2d 56 65 72 73 69 6f 6e ebSocket-Version
3a 20 31 33 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f : 13..Pragma: no
2d 63 61 63 68 65 0d 0a 43 61 63 68 65 2d 43 6f -cache..Cache-Co
6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d ntrol: no-cache.
0a 0d 0a ...
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AP]
48 54 54 50 2f 31 2e 31 20 31 30 31 20 53 77 69 HTTP/1.1 101 Swi
74 63 68 69 6e 67 20 50 72 6f 74 6f 63 6f 6c 73 tching Protocols
0d 0a 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 ..Server: Apache
2d 43 6f 79 6f 74 65 2f 31 2e 31 0d 0a 55 70 67 -Coyote/1.1..Upg
72 61 64 65 3a 20 77 65 62 73 6f 63 6b 65 74 0d rade: websocket.
0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 75 70 67 .Connection: upg
72 61 64 65 0d 0a 53 65 63 2d 57 65 62 53 6f 63 rade..Sec-WebSoc
6b 65 74 2d 41 63 63 65 70 74 3a 20 31 4a 51 76 ket-Accept: 1JQv
41 2f 43 56 55 5a 38 59 6d 4d 4a 38 70 62 33 53 A/CVUZ8YmMJ8pb3S
48 33 51 47 56 4e 34 3d 0d 0a 44 61 74 65 3a 20 H3QGVN4=..Date:
57 65 64 2c 20 32 34 20 44 65 63 20 32 30 31 34 Wed, 24 Dec 2014
20 31 34 3a 33 31 3a 31 37 20 47 4d 54 0d 0a 0d 14:31:17 GMT...
0a .
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AP]
82 9c ea 9e d0 54 e2 9e c3 1e eb af c4 47 a0 98 .....T.......G..
a4 31 99 ea e1 61 fe 8d 9a 53 9e fb a3 20 db ac .1...a...S... ..
e3 40 .#
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AP]
82 09 ..
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AP]
08 00 13 4a 03 32 37 30 14 ...J.270.
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AP]
88 8a bc 23 03 08 bf ca 50 60 c9 57 67 67 cb 4d ...#....P`.Wgg.M
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AF]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AFP]
88 8a bc 23 03 08 bf ca 50 60 c9 57 67 67 cb 4d ...#....P`.Wgg.M
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AFP]
88 8a bc 23 03 08 bf ca 50 60 c9 57 67 67 cb 4d ...#....P`.Wgg.M
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AF]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AFP]
88 8a bc 23 03 08 bf ca 50 60 c9 57 67 67 cb 4d ...#....P`.Wgg.M
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AF]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [S]
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AS]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AP]
47 45 54 20 2f 74 72 61 6e 73 6c 61 74 6f 72 2d GET /trandomain-
73 72 76 2f 77 73 20 48 54 54 50 2f 31 2e 31 0d srv/ws HTTP/1.1.
0a 48 6f 73 74 3a 20 77 73 2e 73 6c 61 74 6f 72 .Host: ws.domain
2e 69 6f 0d 0a 55 70 67 72 61 64 65 3a 20 77 65 .io..Upgrade: we
62 73 6f 63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 bsocket..Connect
69 6f 6e 3a 20 55 70 67 72 61 64 65 0d 0a 53 65 ion: Upgrade..Se
63 2d 57 65 62 53 6f 63 6b 65 74 2d 4b 65 79 3a c-WebSocket-Key:
20 53 35 65 55 79 36 78 6a 55 53 70 51 46 57 47 S5eUy6xjUSpQFWG
37 2b 4a 4d 66 2b 51 3d 3d 0d 0a 53 65 63 2d 57 7+JMf+Q==..Sec-W
65 62 53 6f 63 6b 65 74 2d 56 65 72 73 69 6f 6e ebSocket-Version
3a 20 31 33 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f : 13..Pragma: no
2d 63 61 63 68 65 0d 0a 43 61 63 68 65 2d 43 6f -cache..Cache-Co
6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d ntrol: no-cache.
0a 0d 0a ...
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AP]
48 54 54 50 2f 31 2e 31 20 31 30 31 20 53 77 69 HTTP/1.1 101 Swi
74 63 68 69 6e 67 20 50 72 6f 74 6f 63 6f 6c 73 tching Protocols
0d 0a 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 ..Server: Apache
2d 43 6f 79 6f 74 65 2f 31 2e 31 0d 0a 55 70 67 -Coyote/1.1..Upg
72 61 64 65 3a 20 77 65 62 73 6f 63 6b 65 74 0d rade: websocket.
0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 75 70 67 .Connection: upg
72 61 64 65 0d 0a 53 65 63 2d 57 65 62 53 6f 63 rade..Sec-WebSoc
6b 65 74 2d 41 63 63 65 70 74 3a 20 52 56 43 4b ket-Accept: RVCK
72 41 6c 7a 59 30 66 4b 38 38 61 4d 43 30 61 37 rAlzY0fK88aMC0a7
6e 31 74 62 35 71 38 3d 0d 0a 44 61 74 65 3a 20 n1tb5q8=..Date:
57 65 64 2c 20 32 34 20 44 65 63 20 32 30 31 34 Wed, 24 Dec 2014
20 31 34 3a 33 31 3a 33 39 20 47 4d 54 0d 0a 0d 14:31:39 GMT...
0a .
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AF]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AP]
82 9c a1 86 a8 97 a9 86 bb dd a0 b7 bc 84 eb 80 ................
dc f2 d2 f2 99 a2 b5 95 e2 90 d5 e3 db e3 90 b4 ................
9b 83 ..
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AP]
82 09 ..
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AP]
08 00 13 4a 03 32 37 30 14 ...J.270.
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AFP]
88 8a bc 23 03 08 bf ca 50 60 c9 57 67 67 cb 4d ...#....P`.Wgg.M
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AF]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AFP]
88 8a bc 23 03 08 bf ca 50 60 c9 57 67 67 cb 4d ...#....P`.Wgg.M
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [A]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AP]
88 8a ad d9 9f c4 ae 30 cc ac d8 ad fb ab da b7 .......0........
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AF]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AFP]
88 8a ad d9 9f c4 ae 30 cc ac d8 ad fb ab da b7 .......0........
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [A]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AFP]
88 8a ad d9 9f c4 ae 30 cc ac d8 ad fb ab da b7 .......0........
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AF]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AFP]
88 8a ad d9 9f c4 ae 30 cc ac d8 ad fb ab da b7 .......0........
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AF]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [S]
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [AS]
#
T 104.131.x.x:80 -> 105.210.y.y:49975 [AF]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AP]
47 45 54 20 2f 74 72 61 6e 73 6c 61 74 6f 72 2d GET /trandomain-
73 72 76 2f 77 73 20 48 54 54 50 2f 31 2e 31 0d srv/ws HTTP/1.1.
0a 48 6f 73 74 3a 20 77 73 2e 73 6c 61 74 6f 72 .Host: ws.domain
2e 69 6f 0d 0a 55 70 67 72 61 64 65 3a 20 77 65 .io..Upgrade: we
62 73 6f 63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 bsocket..Connect
69 6f 6e 3a 20 55 70 67 72 61 64 65 0d 0a 53 65 ion: Upgrade..Se
63 2d 57 65 62 53 6f 63 6b 65 74 2d 4b 65 79 3a c-WebSocket-Key:
20 62 45 54 54 44 72 77 54 75 69 64 4f 67 4a 4a bETTDrwTuidOgJJ
68 73 56 7a 31 4c 41 3d 3d 0d 0a 53 65 63 2d 57 hsVz1LA==..Sec-W
65 62 53 6f 63 6b 65 74 2d 56 65 72 73 69 6f 6e ebSocket-Version
3a 20 31 33 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f : 13..Pragma: no
2d 63 61 63 68 65 0d 0a 43 61 63 68 65 2d 43 6f -cache..Cache-Co
6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d ntrol: no-cache.
0a 0d 0a ...
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [AP]
88 0a 03 e9 53 68 75 74 64 6f 77 6e ....Shutdown
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [AP]
3c 21 44 4f 43 54 59 50 45 20 48 54 4d 4c 20 50 ..
3c 74 69 74 6c 65 3e 35 30 30 20 49 6e 74 65 72 500 Inter
6e 61 6c 20 53 65 72 76 65 72 20 45 72 72 6f 72 nal Server Error
3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e .
3c 62 6f 64 79 3e 0a 3c 68 31 3e 49 6e 74 65 72 .Inter
6e 61 6c 20 53 65 72 76 65 72 20 45 72 72 6f 72 nal Server Error
3c 2f 68 31 3e 0a 3c 70 3e 54 68 65 20 73 65 72 .The ser
76 65 72 20 65 6e 63 6f 75 6e 74 65 72 65 64 20 ver encountered
61 6e 20 69 6e 74 65 72 6e 61 6c 20 65 72 72 6f an internal erro
72 20 6f 72 0a 6d 69 73 63 6f 6e 66 69 67 75 72 r or.misconfigur
61 74 69 6f 6e 20 61 6e 64 20 77 61 73 20 75 6e ation and was un
61 62 6c 65 20 74 6f 20 63 6f 6d 70 6c 65 74 65 able to complete
0a 79 6f 75 72 20 72 65 71 75 65 73 74 2e 3c 2f .your request..Please con
74 61 63 74 20 74 68 65 20 73 65 72 76 65 72 20 tact the server
61 64 6d 69 6e 69 73 74 72 61 74 6f 72 20 61 74 administrator at
20 0a 20 77 65 62 6d 61 73 74 65 72 40 6c 6f 63 . webmaster#loc
61 6c 68 6f 73 74 20 74 6f 20 69 6e 66 6f 72 6d alhost to inform
20 74 68 65 6d 20 6f 66 20 74 68 65 20 74 69 6d them of the tim
65 20 74 68 69 73 20 65 72 72 6f 72 20 6f 63 63 e this error occ
75 72 72 65 64 2c 0a 20 61 6e 64 20 74 68 65 20 urred,. and the
61 63 74 69 6f 6e 73 20 79 6f 75 20 70 65 72 66 actions you perf
6f 72 6d 65 64 20 6a 75 73 74 20 62 65 66 6f 72 ormed just befor
65 20 74 68 69 73 20 65 72 72 6f 72 2e 3c 2f 70 e this error..More inform
61 74 69 6f 6e 20 61 62 6f 75 74 20 74 68 69 73 ation about this
20 65 72 72 6f 72 20 6d 61 79 20 62 65 20 61 76 error may be av
61 69 6c 61 62 6c 65 0a 69 6e 20 74 68 65 20 73 ailable.in the s
65 72 76 65 72 20 65 72 72 6f 72 20 6c 6f 67 2e erver error log.
3c 2f 70 3e 0a 3c 68 72 3e 0a 3c 61 64 64 72 65 ..Apache/2.4.7
28 55 62 75 6e 74 75 29 20 53 65 72 76 65 72 20 (Ubuntu) Server
61 74 20 77 73 2e 73 6c 61 74 6f 72 2e 69 6f 20 at ws.domain.io
50 6f 72 74 20 38 30 3c 2f 61 64 64 72 65 73 73 Port 80.
0a .
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [AF]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [A]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AFP]
88 8a ad d9 9f c4 ae 30 cc ac d8 ad fb ab da b7 .......0........
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AF]
#
T 105.210.y.y:49975 -> 104.131.x.x:80 [AR]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AF]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AFP]
88 8a ad d9 9f c4 ae 30 cc ac d8 ad fb ab da b7 .......0........
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [A]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
#
T 104.131.x.x:80 -> 105.210.y.y:49983 [AF]
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
#
T 105.210.y.y:49983 -> 104.131.x.x:80 [AR]
00 00 00 00 00 00 ......
#
T 105.210.y.y:49991 -> 104.131.x.x:80 [AF]
00 00 00 00 00 00 ......
#
T 104.131.x.x:80 -> 105.210.y.y:49991 [A]
exit
83 received, 0 dropped
Here is the ngrep logs between apache and tomcat:
interface: lo (127.0.0.0/255.0.0.0)
filter: (ip or ip6) and ( port 8080 )
#
T 127.0.0.1:57952 -> 127.0.0.1:8080 [AP]
47 45 54 20 2f 74 72 61 6e 73 6c 61 74 6f 72 2d GET /translator-
73 72 76 2f 77 73 20 48 54 54 50 2f 31 2e 31 0d srv/ws HTTP/1.1.
0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 .Host: localhost
3a 38 30 38 30 0d 0a 53 65 63 2d 57 65 62 53 6f :8080..Sec-WebSo
63 6b 65 74 2d 4b 65 79 3a 20 64 36 57 73 6c 6b cket-Key: d6Wslk
56 48 77 79 4d 47 77 62 5a 4f 6c 71 56 53 2b 51 VHwyMGwbZOlqVS+Q
3d 3d 0d 0a 53 65 63 2d 57 65 62 53 6f 63 6b 65 ==..Sec-WebSocke
74 2d 56 65 72 73 69 6f 6e 3a 20 31 33 0d 0a 50 t-Version: 13..P
72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d ragma: no-cache.
0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 .Cache-Control:
6e 6f 2d 63 61 63 68 65 0d 0a 58 2d 46 6f 72 77 no-cache..X-Forw
61 72 64 65 64 2d 46 6f 72 3a 20 31 30 35 2e 32 arded-For: 105.2
31 30 2e 33 38 2e 31 34 39 0d 0a 58 2d 46 6f 72 10.38.149..X-For
77 61 72 64 65 64 2d 48 6f 73 74 3a 20 77 73 2e warded-Host: ws.
73 6c 61 74 6f 72 2e 69 6f 0d 0a 58 2d 46 6f 72 slator.io..X-For
77 61 72 64 65 64 2d 53 65 72 76 65 72 3a 20 77 warded-Server: w
73 2e 73 6c 61 74 6f 72 2e 69 6f 0d 0a 55 70 67 s.slator.io..Upg
72 61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d rade: WebSocket.
0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 .Connection: Upg
72 61 64 65 0d 0a 0d 0a rade....
#
T 127.0.0.1:8080 -> 127.0.0.1:57952 [R]
exit
4 received, 0 dropped
I had to compile the latest version of apache on my server and that seemed to solve the issue.
I created this question and answer to document that process:
https://serverfault.com/questions/655722/how-do-i-compile-the-latest-apache2-on-ubuntu-using-the-original-layout-configu/655724#655724

OpenSSL Certificate: How to sign csr directly to pem file?

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.\

JPEG data from a camera module, how to display the image on a computer?

I have a microcontroller with at camera connected to it. The camera module can take JPEG pictures. I have manage to capture JPEG images (I think) but I'm not sure how to display the images I receive. I get a bit stream from the MCU in hex format. I simply copy the output I get form terminal window and paste it into a hex editor and save it at .jpg file. Is this right? I can't display the images.
Here are the output for a 80x60 JPEG picture in hex.
FF D8 FF E0 01 14 A4 64 94 60 11 10 00 00 0A FF DB 04 30 86 67 65 87 77 99 8A C1 4D CB BC 19 12 13 F1 41 D1 A1 F1 E1 D1 A1 C1 C2 02 42 E2 72 02 22 C2 31 C1 C2 83 72 92 C3 03 13 43 43 41 F2 73 93 D3 83 23 C2 E3 33 43 2F FD B0 43 19 99 CB C1 8D D1 83 22 11 C2 13 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 2F FC 40 1F 00 15 11 11 11 00 00 00 00 12 34 56 78 9A BF FC 40 B5 10 02 13 32 43 55 44 00 17 D1 23 04 11 51 22 13 14 16 13 51 61 72 27 11 43 28 19 1A 18 23 42 B1 C1 15 52 D1 F0 24 33 62 72 82 9A 16 17 18 19 1A 25 26 27 28 29 2A 34 35 36 37 38 39 3A 43 44 45 46 47 48 49 4A 53 54 55 56 57 58 59 5A 63 64 65 66 67 68 69 6A 73 74 75 76 77 78 79 7A 83 84 85 86 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9 AA B2 B3 B4 B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9 DA E1 E2 E3 E4 E5 E6 E7 E8 E9 EA F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FF C4 01 F1 03 11 11 11 11 10 00 00 01 23 45 67 89 AB FF C4 0B 51 10 21 24 43 47 54 40 12 77 01 23 11 45 21 31 61 24 15 17 61 71 13 22 32 81 81 44 29 1A 1B 1C 19 23 33 52 F0 15 62 72 D1 A1 62 43 4E 12 5F 11 71 81 91 A2 62 72 82 92 A3 53 63 73 83 93 A4 34 44 54 64 74 84 94 A5 35 45 55 65 75 85 95 A6 36 46 56 66 76 86 96 A7 37 47 57 67 77 87 97 A8 28 38 48 58 68 78 88 98 A9 29 39 49 59 69 79 89 99 AA 2A 3A 4A 5A 6A 7A 8A 9A AB 2B 3B 4B 5B 6B 7B 8B 9B AC 2C 3C 4C 5C 6C 7C 8C 9C AD 2D 3D 4D 5D 6D 7D 8D 9D AE 2E 3E 4E 5E 6E 7E 8E 9E AF 2F 3F 4F 5F 6F 7F 8F 9F AF FC 00 11 80 3C 05 03 12 10 21 11 31 11 FF DA 0C 31 02 11 31 10 3F 0E 3E F2 28 C3 F9 51 21 55 E4 45 44 F2 C2 8A 94 EE CE 98 C2 D1 2F 68 1E 1F 8F 55 B8 91 E5 5C 43 18 E7 DC D5 5B FF 0E 46 D2 4B 25 B9 FD D8 3C 55 FB 46 8C 1C 39 A7 64 63 49 67 E4 82 3B D4 36 AC FA 9C 49 D4 96 14 9B BB 15 48 F2 A3 DA F4 E8 19 6D 23 E3 B5 59 28 D8 E9 4D A3 9F 52 B4 A4 8A A1 32 CA EE 1C 54 35 7D 8A 48 E4 16 D2 51 19 BA 91 78 DD 33 54 DD 41 24 FA D4 45 9E B6 8D 68 6F 69 77 12 DA D8 35 BA AE D3 26 72 7E B5 AB 6D A5 89 E0 D8 78 6A E1 A9 C6 DF 2B 6D 1C 77 8C 34 F1 A6 BA 2C 67 96 AC CF 0B 5A 9B 8F 15 B8 6E 99 C9 AA D9 99 CA 4E 5B 9E F7 5A A2 CA 0E D4 35 9E EE D4 37 72 12 27 B3 45 EA 2A 85 D2 2C 68 70 BD 28 41 63 CC 24 D4 65 36 51 C0 ED C0 A8 2D 98 CF 70 91 8E 72 6B 14 B4 3D 72 51 5A 1B F1 48 04 E1 3F BB 5D 35 94 AA 91 02 7A 56 B4 D1 C6 DE 87 17 E3 09 D6 F6 F5 4E 42 AC DF 08 07 6F 12 6D 5E 14 F3 49 B6 3A 90 70 48 F7 5B 79 51 60 5F 5C 51 25 C0 C5 23 1E 62 94 B3 8E 79 AC AB CB 8E D1 A8 5C F2 4B A8 DC 4C 11 41 38 1D 2B A9 F0 E8 6D A9 5D DD CD 28 C2 C0 98 19 F5 34 B6 46 F3 97 BA CA C9 F3 6A 33 95 E9 E6 1C 7E 75 BA 25 31 DB F3 D0 AD EB 43 26 2A 69 16 D7 D6 E6 66 40 7D E9 BA 36 93 67 63 A9 16 87 1B 98 D1 28 D8 6E 4E 51 B3 3B 64 57 85 47 20 61 51 63 16 8A 72 EE AC 9B BD E3 34 58 47 98 5E DD C9 DF C8 CB 83 B5 B1 5D 4E 81 AB BD A7 85 AF EE D2 4D 97 0E 58 0C 7E 05 73 CF 64 74 D4 4B A1 9D A5 DE 57 CC BD 73 92 6B A9 2E 6D E7 8F 60 70 9A E8 8C 94 53 6C 9E CE 63 69 68 61 F3 81 47 1C D6 54 77 AD 65 AB C5 21 93 72 BB 62 89 36 DA 34 49 2A 7E A7 AA 58 BC 77 16 E8 DD C8 A9 E4 B6 52 28 E6 31 7B 23 3E E2 0B 9A C6 BC 8F 0F A5 3B 93 63 C9 AD D1 25 B8 B9 8E 45 DC 49 3C D4 33 4B 3D 85 BB DB 52 61 63 9A C9 C2 E9 33 09 55 B5 67 16 C2 D6 FD 18 8C 1E 7D 2B 49 6E 56 67 1C 62 B4 8C 54 8E BA 72 5C C5 6B DB E6 48 70 B2 1C FD 6A A2 CD 2B 42 AC 58 92 E4 13 49 AB 44 D6 BC AD 68 A3 D7 BC 1F AB 0B AD 3A 32 CD F3 01 CD 74 CF 76 08 C8 A8 D4 C5 CE E5 59 AE 55 D4 FA D7 3F 7F 73 B9 CF 4A A4 43 67 93 58 CD E5 5D B1 63 F7 85 69 49 2C 72 70 DC 8F A5 74 52 B5 8F 37 17 17 ED 5B 45 79 F4 8B 69 60 69 E2 72 8E 66 B2 6C E7 9F CC 68 F3 9C 77 15 35 62 AE F1 3A 30 53 94 FE 2E 82 CA 9B 5C F9 CF 81 F5 A9 DD B5 B3 36 EC 76 AC DE AA C7 5D 47 79 5C EB FC 09 7B 24 6C 61 6C 8E 7A 57 A1 06 6A 2C 43 BD C8 25 DE 0E 6B 2B 55 2F 19 CD 96 AD 1E 52 9F 2C E9 8A D5 01 03 81 5A 57 74 72 E3 17 BC 8B 6E 0D 36 5E 07 4A E6 B4 55 0D 74 F9 F5 35 55 F7 41 81 EA 4B A9 42 A6 E8 66 A5 D3 7E 5B B1 18 03 69 EA 2B 96 EF 99 1E 84 D2 3A FD 31 16 1D 62 13 18 03 72 82 6B DD 02 A3 3E 95 A7 41 4B 71 64 45 29 D2 BF 55 3B 2D DC AF A5 2B 93 D0 FF D9
I have manage to solve my problem. There was not a problem with the JPEG file it self, or actually it was, but the reason for that was that the function sprintf() in C removes the zeros under decimal 15. If you have the value 0x00000111, this is decimal 7 and hex 0x07, but my code only prints 0x7. Thats the reason I could not display the image.