comparison signkey.c @ 70:b0316ce64e4b

Merging in the changes from 0.41-0.43 main Dropbear tree
author Matt Johnston <matt@ucc.asn.au>
date Thu, 12 Aug 2004 16:41:58 +0000
parents 095d689fed16
children d3eb1fa8484e
comparison
equal deleted inserted replaced
69:59d16db56e9f 70:b0316ce64e4b
192 void buf_put_pub_key(buffer* buf, sign_key *key, int type) { 192 void buf_put_pub_key(buffer* buf, sign_key *key, int type) {
193 193
194 buffer *pubkeys; 194 buffer *pubkeys;
195 195
196 TRACE(("enter buf_put_pub_key")); 196 TRACE(("enter buf_put_pub_key"));
197 pubkeys = buf_new(1000); 197 pubkeys = buf_new(MAX_PUBKEY_SIZE);
198 198
199 #ifdef DROPBEAR_DSS 199 #ifdef DROPBEAR_DSS
200 if (type == DROPBEAR_SIGNKEY_DSS) { 200 if (type == DROPBEAR_SIGNKEY_DSS) {
201 buf_put_dss_pub_key(pubkeys, key->dsskey); 201 buf_put_dss_pub_key(pubkeys, key->dsskey);
202 } 202 }
354 void buf_put_sign(buffer* buf, sign_key *key, int type, 354 void buf_put_sign(buffer* buf, sign_key *key, int type,
355 const unsigned char *data, unsigned int len) { 355 const unsigned char *data, unsigned int len) {
356 356
357 buffer *sigblob; 357 buffer *sigblob;
358 358
359 sigblob = buf_new(1000); 359 sigblob = buf_new(MAX_PUBKEY_SIZE);
360 360
361 #ifdef DROPBEAR_DSS 361 #ifdef DROPBEAR_DSS
362 if (type == DROPBEAR_SIGNKEY_DSS) { 362 if (type == DROPBEAR_SIGNKEY_DSS) {
363 buf_put_dss_sign(sigblob, key->dsskey, data, len); 363 buf_put_dss_sign(sigblob, key->dsskey, data, len);
364 } 364 }