diff options
author | Matt Johnston <matt@ucc.asn.au> | 2016-05-04 15:33:40 +0200 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2016-05-04 15:33:40 +0200 |
commit | 32a28d0d9cf7c567671366d6ec71df87627e2c49 (patch) | |
tree | eed0f72ed707d62a28b4cb1d8da05c5d1b3f23c3 /ecdsa.c | |
parent | d6daad29fcfc20295473bf7e6a96f3016282e9e6 (diff) |
Convert #ifdef to #if, other build changes
Diffstat (limited to 'ecdsa.c')
-rw-r--r-- | ecdsa.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -6,7 +6,7 @@ #include "ecdsa.h" #include "signkey.h" -#ifdef DROPBEAR_ECDSA +#if DROPBEAR_ECDSA int signkey_is_ecdsa(enum signkey_type type) { @@ -16,17 +16,17 @@ int signkey_is_ecdsa(enum signkey_type type) } enum signkey_type ecdsa_signkey_type(ecc_key * key) { -#ifdef DROPBEAR_ECC_256 +#if DROPBEAR_ECC_256 if (key->dp == ecc_curve_nistp256.dp) { return DROPBEAR_SIGNKEY_ECDSA_NISTP256; } #endif -#ifdef DROPBEAR_ECC_384 +#if DROPBEAR_ECC_384 if (key->dp == ecc_curve_nistp384.dp) { return DROPBEAR_SIGNKEY_ECDSA_NISTP384; } #endif -#ifdef DROPBEAR_ECC_521 +#if DROPBEAR_ECC_521 if (key->dp == ecc_curve_nistp521.dp) { return DROPBEAR_SIGNKEY_ECDSA_NISTP521; } @@ -38,17 +38,17 @@ ecc_key *gen_ecdsa_priv_key(unsigned int bit_size) { const ltc_ecc_set_type *dp = NULL; /* curve domain parameters */ ecc_key *new_key = NULL; switch (bit_size) { -#ifdef DROPBEAR_ECC_256 +#if DROPBEAR_ECC_256 case 256: dp = ecc_curve_nistp256.dp; break; #endif -#ifdef DROPBEAR_ECC_384 +#if DROPBEAR_ECC_384 case 384: dp = ecc_curve_nistp384.dp; break; #endif -#ifdef DROPBEAR_ECC_521 +#if DROPBEAR_ECC_521 case 521: dp = ecc_curve_nistp521.dp; break; @@ -56,13 +56,13 @@ ecc_key *gen_ecdsa_priv_key(unsigned int bit_size) { } if (!dp) { dropbear_exit("Key size %d isn't valid. Try " -#ifdef DROPBEAR_ECC_256 +#if DROPBEAR_ECC_256 "256 " #endif -#ifdef DROPBEAR_ECC_384 +#if DROPBEAR_ECC_384 "384 " #endif -#ifdef DROPBEAR_ECC_521 +#if DROPBEAR_ECC_521 "521 " #endif , bit_size); |