summaryrefslogtreecommitdiffhomepage
path: root/dss.c
diff options
context:
space:
mode:
Diffstat (limited to 'dss.c')
-rw-r--r--dss.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dss.c b/dss.c
index 84a093c..95062c6 100644
--- a/dss.c
+++ b/dss.c
@@ -338,7 +338,9 @@ void buf_put_dss_sign(buffer* buf, dss_key *key, const unsigned char* data,
/* generate k */
m_mp_init(&dss_protok);
bytes_to_mp(&dss_protok, proto_k, SHA512_HASH_SIZE);
- mp_mod(&dss_protok, key->q, &dss_k);
+ if (mp_mod(&dss_protok, key->q, &dss_k) != MP_OKAY) {
+ dropbear_exit("dss error");
+ }
mp_clear(&dss_protok);
m_burn(proto_k, SHA512_HASH_SIZE);
#else /* DSS_PROTOK not defined*/