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

Use string for SNI instead of byte[] #2790

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

twsouthwick
Copy link
Member

Important

Stacked against #2452. Opened as a draft to enable validation, but since this is on a separate fork, GitHub does not support stacked PRs natively AFAIK

This change replaces byte[] usage for SNI values to be string. There was a lot of decoding done in different areas and with this it becomes clearer that the value is a server name.

Part of #2253

This change removes the need to pre-allocate anything for the outgoing blobs of SSPI generation. As part of this:

- An internal implementation of ArrayBufferWriter is added for platforms that do not support it
- SqlObjectPool is imbued with the ability to create/reset pooled objects
- TdsParser/TdsLogin is updated to use pooled ArrayBufferWriter instances to generate SSPI blobs
- Native methods are updated to take in Span/* for writeable byte[]
- SSPIContextProvider signature is updated to take IBufferWriter
Majority of use cases end up decoding before doing anything with it, so it makes sense to just store it as a string rather than byte[]
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

Successfully merging this pull request may close these issues.

1 participant