Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the application data transport in Tsl1.0, how to configure the data package? #676

Open
BoydenYubin opened this issue Aug 16, 2023 · 10 comments

Comments

@BoydenYubin
Copy link

BoydenYubin commented Aug 16, 2023

How to configure we could send the package through one application like first pic?

  • 1

image

  • 2

image

@alberk8
Copy link

alberk8 commented Aug 16, 2023

Link to TLS sample. TLS1 and 1.1 is deprecated and would be cause problems in most modern OS.

@BoydenYubin
Copy link
Author

The project required that we must choose tls1.0. Have tried the ssl stream, if we try to send single package, we need to send 0x00 first to occupy a position so that the package will be complete. If not, the first byte of package will be as in second pic and it was taken apart.

@alberk8
Copy link

alberk8 commented Aug 16, 2023

Have you tried to create a byte[] bytes = new byte[29] { 0x00, 0x02, } and try to sent it.

@BoydenYubin
Copy link
Author

ValueTask SendAsync(ReadOnlyMemory data);
ValueTask SendAsync(IPackageEncoder packageEncoder, TSendPackage package);

We have tried two methods to send the package, but as shown in wireshark, the first byte will be taken apart.

@alberk8
Copy link

alberk8 commented Aug 16, 2023

I am not sure which layer is removing the null character.

@BoydenYubin
Copy link
Author

BoydenYubin commented Aug 16, 2023

Should be first layer, but not very clear that how can send the data like first pic and don't show the 0x00.

@alberk8
Copy link

alberk8 commented Aug 16, 2023

Can you check your data that is being sent is in the correct format. Console.WriteLine(Convert.ToHexString(bytes));

@BoydenYubin
Copy link
Author

BoydenYubin commented Aug 16, 2023

await session.SendAsync(new ReadOnlyMemory<byte>(new byte[] { 0x00, 0x03, 0XE0, 0x00, 0x00, 0x00, 0xE0 }));
now is sent by raw data.
if don't send the 0x00, the 0x03 will be first layer

@BoydenYubin
Copy link
Author

Any way to set up the record layer? I have used the openssl s_server to debug, this server could send package via single TLSV1 record layer.
image

It do increase the difficult to debug the tls protocol

@BoydenYubin
Copy link
Author

BoydenYubin commented Aug 28, 2023

image

  • We could use openssl s_server to send one layer.

@kerryjiang @alberk8

Just checked the source code, found that just some EncryptMessage function, don't know the difference between openssl and C# source code. Could you help me to understand that, much appreciate for your help.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants