(ctx context.Context, stderr io.Writer, sshClient *gossh.Client)
| 25 | } |
| 26 | |
| 27 | func forwardGPGAgent(ctx context.Context, stderr io.Writer, sshClient *gossh.Client) (io.Closer, error) { |
| 28 | localSocket, err := localGPGExtraSocket(ctx) |
| 29 | if err != nil { |
| 30 | return nil, err |
| 31 | } |
| 32 | |
| 33 | remoteSocket, err := remoteGPGAgentSocket(sshClient) |
| 34 | if err != nil { |
| 35 | return nil, err |
| 36 | } |
| 37 | |
| 38 | localAddr := &net.UnixAddr{ |
| 39 | Name: localSocket, |
| 40 | Net: "unix", |
| 41 | } |
| 42 | remoteAddr := &net.UnixAddr{ |
| 43 | Name: remoteSocket, |
| 44 | Net: "unix", |
| 45 | } |
| 46 | |
| 47 | return sshRemoteForward(ctx, stderr, sshClient, localAddr, remoteAddr) |
| 48 | } |
no test coverage detected