comparison dss.c @ 1431:793c43cf523e fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Jun 2017 10:34:19 +0800
parents 69862e8cc405 7aebe7da3a35
children 41dca1e5ea34
comparison
equal deleted inserted replaced
1428:69862e8cc405 1431:793c43cf523e
59 TRACE(("leave buf_get_dss_pub_key: failed reading mpints")) 59 TRACE(("leave buf_get_dss_pub_key: failed reading mpints"))
60 ret = DROPBEAR_FAILURE; 60 ret = DROPBEAR_FAILURE;
61 goto out; 61 goto out;
62 } 62 }
63 63
64 if (mp_count_bits(key->p) < DSS_P_BITS) { 64 if (mp_count_bits(key->p) != DSS_P_BITS) {
65 dropbear_log(LOG_WARNING, "Bad DSS p"); 65 dropbear_log(LOG_WARNING, "Bad DSS p");
66 TRACE(("leave buf_get_dss_pub_key: short key"))
67 ret = DROPBEAR_FAILURE; 66 ret = DROPBEAR_FAILURE;
68 goto out; 67 goto out;
69 } 68 }
70 69
71 if (mp_count_bits(key->q) < DSS_Q_BITS) { 70 if (mp_count_bits(key->q) != DSS_Q_BITS) {
72 dropbear_log(LOG_WARNING, "Bad DSS q"); 71 dropbear_log(LOG_WARNING, "Bad DSS q");
73 TRACE(("leave buf_get_dss_pub_key: short key"))
74 ret = DROPBEAR_FAILURE; 72 ret = DROPBEAR_FAILURE;
75 goto out; 73 goto out;
76 } 74 }
77 75
78 ret = DROPBEAR_SUCCESS; 76 ret = DROPBEAR_SUCCESS;