comparison cli-agentfwd.c @ 839:33207ed1174b

Merge in ECC
author Matt Johnston <matt@ucc.asn.au>
date Mon, 21 Oct 2013 22:57:21 +0800
parents ac2158e3e403
children c19acba28590
comparison
equal deleted inserted replaced
834:e378da7eae5d 839:33207ed1174b
252 252
253 agent_get_key_list(ret_list); 253 agent_get_key_list(ret_list);
254 } 254 }
255 255
256 void agent_buf_sign(buffer *sigblob, sign_key *key, 256 void agent_buf_sign(buffer *sigblob, sign_key *key,
257 const unsigned char *data, unsigned int len) { 257 buffer *data_buf) {
258 buffer *request_data = NULL; 258 buffer *request_data = NULL;
259 buffer *response = NULL; 259 buffer *response = NULL;
260 unsigned int siglen; 260 unsigned int siglen;
261 int packet_type; 261 int packet_type;
262 262
264 byte SSH2_AGENTC_SIGN_REQUEST 264 byte SSH2_AGENTC_SIGN_REQUEST
265 string key_blob 265 string key_blob
266 string data 266 string data
267 uint32 flags 267 uint32 flags
268 */ 268 */
269 request_data = buf_new(MAX_PUBKEY_SIZE + len + 12); 269 request_data = buf_new(MAX_PUBKEY_SIZE + data_buf->len + 12);
270 buf_put_pub_key(request_data, key, key->type); 270 buf_put_pub_key(request_data, key, key->type);
271 271
272 buf_putstring(request_data, data, len); 272 buf_putbufstring(request_data, data_buf);
273 buf_putint(request_data, 0); 273 buf_putint(request_data, 0);
274 274
275 response = agent_request(SSH2_AGENTC_SIGN_REQUEST, request_data); 275 response = agent_request(SSH2_AGENTC_SIGN_REQUEST, request_data);
276 276
277 if (!response) { 277 if (!response) {