Skip to content

Commit

Permalink
Don't do AFS string-to-key tests when feature is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Dukhovni authored and nicowilliams committed Mar 17, 2017
1 parent bc4b7a3 commit 0f05029
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -282,7 +282,9 @@ AC_ARG_ENABLE(afs-string-to-key,

if test "$enable_afs_string_to_key" = "yes"; then
AC_DEFINE(ENABLE_AFS_STRING_TO_KEY, 1, [Define if want to use the weak AFS string to key functions.])
ENABLE_AFS_STRING_TO_KEY=1
fi
AC_SUBST(ENABLE_AFS_STRING_TO_KEY)dnl


rk_CHECK_MAN
Expand Down
1 change: 1 addition & 0 deletions tests/kdc/Makefile.am
Expand Up @@ -59,6 +59,7 @@ do_subst = $(heim_verbose)sed $(do_dlopen) \
-e 's,[@]objdir[@],$(top_builddir)/tests/kdc,g' \
-e 's,[@]top_builddir[@],$(top_builddir),g' \
-e 's,[@]db_type[@],$(db_type),g' \
-e 's,[@]ENABLE_AFS_STRING_TO_KEY[@],$(ENABLE_AFS_STRING_TO_KEY),' \
-e 's,[@]EGREP[@],$(EGREP),g'

chmod = chmod
Expand Down
16 changes: 9 additions & 7 deletions tests/kdc/check-keys.in
Expand Up @@ -91,12 +91,14 @@ sed -e 's/@keys@/des:pw-salt:/' \
${sedvars} < ${CIN} > ${COUT}
${kadmin} cpw -p foo ${principal} || exit 1

sed -e 's/@keys@/des-cbc-crc:afs3-salt:test.h5l.se/' \
${sedvars} < ${CIN} > ${COUT}
${kadmin} cpw -p foo ${principal} || exit 1

sed -e 's/@keys@/des:afs3-salt:test.h5l.se/' \
${sedvars} < ${CIN} > ${COUT}
${kadmin} cpw -p foo ${principal} || exit 1
if [ 'X@ENABLE_AFS_STRING_TO_KEY@' = "X1" ]; then
sed -e 's/@keys@/des-cbc-crc:afs3-salt:test.h5l.se/' \
${sedvars} < ${CIN} > ${COUT}
${kadmin} cpw -p foo ${principal} || exit 1

sed -e 's/@keys@/des:afs3-salt:test.h5l.se/' \
${sedvars} < ${CIN} > ${COUT}
${kadmin} cpw -p foo ${principal} || exit 1
fi

exit 0

0 comments on commit 0f05029

Please sign in to comment.