Commit Graph

15 Commits

Author SHA1 Message Date
Nicolas Williams
3a5e91eca2 hcrypto: Remove MD2 with prejudice
We don't use it anywhere for anything.
2022-11-01 16:10:57 -05:00
Nicolas Williams
5b1c69b424 hcrypto: Fix UB 2022-11-01 16:10:57 -05:00
Nicolas Williams
490337f4f9 Make OpenSSL an hcrypto backend proper
This adds a new backend for libhcrypto: the OpenSSL backend.

Now libhcrypto has these backends:

 - hcrypto itself (i.e., the algorithms coded in lib/hcrypto)
 - Common Crypto (OS X)
 - PKCS#11 (specifically for Solaris, but not Solaris-specific)
 - Windows CNG (Windows)
 - OpenSSL (generic)

The ./configure --with-openssl=... option no longer disables the use of
hcrypto.  Instead it enables the use of OpenSSL as a (and the default)
backend in libhcrypto.  The libhcrypto framework is now always used.

OpenSSL should no longer be used directly within Heimdal, except in the
OpenSSL hcrypto backend itself, and files where elliptic curve (EC)
crypto is needed.

Because libhcrypto's EC support is incomplete, we can only use OpenSSL
for EC.  Currently that means separating all EC-using code so that it
does not use hcrypto, thus the libhx509/hxtool and PKINIT EC code has
been moved out of the files it used to be in.
2016-04-15 00:16:17 -05:00
Jeffrey Altman
0f97855826 hcrypto: config/roken cleanup
All source files in lib/hcrypto should be built the same way.
Since this source directory is dependent on libroken then all source
files must be built using the roken.h declarations and included headers.

Also, there is no config.h in the local directory so angle brackets
include of quotes should be used.

Finally, because roken.h includes stdio.h, stdlib.h, stdarg.h, limits.h,
strings.h, sys/types.h, etc., do not include them separately.

Start all source files with

  #include <config.h>
  #include <roken.h>

Change-Id: I09ab47f8a5472018efe6c8b59a0e51fde8f24724
2016-04-10 17:05:07 -05:00
Love Hörnquist Åstrand
6d57bb6a4a quiet warnings 2014-02-14 19:26:20 -08:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
b206aeb016 SHA384 2010-09-30 18:22:00 -07:00
Love Hornquist Astrand
b32651c830 SHA512 support 2010-09-29 23:41:15 -07:00
Love Hornquist Astrand
3a031244bc Drop RCSID and HAVE_CONFIG_H 2009-08-05 13:37:37 +02:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
89d5b031f9 define HC_DEPRECATED_CRYPTO
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23610 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-17 15:56:40 +00:00
Love Hörnquist Åstrand
b53a7211c7 Use EVP_MD_CTX_create()/EVP_MD_CTX_destroy().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23136 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-29 05:46:42 +00:00
Love Hörnquist Åstrand
315bfba601 (hash_test): free result.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20870 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-03 21:09:10 +00:00
Love Hörnquist Åstrand
7ba2b2006c rename des to hcrypto
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20466 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-20 08:29:05 +00:00