-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add support for libassuan file sockets (WinGnuPG support) #2
base: master
Are you sure you want to change the base?
Conversation
I've noticed that |
Hey @jstarks, this PR is ready for review and merging! |
Thanks for the contribution! I think it might be cleaner to require a special flag for this case rather than auto detect, since the user surely knows which case they’re in. Also, you can probably avoid the overlapped file stuff for the file and socket and just use Go’s built in support. And you may be able to make the file parsing more idiomatic. I suggest looking at bufio.Reader. |
I went with overlapped file IO to minimise needing to change code elsewhere. Then again i'm new to Go and yet to explore how it all works. Decided against using a flag for convenience, but will require one for libassaun since it is a special case. |
Hey @jstarks, I've add a |
Hello? |
Given the choice between this and invoking gpg.exe from WSL, I'd love to try this out.... |
I'd like to see this merged, or fixed up if it needs to be, if possible. @jstarks is there a list of blockers on merging this? |
continue | ||
} | ||
|
||
err = os.NewSyscallError("ConnectEx", err) |
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.
It seems like this should be inside the if err != nil
block below.
log.Printf("Port: %d, Nonce: %X", port, nonce) | ||
} | ||
|
||
_ = conn.Close() |
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.
_ = conn.Close() | |
conn.Close() |
} | ||
|
||
// LibAssaaun file socket: Attempt to read contents of the target file and connect to a TCP port | ||
if *assuan { |
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.
I would prefer that the existing pipe path stay the same as it was (don't change dialPipe
) and that this path be a separate branch, maybe a separate function dialAssuan
.
I think we can get this merged, I'd just like to see some minor cleanup first. |
Any progress on this? I'd love to have a stable way interacting with gpg4win's gpg-agent from WSL. |
This closes #1. See that issue for details on this pull request.
Some housekeeping is needed though. Although I create a overlapped socket handle, i don't check all edge cases of it failing. will need to tidy that up