Commit Graph

26 Commits

Author SHA1 Message Date
Nicolas Williams
05e8c0ede6 Check HMAC_Init_ex() return value 2022-01-14 12:48:32 -06:00
Luke Howard
920cfc5584 gss: use _gss_ntlm_set_keys() in gss_init_sec_context()
DRY: use the _gss_ntlm_set_keys() helper function to initialize the key state
for both initiator and acceptor.
2020-02-04 17:28:35 +11:00
Luke Howard
83d2951c0d gssapi: SPNEGO does not reset NTLM RC4 state (#509) 2019-01-06 20:50:24 -06: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
Nicolas Williams
d3f9bea491 Fix lib/gssapi/ntlm/crypto.c includes 2016-04-15 00:16:14 -05:00
Love Hörnquist Åstrand
01dbfac96f fix warnings 2014-02-14 19:45:46 -08:00
Jeffrey Altman
8fe301c692 Include krb5-private.h in gssapi/ntlm/crypto.c
Instead of locally defining prototypes for private functions
_krb5_crc_update and _krb5_crc_init_table simply include
krb5-private.h.

Change-Id: Ia7931f8df2e68eb038d112797edfd456ffcdd23a
2013-06-22 21:17:18 -04:00
Nicolas Williams
774f166e31 First attempt s/\<const gss_.*_t/gss_const_.*_t/g 2013-06-02 15:30:58 -05:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Asanka Herath
5dcc605f6b Fix calling conventions for Windows 2010-08-20 13:14:10 -04:00
Love Hornquist Astrand
ab1b87b557 drop RCSID 2009-11-14 11:15:57 -08:00
Love Hornquist Astrand
03cb3aa56b use EVP_MD_CTX_create 2009-08-20 17:13:09 -07:00
Love Hornquist Astrand
dfd1edb54d switch to use EVP interface instead of old MDX_ style interface 2009-08-17 10:20:01 +02:00
Love Hörnquist Åstrand
26cc8f6525 flatten namespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24482 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 20:49:54 +00: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
1106480143 output buffer always set
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23673 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-25 02:32:55 +00:00
Love Hörnquist Åstrand
59171e8164 minor status must be set.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23672 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-25 02:32:43 +00:00
Love Hörnquist Åstrand
3cc3d6398b (_gss_ntlm_set_key): add signseal argument
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19535 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-28 14:49:01 +00:00
Love Hörnquist Åstrand
2412c6be41 (_gss_ntlm_set_key): set ntlm v2 keys.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19529 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-28 14:38:07 +00:00
Love Hörnquist Åstrand
3f4a53cda3 NTLMv2 sign and verify.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19525 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-28 13:58:52 +00:00
Love Hörnquist Åstrand
1384d00d1d add v2 sign and seal function (commented out, key derivation still missing).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19508 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-26 18:16:38 +00:00
Love Hörnquist Åstrand
026563966f Implement SEAL.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19456 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-19 18:19:07 +00:00
Love Hörnquist Åstrand
5e734075a4 Overwrite the first 4 bytes of the encrypted checksum with a random
number (or so davenport tells me). Interesting question, is this
really how it worked, not that the first 4 bytes is a nonce/iv to hide
first bytes of the rc4 stream, in the end it doesn't matter, it fact
the bits didn't even need to go over the network.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19454 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-19 17:03:01 +00:00
Love Hörnquist Åstrand
a68c0f76db move gss_wrap/gss_unwrap here
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19450 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-19 15:56:37 +00:00
Love Hörnquist Åstrand
b5d0a38c06 Move get and verify mic to the same file since they share code,
implement NTLM v1 and dummy signatures.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19439 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-19 15:31:46 +00:00