113 Commits

Author SHA1 Message Date
Nicolas Williams
d0f3d826dd otp: Fix warnings 2022-01-14 17:59:49 -06:00
Luke Howard
014f16883c libhcrypto: UI_UTIL_FLAG_VERIFY_SILENT 2018-12-30 15:39:49 -06:00
Nicolas Williams
620862049e Use roken_get_*() instead of getpwuuid()
Using non-reentrant getpwuid() (or getpwnam(), or getspnam())  can be
dangerous.  We had a report of a login application / PAM that calls
those, and Heimdal, by calling them too, clobbered the cached struct
passwd used by the login app / PAM.
2018-12-25 22:11:19 -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
Jelmer Vernooij
70e43e9808 Fix some typos. 2014-04-25 02:42:17 +02:00
Roland C. Dowdeswell
e8779d5d4a Add -Wshadow and deal with the warnings. 2012-02-21 11:17:55 +00:00
Roland C. Dowdeswell
cc47c8fa7b Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

	1.  a lot of missing structure initialisers,

	2.  unchecked return values for functions that glibc
	    marks as __attribute__((warn-unused-result)),

	3.  made minor modifications to slc and asn1_compile
	    which can generate code which generates warnings,
	    and

	4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00: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
Thomas Klausner
97df66c0a0 Put Nd argument after Nd macro.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:27 -07:00
Jelmer Vernooij
1bc55fab42 Explicitly link against required libraries.
This breaks on some newer systems which enable --as-needed by default.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-12-19 22:50:00 -08:00
Love Hornquist Astrand
c6bbdb545b First drop of Windows build infrastructure from Secure Endpoints 2009-11-24 12:12:53 -08: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
cc4333b758 remove cvs ignore files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-09 03:09:59 +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
Love Hörnquist Åstrand
f0c9af9324 Add man_MANS to EXTRA_DIST
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18304 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-07 14:13:30 +00:00
Love Hörnquist Åstrand
5b5bde55dd x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18303 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-07 14:10:51 +00:00
Love Hörnquist Åstrand
cd50a8d104 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15251 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-29 13:08:35 +00:00
Love Hörnquist Åstrand
7b0cd21e58 add LIB_roken as a explit dependency
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15250 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-29 13:08:22 +00:00
Johan Danielsson
0624b4457e replace INCLUDES with AM_CPPFLAGS
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14164 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-08-26 11:55:29 +00:00
Love Hörnquist Åstrand
bf6845d115 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12756 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-03 09:38:40 +00:00
Love Hörnquist Åstrand
54fc57ccb5 s/des_read_pw_string/UI_UTIL_read_pw_string/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12753 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-03 09:37:03 +00:00
Love Hörnquist Åstrand
d778be95e3 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11667 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-02-25 10:56:07 +00:00
Love Hörnquist Åstrand
0cb8221dda remove \n from errx, from NetBSD
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11666 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-02-25 10:55:17 +00:00
Love Hörnquist Åstrand
aa25cfcafa add copyright/license statment
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11648 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-02-16 21:10:32 +00:00
Johan Danielsson
77de2f4011 use crypto-headers.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11444 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-09-10 20:03:49 +00:00
Assar Westerlund
9b8ad9f282 set and use INCLUDE_des
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10574 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-28 08:31:31 +00:00
Assar Westerlund
aad564d1c2 re-write the handling of crypto libraries. try to use the one of
openssl's libcrypto or krb4's libdes that has all the required
functionality (md4, md5, sha1, des, rc4).  if there is no such
library, the included lib/des is built.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10519 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-22 20:30:33 +00:00
Assar Westerlund
334c7ffa33 merge of DB-NEW
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10453 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-09 08:41:49 +00:00
Assar Westerlund
72d63b3d29 remove extra .El
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10027 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-08 20:44:46 +00:00
Assar Westerlund
67422a6b02 s/[gs]et_progname/[gs]etprogname/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9704 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-20 01:44:56 +00:00
Assar Westerlund
2aefcf796c try to use handle using openssl instead of libdes better. based on patches from GOMBAS Gabor <gombasg@inf.elte.hu> and Brian May <bam@snoopy.apana.org.au>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9681 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-15 04:20:54 +00:00
Assar Westerlund
130cb6b3fc mdoc fixes from ru@freebsd.org
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9470 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-01-11 16:16:30 +00:00
Johan Danielsson
565d593847 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9228 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-29 18:20:10 +00:00
Johan Danielsson
48826733ac sort parameters and close a list
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9227 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-29 18:20:06 +00:00
Assar Westerlund
baebf953a8 use LIB_des
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9176 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-15 22:51:14 +00:00
Johan Danielsson
b8d80c83b7 move manpages to where they belong
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9150 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-09 08:34:42 +00:00
Johan Danielsson
b2b09185dd move manpages to where they belong
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9146 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-08 17:34:12 +00:00
Johan Danielsson
388c5cda99 ignore Makefile.in
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9143 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-08 17:26:36 +00:00
Johan Danielsson
c787b9080d switch to automake
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9141 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-05 17:16:41 +00:00
Johan Danielsson
3ca5f8150f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7463 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 16:58:55 +00:00
Assar Westerlund
bf75fac82a large strc{py,at}_truncate -> strlc{py,at} replacement
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6984 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-16 20:41:57 +00:00
Assar Westerlund
309470b9a4 *** empty log message ***
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6965 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-14 21:45:06 +00:00
Assar Westerlund
af33e49582 (verify_user_otp): check return value from des_read_pw_string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6964 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-14 21:44:39 +00:00
Assar Westerlund
e53706c80a use LIB_roken
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5897 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-09 18:29:48 +00:00
Johan Danielsson
563dd99b92 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5818 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-01 14:57:04 +00:00
Johan Danielsson
5f6d5c8c09 use getarg
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5817 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-01 14:53:10 +00:00
Johan Danielsson
1c564bf1ce revert
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5654 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-20 14:02:49 +00:00
Johan Danielsson
0f23e17f6f fix broken checkin
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5652 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-20 13:58:20 +00:00