Commit Graph

470 Commits

Author SHA1 Message Date
Jeffrey Hutzelman
db8f03740a hcrypto/rand-unix.c: Ignore write(2) result harder
unix_seed(), called by the add-seed-data op unix_add(), attempts to
write seed data to the random data device.  If this fails, the failure
is ignored, as it must be, since there is no way to inform the caller.

This change modifies the way in which the return value from write(2)
is ignored, to avoid compiler warnings when building on Ubuntu 12.10,
with gcc 4.7.2 and eglibc 2.15-0ubuntu20.1.
2013-06-18 22:40:49 -04:00
Love Hornquist Astrand
4256823e58 memset right size 2013-04-29 21:59:11 -07:00
Love Hornquist Astrand
e91bd34275 add rsa_keygen initializer 2013-04-29 12:03:42 -07:00
Love Hornquist Astrand
ed87e9b33a use after free 2012-11-27 21:58:04 -08:00
Love Hörnquist Åstrand
9ad763288d fix -Wshadow 2012-11-17 14:14:52 -08:00
Simon Wilkinson
10133ece1a hcrypto: Use correct size for memset in md2
md2.c was doing memset(m, 0, sizeof(m)), and so was only clearing
the first 4 bytes of the passed md2 structure in MD2_Final. Fix
this to clear the entire structure, as expected.
2012-03-31 19:06:59 -04:00
Love Hornquist Astrand
8a0e0f9472 do m-r on more then one prime 2011-11-21 20:33:53 -08:00
Love Hornquist Astrand
308be3a9e2 Don't export tests from library, reported in bug from Tom Payeire 2011-09-26 17:53:13 +02:00
Love Hornquist Astrand
6b5cc16d5d use -r instead of -e to please solaris test 2011-09-23 13:17:05 +02:00
Love Hornquist Astrand
df1e4c388a send output to /dev/null from cmp since the output should always be different 2011-09-23 13:08:54 +02:00
Jeffrey Altman
63b3cb9749 Windows: fallback to PROV_RNG if no PROV_RSA_FULL
Heimdal can be executed in environments in which the user
account profile is not loaded.  In such environments it is
not possible to use PROV_RSA_FULL as it stores required
data within the profile.  Instead, fallback to PROV_RNG which
does not store data within the profile and can be used to access
secure random number generator routines.

Change-Id: If600246f39645ed6bf5af0dd237f5adfddcf6c0c
2011-09-20 16:17:42 -04:00
chas williams - CONTRACTOR
b118610a9c hcrypto: var name current conflicts with linux kernel
on a big endian machine, usage of this file in the kernel
is somewhat troublesome since the linux kernel already has
a well known global/#define called current.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-09-09 10:08:34 +02:00
Love Hörnquist Åstrand
d434bda588 make sure keylen is a multiple of 2 2011-07-24 12:34:51 -07:00
Love Hörnquist Åstrand
12403a31ce sprinkle more windows files 2011-07-23 11:18:21 -07:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Jeffrey Altman
6850d6a65f avoid uninit variable and unreachable code warnings
most of these warnings are not problems because of ample
use of abort() calls.  However, the large number of warnings
makes it difficult to identify real problems.  Initialize
the variables to shut up the compilers.

Change-Id: I8477c11b17c7b6a7d9074c721fdd2d7303b186a8
2011-05-17 12:02:16 -04:00
Asanka C. Herath
b755dc12f4 Windows: Fix hcrypto tests on cygwin 2010-11-29 10:53:50 -05:00
Asanka C. Herath
6d662f71d7 Windows: Fix export lists 2010-11-29 10:53:49 -05:00
Love Hornquist Astrand
db7f598466 return size is a int, don't pretend. 2010-11-27 12:37:49 -08:00
Love Hornquist Astrand
104033874d provide symbol renameing for sha512 and sha384 2010-11-26 10:05:58 -08:00
Love Hornquist Astrand
60a7783024 export more 2010-11-26 09:15:23 -08:00
Asanka C. Herath
3855dd33bd Windows: Catch up with hcrypto changes 2010-11-24 15:32:31 -05:00
Asanka C. Herath
dd99c2054c Windows: Add missing hcrypto dependencies and exports 2010-11-24 15:32:25 -05:00
Simon Wilkinson
5b91f58f35 hcrypto: Remove getarg.h include from validate.c
None of the functions prototyped in getarg.h are used by validate.c,
so simplify out-of-tree builds by removing the header from the file.
2010-11-24 10:55:27 +00:00
Love Hornquist Astrand
bbe08b7750 use clear_multi, don't call init twice 2010-10-27 22:19:22 -07:00
Love Hornquist Astrand
6d47c862ec really free memory too 2010-10-27 22:13:04 -07:00
Love Hornquist Astrand
b7ac4c9333 really free memory too 2010-10-27 22:12:30 -07:00
Love Hornquist Astrand
acbdbb753e plug memory leaks 2010-10-27 22:03:36 -07:00
Chas Williams (CONTRACTOR)
a3afa695ee hcrypto: struct x64 doesn't need bitfields
hcrypto: struct x64 doesn't need bitfields

    The bitfield specifications on the struct x64 members do not actually do
    anything to guarantee/force packing or endian of the members.  Removing
    them allows the code to compile on certain compilers that do not support
    bitfields on 64-bit types.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-10-23 17:24:28 -07:00
Love Hornquist Astrand
8e7cf16491 Switch to ULL 2010-10-11 20:15:37 -07:00
Love Hornquist Astrand
f5b16cbddb remove tfm 2010-10-11 20:10:24 -07:00
Simon Wilkinson
4dc6b5f259 hcrypto: Flag 64bit bit constants as long long
When using 64bit constants for initialisation flag them as LL, so
the compiler doesn't try to cast them down to a long, and throw away
information, on 32 bit platforms.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-10-11 20:08:25 -07:00
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