Permalink
Browse files

more checks for configure. omit salt from Rijndael-encrypted data as …

…returned by fko_get_dpa_data.

git-svn-id: file:///home/mbr/svn/fwknop/trunk@27 510a4753-2344-4c79-9c09-4d669213fbeb
  • Loading branch information...
1 parent e6eb306 commit 474a787e0be9f691bb1ae11ff4a01819936e49ed Damien Stuart committed Dec 28, 2008
Showing with 9 additions and 4 deletions.
  1. +3 −4 configure.ac
  2. +6 −0 fko/fko_funcs.c
View
7 configure.ac
@@ -23,9 +23,7 @@ AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
-
-#--DSS
-#AC_PROG_RANLIB
+AC_PROG_RANLIB
AC_PROG_LIBTOOL
# Checks for header files.
@@ -52,7 +50,8 @@ AC_C_CONST
# Checks for library functions.
#
AC_FUNC_MALLOC
-AC_CHECK_FUNCS([bzero gettimeofday memmove memset strchr strcspn strdup strrchr strspn])
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([bzero gettimeofday memmove memset strchr strcspn strdup strndup strrchr strspn])
AC_CONFIG_FILES([Makefile
fko/Makefile
View
6 fko/fko_funcs.c
@@ -224,6 +224,12 @@ fko_get_spa_data(fko_ctx_t *ctx)
if(!CTX_INITIALIZED(ctx))
return NULL;
+ /* Notice we omit the first 10 bytes if Rijndael encryption is
+ * used (to eliminate the consistent 'Salted__' string).
+ */
+ if(ctx->encryption_type == FKO_ENCRYPTION_RIJNDAEL)
+ return(ctx->encrypted_msg+10);
+
return(ctx->encrypted_msg);
}

0 comments on commit 474a787

Please sign in to comment.