summaryrefslogtreecommitdiffhomepage
path: root/cli-agentfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-06 16:00:37 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-06 16:00:37 +0800
commita8135dec1e8b9360274679c9ff89cb98cda87930 (patch)
tree42cf334c3aac754cdf1a1fb4a9ed0789d49d16b0 /cli-agentfwd.c
parentb4bcc606576dab755441da1bc2fbe28041d54b06 (diff)
Make _sign and _verify functions take a buffer* rather than void* and int
--HG-- branch : ecc
Diffstat (limited to 'cli-agentfwd.c')
-rw-r--r--cli-agentfwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli-agentfwd.c b/cli-agentfwd.c
index c661455..b7b8da3 100644
--- a/cli-agentfwd.c
+++ b/cli-agentfwd.c
@@ -254,7 +254,7 @@ void cli_load_agent_keys(m_list *ret_list) {
}
void agent_buf_sign(buffer *sigblob, sign_key *key,
- const unsigned char *data, unsigned int len) {
+ buffer *data_buf) {
buffer *request_data = NULL;
buffer *response = NULL;
unsigned int siglen;
@@ -266,10 +266,10 @@ void agent_buf_sign(buffer *sigblob, sign_key *key,
string data
uint32 flags
*/
- request_data = buf_new(MAX_PUBKEY_SIZE + len + 12);
+ request_data = buf_new(MAX_PUBKEY_SIZE + data_buf>-len + 12);
buf_put_pub_key(request_data, key, key->type);
- buf_putstring(request_data, data, len);
+ buf_putbufstring(request_data, data_buf);
buf_putint(request_data, 0);
response = agent_request(SSH2_AGENTC_SIGN_REQUEST, request_data);