Commit Graph

587 Commits

Author SHA1 Message Date
Love Hornquist Astrand
20e4f3b9de more glue 2010-10-11 20:04:11 -07:00
Love Hornquist Astrand
8e24a897d7 make code match comment 2010-10-12 04:27:13 +02:00
Love Hornquist Astrand
34e5278ae4 random bits 2010-10-04 00:03:12 -07:00
Love Hornquist Astrand
106689c7a0 add rsakey2048 and rsakey4096 2010-10-03 18:13:58 -07:00
Love Hornquist Astrand
b7b40b1ef9 add more speed (or maybe non speed numbers) 2010-10-03 18:13:16 -07:00
Love Hornquist Astrand
4c1b29346f test rsakey2048 2010-10-03 17:06:48 -07:00
Love Hornquist Astrand
b4181e4560 rsakey2048 2010-10-03 17:04:48 -07:00
Love Hornquist Astrand
c6fb9428dd Drop imath for ltm for speed reasons 2010-10-02 12:28:27 -07:00
Love Hornquist Astrand
b206aeb016 SHA384 2010-09-30 18:22:00 -07:00
Love Hornquist Astrand
150f1401d1 Add SHA512 2010-09-30 00:08:48 -07:00
Love Hornquist Astrand
b32651c830 SHA512 support 2010-09-29 23:41:15 -07:00
Love Hornquist Astrand
5410614330 free more bn that was allocated 2010-09-28 22:12:20 -07:00
Love Hornquist Astrand
97d939d9af don't allocate n twice, indent 2010-09-28 22:08:00 -07:00
Asanka C. Herath
a4be8fcd7e Windows: Add missing export for libhcrypto-exports.def 2010-09-18 23:41:53 -04:00
Love Hornquist Astrand
8de6bccd50 add validate.obj 2010-09-18 11:33:09 -07:00
Simon Wilkinson
75df9577e7 Uses unsigned ints for lengths
EVP_BytesToKey uses min() on a mixture of signed and unsigned
paramters. To avoid compiler warnings, use unsigned int for all
of the iv and key lengths in this function.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-18 11:30:06 -07:00
Love Hornquist Astrand
d82410ea88 add header files for libtommath 2010-09-15 12:06:16 -07:00
Simon Wilkinson
d28ec4ba61 Don't typedef u8, u16, u32 in rijndael-alg-fast.c
Some kernels define u8, u16 and u32 in their standard headers.
Redefining these symbols in hcrypto's own code prevents that code
from compiling on those kernels.

