Add FFM version of Pageant AgentConnector#1001
Open
norrisjeremy wants to merge 12 commits intomwiede:masterfrom
Open
Add FFM version of Pageant AgentConnector#1001norrisjeremy wants to merge 12 commits intomwiede:masterfrom
norrisjeremy wants to merge 12 commits intomwiede:masterfrom
Conversation
norrisjeremy
commented
Feb 20, 2026
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <!-- see https://github.com/manuelbl/WindowsApiGenerator/issues/7 --> |
Contributor
Author
There was a problem hiding this comment.
This is a workaround for manuelbl/WindowsApiGenerator#7 that I opened.
I also opened manuelbl/WindowsApiGenerator#9 with a possible solution.
Once this issue is resolved upstream, we should be able to remove this find-and-replace-maven-plugin.
a58cd12 to
efa5348
Compare
…g MapViewOfFile().
…ProcessId() and the Java thread id. This is needed to support virtual threads correctly, since GetCurrentThreadId() could change if the virtual thread is parked and resumed on a different carrier thread.
…) per official Windows API docs.
…d() and the Java thread id for Java 19+. Thread.getId() isn't final and thus could be overriden, leaving the possibility that it isn't unique. Since virtual threads were only introduced in Java 19, using GetCurrentThreadId() should work for earlier Java releases.
This allows PageantFFMConnector to connect to an unprivileged Pageant when JSch is executed via run as Administrator.
…up fails and throws an exception, the second resource cleanup will still execute.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This adds support for using Pageant using the JEP 454 FFM API with Java 23+ as an alternative to using JNA.
Additionally, include a few minor updates & fixes to the existing JNA based
PageantConnector.To use the new
PageantFFMConnector, users will need to pass an argument of--enable-native-access=ALL-UNNAMED(if JSch is on the classpath) or--enable-native-access=com.jcraft.jsch(if JSch is on the modulepath).