ddn.net.ssh.agent
ssh-agent wire codec (RFC 9322 / OpenSSH PROTOCOL.agent).
Every message is a uint32 length followed by a payload. The client subset used here covers identity listing (11/12) and signing (13/14), plus the failure status. All readers are bounded before any allocation, and every parsed field is validated structurally so a hostile agent cannot smuggle oversized blobs, empty names, or trailing bytes past this codec.
Types 8
Agent protocol limits from the support matrix.
Agent message numbers.
Signature request flags (OpenSSH agent).
Raised for agent wire violations: bad framing, unexpected message numbers, limit breaches, or structural errors.
this(string msg, string file = __FILE__, size_t line = __LINE__)Constructs an agent exception.One identity from a listing answer.
const(ubyte)[] blobRaw public key blobstring commentComment (may be empty)A decoded listing answer.
SshAgentIdentity[] identitiesIdentities in answer orderA decoded sign response.
const(ubyte)[] signatureRaw signature blobResult of framing: the payload and total occupied size.
const(ubyte)[] payloadPayload bytes (slice into the source buffer)size_t totalTotal bytes occupied including the length prefixFunctions 7
ubyte[] buildSignRequest(const(ubyte)[] keyBlob, const(ubyte)[] data,
uint flags) @safeEncodes a SIGN_REQUEST message.SshAgentFraming frameAgentMessage(const(ubyte)[] buffer) @safeDecodes one complete agent message from a buffer.SshAgentIdentitiesAnswer parseIdentitiesAnswer(const(ubyte)[] payload) @safeParses an IDENTITIES_ANSWER payload (without the length prefix).SshAgentSignAnswer parseSignResponse(const(ubyte)[] payload) @safeParses a SIGN_RESPONSE payload (without the length prefix).bool isAgentFailure(const(ubyte)[] payload) @safe pure nothrowChecks whether a payload is the generic agent failure status.SshWireWriter frameUint32(scope const(ubyte)[] payload) @safeHelper: prefixes a payload with its agent length.