Mercurial > dropbear
diff dss.c @ 594:a98a2138364a
Improve capitalisation for all logged strings
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 23 Feb 2011 15:50:30 +0000 |
parents | b50f0107e505 |
children | 2b1bb792cd4d 94aa1203be1e |
line wrap: on
line diff
--- a/dss.c Wed Feb 23 15:10:31 2011 +0000 +++ b/dss.c Wed Feb 23 15:50:30 2011 +0000 @@ -270,7 +270,7 @@ size = mp_unsigned_bin_size(mp); ret = m_malloc(size); if (mp_to_unsigned_bin(mp, ret) != MP_OKAY) { - dropbear_exit("mem alloc error"); + dropbear_exit("Mem alloc error"); } if (len != NULL) { *len = size; @@ -342,7 +342,7 @@ m_mp_init(&dss_protok); bytes_to_mp(&dss_protok, proto_k, SHA512_HASH_SIZE); if (mp_mod(&dss_protok, key->q, &dss_k) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } mp_clear(&dss_protok); m_burn(proto_k, SHA512_HASH_SIZE); @@ -355,30 +355,30 @@ /* g^k mod p */ if (mp_exptmod(key->g, &dss_k, key->p, &dss_temp1) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } /* r = (g^k mod p) mod q */ if (mp_mod(&dss_temp1, key->q, &dss_r) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } /* x*r mod q */ if (mp_mulmod(&dss_r, key->x, key->q, &dss_temp1) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } /* (SHA1(M) + xr) mod q) */ if (mp_addmod(&dss_m, &dss_temp1, key->q, &dss_temp2) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } /* (k^-1) mod q */ if (mp_invmod(&dss_k, key->q, &dss_temp1) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } /* s = (k^-1(SHA1(M) + xr)) mod q */ if (mp_mulmod(&dss_temp1, &dss_temp2, key->q, &dss_s) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } buf_putstring(buf, SSH_SIGNKEY_DSS, SSH_SIGNKEY_DSS_LEN); @@ -392,7 +392,7 @@ } if (mp_to_unsigned_bin(&dss_r, buf_getwriteptr(buf, writelen)) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } mp_clear(&dss_r); buf_incrwritepos(buf, writelen); @@ -405,7 +405,7 @@ } if (mp_to_unsigned_bin(&dss_s, buf_getwriteptr(buf, writelen)) != MP_OKAY) { - dropbear_exit("dss error"); + dropbear_exit("DSS error"); } mp_clear(&dss_s); buf_incrwritepos(buf, writelen);