-
Notifications
You must be signed in to change notification settings - Fork 833
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
Sni csharp wrapper patch #7692
Sni csharp wrapper patch #7692
Conversation
/* print out results of TLS/SSL accept */ | ||
Console.WriteLine("SSL version is " + wolfssl.get_version(ssl)); | ||
Console.WriteLine("SSL cipher suite is " + wolfssl.get_current_cipher(ssl)); | ||
|
||
/* read and print out the message then reply */ | ||
if (wolfssl.read(ssl, buff, 1023) < 0) | ||
if (wolfssl.read(ssl, buff, 1024) < 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of reading 1023 is to leave a null terminator. Buff is 1024, so this is 1024-1. We use this same pattern in a few of the examples.
IntPtr result = Marshal.AllocHGlobal(32); | ||
IntPtr inOutSz = Marshal.AllocHGlobal(sizeof(int)); | ||
Marshal.WriteInt32(inOutSz, 32); | ||
byte [] buffer = { /* www.paypal.com */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid the full link, just say from PayPal website client hello. Is there a reason you didn't use our own or something not money related like google.com?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Please get customer feedback. You’re welcome to put this PR into non-draft
Description
Fixes zd#17990
Testing
server:
client:
Checklist