comparison rsa.c @ 1123:d7b752525b91

buf_getstring and buf_putstring now use non-unsigned char*
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents c45d65392c1a
children c6346c63281b
comparison
equal deleted inserted replaced
1121:bb3a03feb31f 1123:d7b752525b91
172 void buf_put_rsa_pub_key(buffer* buf, dropbear_rsa_key *key) { 172 void buf_put_rsa_pub_key(buffer* buf, dropbear_rsa_key *key) {
173 173
174 TRACE(("enter buf_put_rsa_pub_key")) 174 TRACE(("enter buf_put_rsa_pub_key"))
175 dropbear_assert(key != NULL); 175 dropbear_assert(key != NULL);
176 176
177 buf_putstring(buf, (const unsigned char *) SSH_SIGNKEY_RSA, SSH_SIGNKEY_RSA_LEN); 177 buf_putstring(buf, SSH_SIGNKEY_RSA, SSH_SIGNKEY_RSA_LEN);
178 buf_putmpint(buf, key->e); 178 buf_putmpint(buf, key->e);
179 buf_putmpint(buf, key->n); 179 buf_putmpint(buf, key->n);
180 180
181 TRACE(("leave buf_put_rsa_pub_key")) 181 TRACE(("leave buf_put_rsa_pub_key"))
182 182
325 #endif /* RSA_BLINDING */ 325 #endif /* RSA_BLINDING */
326 326
327 mp_clear_multi(&rsa_tmp1, &rsa_tmp2, &rsa_tmp3, NULL); 327 mp_clear_multi(&rsa_tmp1, &rsa_tmp2, &rsa_tmp3, NULL);
328 328
329 /* create the signature to return */ 329 /* create the signature to return */
330 buf_putstring(buf, (const unsigned char *) SSH_SIGNKEY_RSA, SSH_SIGNKEY_RSA_LEN); 330 buf_putstring(buf, SSH_SIGNKEY_RSA, SSH_SIGNKEY_RSA_LEN);
331 331
332 nsize = mp_unsigned_bin_size(key->n); 332 nsize = mp_unsigned_bin_size(key->n);
333 333
334 /* string rsa_signature_blob length */ 334 /* string rsa_signature_blob length */
335 buf_putint(buf, nsize); 335 buf_putint(buf, nsize);