Working prototype using RO as a remote Signer for SSH authentication

This commit is contained in:
Andrew Buss
2018-03-12 12:39:32 -07:00
committed by Kyle Isom
parent 5b9a4b2fcb
commit a45f80f613
3 changed files with 241 additions and 5 deletions
+16
View File
@@ -254,6 +254,22 @@ func (c *RemoteServer) Decrypt(req core.DecryptRequest) (*core.ResponseData, err
}
// Decrypt issues an decrypt request to the remote server
func (c *RemoteServer) DecryptSign(req core.DecryptSignRequest) (*core.ResponseData, error) {
reqBytes, err := json.Marshal(req)
if err != nil {
return nil, err
}
respBytes, err := c.doAction("decrypt-sign", reqBytes)
if err != nil {
return nil, err
}
return unmarshalResponseData(respBytes)
}
// DecryptIntoData issues an decrypt request to the remote server and extract
// the decrypted data from the response
func (c *RemoteServer) DecryptIntoData(req core.DecryptRequest) ([]byte, error) {