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

Fix for #1069 #1071

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

datadiode
Copy link

The proposed change makes file descriptors created through posix_open() distinguishable from sockets by having them take odd values only.

…n() distinguishable from sockets by having them take odd values only
@busterb
Copy link
Contributor

busterb commented Oct 8, 2024

Hi @datadiode, interesting solution. How does this work when the file descriptors are passed in by the calling program or library though?

@datadiode
Copy link
Author

You mean if they mean to pass a file descriptor to e.g. SSL_set_fd()?
I never needed to, but I guess they could oddify it in the same way on their side to produce a file descriptor which LibreSSL can distinguish from a socket.

@busterb
Copy link
Contributor

busterb commented Oct 14, 2024

I finally got a chance to test this out. It seems to break console IO when using openssl.exe. As soon as there is console IO, the program exits:
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

Successfully merging this pull request may close these issues.

2 participants