|
100 | 100 | REPRODUCIBLE_BUILD_DEFAULT=no |
101 | 101 | fi |
102 | 102 |
|
| 103 | +# Fail when an option is passed that is not recognized |
| 104 | +m4_divert_once([DEFAULTS], [enable_option_checking=fatal]) |
| 105 | + |
103 | 106 | # Allow experimental settings |
104 | 107 | AC_ARG_ENABLE([experimental], |
105 | 108 | [AS_HELP_STRING([--enable-experimental],[Allow experimental settings in the configuration (default: disabled)])], |
@@ -3757,13 +3760,13 @@ then |
3757 | 3760 | fi |
3758 | 3761 |
|
3759 | 3762 | # ECC Minimum Key Size |
3760 | | -ENABLED_ECCMINSZ=224 |
3761 | 3763 | AC_ARG_WITH([eccminsz], |
3762 | 3764 | [AS_HELP_STRING([--with-eccminsz=BITS],[Sets the ECC minimum key size (default: 224 bits)])], |
3763 | 3765 | [ |
3764 | 3766 | ENABLED_ECCMINSZ=$withval |
3765 | 3767 | AM_CFLAGS="$AM_CFLAGS -DECC_MIN_KEY_SZ=$withval" |
3766 | | - ] |
| 3768 | + ], |
| 3769 | + [ ENABLED_ECCMINSZ=224 ] |
3767 | 3770 | ) |
3768 | 3771 |
|
3769 | 3772 | # Compressed Key |
|
8324 | 8327 | AC_ARG_WITH([max-ecc-bits], |
8325 | 8328 | [AS_HELP_STRING([--with-max-ecc-bits=number],[number of bits to support for ECC algorithms])], |
8326 | 8329 | [WITH_MAX_ECC_BITS=$withval], |
8327 | | - [WITH_MAX_ECC_BITS="$DEFAULT_MAX_ECC_BITS"]) |
| 8330 | + ) |
8328 | 8331 |
|
8329 | 8332 | if test -n "$WITH_MAX_ECC_BITS"; then |
8330 | 8333 | if test "$WITH_MAX_ECC_BITS" -lt 112 -o "$WITH_MAX_ECC_BITS" -gt 1024; then |
@@ -10044,3 +10047,10 @@ if test "$MINGW_LIB_WARNING" = "yes" |
10044 | 10047 | then |
10045 | 10048 | AC_MSG_WARN([Building with shared and static library at the same time on this system may cause export/import problems when using non contemporary GNU tools.]) |
10046 | 10049 | fi |
| 10050 | +
|
| 10051 | +if test -n "$WITH_MAX_ECC_BITS"; then |
| 10052 | + if test "$WITH_MAX_ECC_BITS" -lt "$ENABLED_ECCMINSZ"; then |
| 10053 | + AC_MSG_ERROR([--with-max-ecc-bits argument ($WITH_MAX_ECC_BITS) must be greater than --with-eccminsz argument ($ENABLED_ECCMINSZ)]) |
| 10054 | + fi |
| 10055 | +fi |
| 10056 | +
|
0 commit comments