comparison dss.c @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents aaf576b27a10
children c98e242dc505
comparison
equal deleted inserted replaced
1294:56aba7dedbea 1295:750ec4ec4cbe
35 * is in gendss.c, since it isn't required in the server itself. 35 * is in gendss.c, since it isn't required in the server itself.
36 * 36 *
37 * See FIPS186 or the Handbook of Applied Cryptography for details of the 37 * See FIPS186 or the Handbook of Applied Cryptography for details of the
38 * algorithm */ 38 * algorithm */
39 39
40 #ifdef DROPBEAR_DSS 40 #if DROPBEAR_DSS
41 41
42 /* Load a dss key from a buffer, initialising the values. 42 /* Load a dss key from a buffer, initialising the values.
43 * The key will have the same format as buf_put_dss_key. 43 * The key will have the same format as buf_put_dss_key.
44 * These should be freed with dss_key_free. 44 * These should be freed with dss_key_free.
45 * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ 45 * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
151 buf_put_dss_pub_key(buf, key); 151 buf_put_dss_pub_key(buf, key);
152 buf_putmpint(buf, key->x); 152 buf_putmpint(buf, key->x);
153 153
154 } 154 }
155 155
156 #ifdef DROPBEAR_SIGNKEY_VERIFY 156 #if DROPBEAR_SIGNKEY_VERIFY
157 /* Verify a DSS signature (in buf) made on data by the key given. 157 /* Verify a DSS signature (in buf) made on data by the key given.
158 * returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ 158 * returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
159 int buf_dss_verify(buffer* buf, dropbear_dss_key *key, buffer *data_buf) { 159 int buf_dss_verify(buffer* buf, dropbear_dss_key *key, buffer *data_buf) {
160 unsigned char msghash[SHA1_HASH_SIZE]; 160 unsigned char msghash[SHA1_HASH_SIZE];
161 hash_state hs; 161 hash_state hs;