Instead, just replace all occurrences of u8, u16 and u32 with the
symbols that uint8_t, uint16_t and uint32_t that they were being
typedef'd as, anyway.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-14 10:26:14 -07:00
Simon Wilkinson
8a5d3ca959 Rename current to SHA1current
Some kernels define 'current' as a #define. This causes chaos when
we try to build sha.c. So, rename current as 'SHA1current', and avoid
the insanity.
2010-09-14 10:24:43 -07:00
Asanka Herath
4b8c523d28 Fix line endings 2010-09-14 08:04:10 -04:00
Asanka Herath
8a1fb91009 Don't fail tests for unsupported rand methods 2010-09-14 08:03:29 -04:00
Asanka Herath
2ea71109d3 Windows: Add missing exports to libhcrypto-exports.def 2010-09-14 08:03:28 -04:00
Asanka Herath
1e540dbf5c Windows: Fix dependencies for hcrypto/test_hmac.exe 2010-09-14 08:03:28 -04:00
Love Hornquist Astrand
17d64b8507 add validation of hmac 2010-09-08 00:06:40 -07:00
Love Hornquist Astrand
51e6e505f1 add validate.c 2010-09-08 00:04:18 -07:00
Love Hornquist Astrand
b897f2df34 export hc_hcrypto_validate 2010-09-08 00:04:10 -07:00
Love Hornquist Astrand
28c80fdf15 validate args before use 2010-09-08 00:04:01 -07:00
Love Hornquist Astrand
76867d73ab validate args before use 2010-09-08 00:03:39 -07:00
Love Hornquist Astrand
cf3d2ca7ed simple validation of crypto core 2010-09-08 00:03:27 -07:00
Love Hornquist Astrand
eb2b84791a add back tfm 2010-09-07 23:58:34 -07:00
Love Hornquist Astrand
c3670bb45f remove unused variable 2010-09-07 23:57:12 -07:00
Love Hornquist Astrand
7c0b7083ea add missing ; 2010-09-07 23:56:40 -07:00
Love Hornquist Astrand
04e0c67070 wrap common crypto in HAVE_COMMONCRYPTO_COMMONCRYPTOR_H 2010-09-07 23:25:33 -07:00
Love Hornquist Astrand
4f5390877a plug memory leaks 2010-08-23 22:02:10 -07:00
Simon Wilkinson
bbc9176868 hcrypto: Don't use 'u' as a variable name
Some kernels #define u as a pointer to the current user structure.
This causes problems when trying to use hcrypto's hash routines in
those kernels, as they try to use 'u' as a variable name for a
structure pointer. Change this variable name to avoid the conflict.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-08-23 21:21:14 -07:00
Asanka Herath
8e8cf3814f Use <errno.h> instead of <sys/errno.h> in hcrypto/common.c 2010-08-20 16:56:46 -04:00
Asanka Herath
4b1fbabe68 Windows: Fix build rules and includes for libtommath 2010-08-20 16:55:53 -04:00
Asanka Herath
93c08e67f0 Windows: Add missing dependency 2010-08-20 16:55:15 -04:00
Asanka Herath
fd3d2ccd0d Windows: Build with USE_HCRYPTO_IMATH 2010-08-20 16:53:57 -04:00
Asanka Herath
0730c0b98f Windows: ASN1_LIB needs to be defined for Heimdal library 2010-08-20 13:14:12 -04:00
Asanka Herath
63e3aedf8c Windows: Fix lib/hcrypto tests 2010-08-20 13:09:49 -04:00
Asanka Herath
2730cfc919 lib/hcrypto/test_*: Use "rb" when opening binary files 2010-08-20 13:09:47 -04:00
Asanka Herath
e88a1d83c6 test_crypto.in: Also test w32crypto 2010-08-20 13:09:47 -04:00
Asanka Herath
eafb187cd0 Declare RAND_w32crypto_method() 2010-08-20 13:09:46 -04:00
Asanka Herath
9b466f35fb Windows: RAND_file_name() should look up profile path
If RANDFILE and HOME environment variables aren't defined, failover to
looking up the user's profile path.  In particular, default to a file
named .rnd in the user's local (non-roamin) application data
directory.
2010-08-20 13:09:45 -04:00
Asanka Herath
7af1f40258 hcrypto/test_rand.c: Add w32crypto method
Also make it non-fatal to request a method that is unsupported.  This
makes it possible to only test methods that we are compiling.
2010-08-20 13:09:44 -04:00
Asanka Herath
f807cb8152 Windows: Update exports 2010-08-20 13:07:58 -04:00
Asanka Herath
ba44354336 Windows: Check exported symbols
During a test run, cross check the Windows exports list against the
version-script files.  For the test to pass, all symbols on either
list should be accounted for.

If there are symbols that are specific to Windows or symbols that are
not included on Windows, they should be annotated in the .def file as
follows:

    ;!  non_windows_symbol

    	common_symbol

        windows_only_symbol ;!
2010-08-20 13:06:55 -04:00
Asanka Herath
d83611238a Windows: Build a single heimdal.dll
Heimdal.dll is a combination of libasn1, libwind, libhcrypto, libhx509
and libkrb5.
2010-08-20 13:06:54 -04:00
Asanka Herath
ea4d8dbfdb Windows: Use EXEPREP and DLLPREP macros for processing binaries
Once DLLs and EXEs are built, they need to have their manifests
processed and signed.  These steps are encapsulated in the EXEPREP and
DLLPREP Makefile macros.  Use them instead of invoking each processing
macro individually.
2010-08-20 13:04:06 -04:00