on Signature Request
Called only for keys the server accepted (PK_OK). Return the signature over dataToSign, or null to skip this key.
The returned bytes are written verbatim into the publickey SSH_MSG_USERAUTH_REQUEST signature field — the library does not decode or repackage them. This makes the callback a clean extension point for externally-signed keys.
Use cases:
Local private key: call SshSigning.sign.
SSH agent: forward dataToSign to your agent and return its response.
FIDO2 / Security Key (
sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com): drive your CTAP2 stack withclientDataHash = SHA-256(dataToSign), then returnorg.connectbot.sshlib.sk.SkSignatureBlob.pack(algorithm, rawSignature, flags, counter). Seeorg.connectbot.sshlib.sk.SkAuthHelpersfor the matching public-key blob constructor.