Mercurial > dropbear
diff keyimport.c @ 299:740e782679be ucc-axis-hack
Various changes to compile+kind of run on UCC's axis board.
Note that fprintf(stdin -> printf( accounts for many of the changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 25 Mar 2006 12:57:09 +0000 |
parents | ac890087b8c1 |
children |
line wrap: on
line diff
--- a/keyimport.c Fri Dec 09 06:10:27 2005 +0000 +++ b/keyimport.c Sat Mar 25 12:57:09 2006 +0000 @@ -483,7 +483,7 @@ m_free(ret); } if (errmsg) { - fprintf(stderr, "Error: %s\n", errmsg); + printf( "Error: %s\n", errmsg); } return NULL; } @@ -682,7 +682,7 @@ m_burn(key, sizeof(key)); m_free(key); if (errmsg) { - fprintf(stderr, "Error: %s\n", errmsg); + printf( "Error: %s\n", errmsg); } return retval; } @@ -738,7 +738,7 @@ if (keytype == DROPBEAR_SIGNKEY_RSA) { if (key->rsakey->p == NULL || key->rsakey->q == NULL) { - fprintf(stderr, "Pre-0.33 Dropbear keys cannot be converted to OpenSSH keys.\n"); + printf( "Pre-0.33 Dropbear keys cannot be converted to OpenSSH keys.\n"); goto error; } @@ -775,27 +775,27 @@ /* dmp1 = d mod (p-1) */ if (mp_sub_d(key->rsakey->p, 1, &tmpval) != MP_OKAY) { - fprintf(stderr, "Bignum error for p-1\n"); + printf( "Bignum error for p-1\n"); goto error; } if (mp_mod(key->rsakey->d, &tmpval, &dmp1) != MP_OKAY) { - fprintf(stderr, "Bignum error for dmp1\n"); + printf( "Bignum error for dmp1\n"); goto error; } /* dmq1 = d mod (q-1) */ if (mp_sub_d(key->rsakey->q, 1, &tmpval) != MP_OKAY) { - fprintf(stderr, "Bignum error for q-1\n"); + printf( "Bignum error for q-1\n"); goto error; } if (mp_mod(key->rsakey->d, &tmpval, &dmq1) != MP_OKAY) { - fprintf(stderr, "Bignum error for dmq1\n"); + printf( "Bignum error for dmq1\n"); goto error; } /* iqmp = (q^-1) mod p */ if (mp_invmod(key->rsakey->q, key->rsakey->p, &iqmp) != MP_OKAY) { - fprintf(stderr, "Bignum error for iqmp\n"); + printf( "Bignum error for iqmp\n"); goto error; } @@ -924,7 +924,7 @@ * Encrypt the key. */ if (passphrase) { - fprintf(stderr, "Encrypted keys aren't supported currently\n"); + printf( "Encrypted keys aren't supported currently\n"); goto error; #if 0 /* @@ -972,7 +972,7 @@ fp = fopen(filename, "wb"); /* ensure Unix line endings */ } if (!fp) { - fprintf(stderr, "Failed opening output file\n"); + printf( "Failed opening output file\n"); goto error; } fputs(header, fp);