comparison keyimport.c @ 1119:845922d73e9c

Turn modptr local variable into unsigned char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sun, 03 May 2015 00:27:49 +0200
parents c45d65392c1a
children aaf576b27a10 d7b752525b91
comparison
equal deleted inserted replaced
1118:506e769ed6d1 1119:845922d73e9c
505 unsigned char *p; 505 unsigned char *p;
506 int ret, id, len, flags; 506 int ret, id, len, flags;
507 int i, num_integers = 0; 507 int i, num_integers = 0;
508 sign_key *retval = NULL; 508 sign_key *retval = NULL;
509 char *errmsg; 509 char *errmsg;
510 char *modptr = NULL; 510 unsigned char *modptr = NULL;
511 int modlen = -9999; 511 int modlen = -9999;
512 enum signkey_type type; 512 enum signkey_type type;
513 513
514 sign_key *retkey; 514 sign_key *retkey;
515 buffer * blobbuf = NULL; 515 buffer * blobbuf = NULL;
644 * OpenSSH key order is n, e, d, p, q, dmp1, dmq1, iqmp 644 * OpenSSH key order is n, e, d, p, q, dmp1, dmq1, iqmp
645 * but we want e, n, d, p, q 645 * but we want e, n, d, p, q
646 */ 646 */
647 if (i == 1) { 647 if (i == 1) {
648 /* Save the details for after we deal with number 2. */ 648 /* Save the details for after we deal with number 2. */
649 modptr = (char *)p; 649 modptr = p;
650 modlen = len; 650 modlen = len;
651 } else if (i >= 2 && i <= 5) { 651 } else if (i >= 2 && i <= 5) {
652 buf_putstring(blobbuf, p, len); 652 buf_putstring(blobbuf, p, len);
653 if (i == 2) { 653 if (i == 2) {
654 buf_putstring(blobbuf, modptr, modlen); 654 buf_putstring(blobbuf, modptr, modlen);