Commit Graph

2223 Commits

Author SHA1 Message Date
spz 7d2aeb8d2a more pieces to enable using the assembler routines and aes-ni for amd64 2011-07-05 10:42:54 +00:00
spz e910cee8f4 fix some define and cleanliness issues relevant when test compiling
in dist (which we normally don't do)
2011-07-05 10:29:22 +00:00
spz 0d71cd5d7d use aes-ni for i386 also: from jym@ 2011-07-05 10:25:45 +00:00
spz 3619dd3d7c version bump second part 2011-07-05 10:06:10 +00:00
joerg fa1a81643b Fix memset usage. 2011-07-01 02:10:19 +00:00
agc 2008a1289b get some things off the TODO list
when initialising, recognise keys in a different order.

1. read the public keyring

2. if a userid has been specified, use it

3.  if not, check the configuration file (~/.gnupg/gpg.conf) for a
default user id

4, only read the secret keyring if we need to (decrypting or signing)

5.  if signing, and we still don't have a userid, use the first key in
the secret keyring

6.  if encrypting, and we still have no userid, use the first in the
public keyring

ssh keys remain the same as previously.
2011-06-28 03:35:28 +00:00
agc 00f7aade09 re-do the tests so that it's much easier to see at a glance which tests
passed and which failed.
2011-06-28 03:29:38 +00:00
agc e5bfab614c only attempt to load the secret key if we need to (for signing or for
decrypting).
2011-06-27 07:05:31 +00:00
wiz 7b95ccb149 Quote minus so it does not become a dash. 2011-06-25 12:43:03 +00:00
agc e63e4d57f9 change mj library to take an additional argument for a string type,
denoting its length. this allows binary strings to be encoded using
libmj.

escape magic characters in json strings in a more efficient manner.
the previous method was not scalable.

update callers to suit

bump libmj major version number

add examples to the libmj(3) man page
2011-06-25 00:37:44 +00:00
mrg c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
mrg 7496e29126 adjust a grep pattern to (only) match the right line with GCC 4.5.
from chuq.
2011-06-21 02:19:30 +00:00
mrg 493d341048 various build fixes for gcc 4.5. from chuq. XXX i'm not sure all of
these work properly wtf pointer aliasing, but there are no casts at
least...

the lib/libpuffs/puffs_priv.h is definately a real bug fix.

from chuq.
2011-06-20 09:11:16 +00:00
mrg 75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
spz 82dcaa0984 - fix a typo in libcrypto.pl
- refresh manpages
2011-06-13 18:53:31 +00:00
spz 9574586d3a fix AES-NI (using David Woodhouse's patch for OpenSSL 1.0.0) & re-enable
inclusion of AES-NI capability
builds, but is untested due to lack of hardware
2011-06-13 14:19:48 +00:00
spz f946e5a9cd remove unhelpful '.file' paths, just name the file itself 2011-06-13 06:22:08 +00:00
christos fd1d0fa83b fix warnings for the patented algos 2011-06-12 16:15:42 +00:00
christos abf33ee14d format fixes, prototype fixes, const fixes 2011-06-11 16:54:56 +00:00
spz f7ec5c1e8b more missing file mentions, kudos Kurt Schreiner (ks at ub.uni-mainz.de) 2011-06-06 13:43:48 +00:00
spz 0f31b40708 more missing files. Are we there yet? 2011-06-06 08:04:19 +00:00
spz 5865763239 add a bunch of files to the lib that we build. 2011-06-06 06:44:57 +00:00
spz 4a68bbbf8c re-gen of the assembler files created these
(changed files were committed previously)
2011-06-06 06:08:52 +00:00
spz 5bf0fb60b1 merge
It builds, which is an improvement to before. It may not work.
AES-NI is disabled and needs to be retrofitted yet
2011-06-05 23:09:44 +00:00
spz 4e3dcb232d Import OpenSSL 1.0.1 stable of 20110605:
this is sort of a sidegrade onto the release branch. Changes against the
last version imported:

*) Backport libcrypto audit of return value checking from HEAD, not
   all cases can be covered as some introduce binary incompatibilities.
   [Steve Henson]

*) Redirect RSA operations to FIPS module including keygen,
   encrypt, decrypt, sign and verify. Block use of non FIPS RSA methods.
   [Steve Henson]

*) Add similar low level API blocking to ciphers.
   [Steve Henson]

*) Low level digest APIs are not approved in FIPS mode: any attempt
   to use these will cause a fatal error. Applications that *really* want
   to use them can use the private_* version instead.
   [Steve Henson]

*) Redirect cipher operations to FIPS module for FIPS builds.
   [Steve Henson]

*) Redirect digest operations to FIPS module for FIPS builds.
   [Steve Henson]

*) Update build system to add "fips" flag which will link in fipscanister.o
   for static and shared library builds embedding a signature if needed.
   [Steve Henson]

*) Output TLS supported curves in preference order instead of numerical
   order. This is currently hardcoded for the highest order curves first.
   This should be configurable so applications can judge speed vs strength.
   [Steve Henson]

*) Add protection against ECDSA timing attacks as mentioned in the paper
   by Billy Bob Brumley and Nicola Tuveri, see:

      http://eprint.iacr.org/2011/232.pdf

   [Billy Bob Brumley and Nicola Tuveri]

*) Add TLS v1.2 server support for client authentication.
   [Steve Henson]

*) Add support for FIPS mode in ssl library: disable SSLv3, non-FIPS ciphers
   and enable MD5.
   [Steve Henson]

*) Functions FIPS_mode_set() and FIPS_mode() which call the underlying
   FIPS modules versions.
   [Steve Henson]

*) Add TLS v1.2 client side support for client authentication. Keep cache
   of handshake records longer as we don't know the hash algorithm to use
   until after the certificate request message is received.
   [Steve Henson]

*) Initial TLS v1.2 client support. Add a default signature algorithms
   extension including all the algorithms we support. Parse new signature
   format in client key exchange. Relax some ECC signing restrictions for
   TLS v1.2 as indicated in RFC5246.
   [Steve Henson]

*) Add server support for TLS v1.2 signature algorithms extension. Switch
   to new signature format when needed using client digest preference.
   All server ciphersuites should now work correctly in TLS v1.2. No client
   support yet and no support for client certificates.
   [Steve Henson]

*) Initial TLS v1.2 support. Add new SHA256 digest to ssl code, switch
   to SHA256 for PRF when using TLS v1.2 and later. Add new SHA256 based
   ciphersuites. At present only RSA key exchange ciphersuites work with
   TLS v1.2. Add new option for TLS v1.2 replacing the old and obsolete
   SSL_OP_PKCS1_CHECK flags with SSL_OP_NO_TLSv1_2. New TLSv1.2 methods
   and version checking.
   [Steve Henson]

*) New option OPENSSL_NO_SSL_INTERN. If an application can be compiled
   with this defined it will not be affected by any changes to ssl internal
   structures. Add several utility functions to allow openssl application
   to work with OPENSSL_NO_SSL_INTERN defined.
   [Steve Henson]

*) Add SRP support.
   [Tom Wu <tjw@cs.stanford.edu> and Ben Laurie]

*) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id.
   [Steve Henson]

*) Add EC_GFp_nistp224_method(), a 64-bit optimized implementation for
   elliptic curve NIST-P224 with constant-time single point multiplication on
   typical inputs.  EC_GROUP_new_by_curve_name() will automatically use this
   (while EC_GROUP_new_curve_GFp() currently won't and prefers the more
   flexible implementations).

   The implementation requires support for the nonstandard type __uint128_t,
   and so is disabled by default.  To include this in your build of OpenSSL,
   use -DEC_NISTP224_64_GCC_128 on the Configure (or config) command line,
   and run "make depend" (or "make update").
   [Emilia K<E4>sper <emilia.kasper@esat.kuleuven.be> (Google)]

*) Permit abbreviated handshakes when renegotiating using the function
   SSL_renegotiate_abbreviated().
   [Robin Seggelmann <seggelmann@fh-muenster.de>]

*) Add call to ENGINE_register_all_complete() to
   ENGINE_load_builtin_engines(), so some implementations get used
   automatically instead of needing explicit application support.
   [Steve Henson]

*) Add support for TLS key exporter as described in RFC5705.
   [Robin Seggelmann <seggelmann@fh-muenster.de>, Steve Henson]
2011-06-05 14:55:58 +00:00
tsutsui 5fbf2258b9 Handle implicit library dependency for static builds:
- libheimbase is required by libkrb5
 - libwind is required by libhx509
2011-06-04 02:08:50 +00:00
drochner b9e08c16fb replace questionable pointer games which could cause reads of
uninitialized memory, from Wolfgang Stukenbrock per PR bin/44951
2011-05-27 18:00:21 +00:00
drochner 0a8dabda40 pull in AES-GCM/GMAC support from OpenBSD
This is still somewhat experimental. Tested between 2 similar boxes
so far. There is much potential for performance improvement. For now,
I've changed the gmac code to accept any data alignment, as the "char *"
pointer suggests. As the code is practically used, 32-bit alignment
can be assumed, at the cost of data copies. I don't know whether
bytewise access or copies are worse performance-wise. For efficient
implementations using SSE2 instructions on x86, even stricter
alignment requirements might arise.
2011-05-26 21:50:02 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
he 6cf367a4a1 Fix up Heimdal so that it can be built statically, allowing the
sun2 port to proceed beyond trying and failing to build Heimdal.
This is done by:

1) Stop pretending that libipc is a separate library, and instead
   build it as part of libkrb5.  The version map for libkrb5 needed
   to be updated to expose the required symbols from libipc.

2) The lexer in libhx509 needs to use its own prefix, so that the
   resulting library can be statically linked with a lexer which
   uses the default prefix.  This was hidden because libhx509's
   version map file (which is only used for the shared libs) hid
   away the lexer symbols.  Some defines needed tweaking as well
   to restore buildability.

3) Excplicitly mention all the required libraries in LDADD+= and
   make sure DPADD is set to correspond.  This allows static linking;
   earlier this relied on shared library dependencies to have all the
   libs pulled in.  In the process, convert to single-line LDADD+=
   and DPADD+= settings.  Use Makefile.inc for the common libraries
   to the extent possible.

Successfully built from scratch for i386 and sun2 several times,
and for lots of other ports as well.

Discussed with elric@ and christos@.
2011-05-25 19:21:16 +00:00
joerg e6f855c3ea Kill redundant unused extern. 2011-05-24 14:27:07 +00:00
joerg b4141daf2b Use proper format string 2011-05-24 14:26:55 +00:00
wiz e20f01d499 Bump date for previous. 2011-05-24 08:54:40 +00:00
drochner fed8f3aa3c update draft-ipsec-* -> RFC
clarify a sentence
2011-05-23 16:00:07 +00:00
joerg 6b4fe8bf2c Revert, breaks the build. 2011-05-20 20:09:37 +00:00
christos 3076ce9d4c Let's see if we can get away with this for the sun2 port or we are going
to need to:
1. put the contents of libipc.a in libkrb5.a
or
2. install libipc.a [perhaps call it libkrbipc.a?]
2011-05-20 02:04:59 +00:00
christos 5db3bccf35 add missing prototypes. 2011-05-17 12:56:44 +00:00
christos 8d814b5aa6 fix main prototypes. 2011-05-16 00:08:33 +00:00
christos 0648f64e9b no more implicit types in c99 2011-05-15 23:43:56 +00:00
christos 45d5b08c5f fix prototype. 2011-05-15 17:13:23 +00:00
tsutsui df5bdfa0ca - fix build failure on CentOS 5
(it looks bash doesn't like redirection operators before commands)
- use ${TOOL_SED}
2011-05-15 15:10:12 +00:00
drochner 075df8afa4 remove generated binary files 2011-05-05 18:40:24 +00:00
jruoho ab0275b298 Clarify the comment on how to disable password authentication (i.e. the
combination of PasswordAuthentication=no and UsePam=yes still allow password
authentication). Fixes PR bin/32313 from Curt Sampson.
2011-05-03 13:04:00 +00:00
wiz ec676bfa64 Fix a typo. 2011-04-28 14:55:59 +00:00
wiz 968fda6223 Fix a typo. 2011-04-28 14:40:42 +00:00
wiz 9b5852d027 Typo fix. 2011-04-28 14:38:49 +00:00
wiz 7dd3adc79d Fix a typo and punctuation. 2011-04-28 14:34:33 +00:00
wiz 7c8df5b473 Fix typo. 2011-04-28 14:29:53 +00:00
wiz 5cdd89dee6 Typo fix. 2011-04-28 14:28:47 +00:00
wiz b319995661 Improve wording in description. 2011-04-28 14:24:18 +00:00
wiz 2fed8df9e0 Fix typo. 2011-04-28 14:21:52 +00:00
wiz 3643fab3aa Punctuation fix. 2011-04-28 14:18:08 +00:00
wiz 48b93558a9 Fix typo. 2011-04-28 14:16:40 +00:00
wiz db9c61275b Punctuation fix. 2011-04-28 14:15:53 +00:00
wiz ce5b3bb1f9 Heimdal is not an OS. 2011-04-28 14:04:02 +00:00
elric bf89f75cd0 Remove the definition of various X_DEPRECATED as userland has been fixed
to stop using functions defined as deprecated by Heimdal.
2011-04-24 22:24:14 +00:00
elric d4c49b6d11 Stop using -I/usr/include/gssapi and -I/usr/include/krb5. We must in this
case find kafs.h as krb5/kafs.h.
2011-04-24 14:09:39 +00:00
elric 25a58ef3ee Stop using functions that are marked as deprecated in Heimdal. 2011-04-24 14:01:46 +00:00
christos 1abb5f1349 Fix signed/unsigned warnings. Discover bug where < 0 case cannot happen,
and change it to >= 0 as intended.
2011-04-21 17:58:56 +00:00
christos aa50e01f38 Don't compare a pointer < 0; this is obviously a missed * here.
While here, remove shadow variable warnings.
2011-04-21 17:56:24 +00:00
elric fa5d8eb474 openssh and libsaslc depend on heimdal, so we need to wait for it to be
built.
2011-04-20 08:36:07 +00:00
he 847614d665 Some ports don't (need to) construct separate _pic libraries, so where
MKPICLIB != "yes", refer to libipc.a instead of libipc_pic.a.
Fixes the build for mips and vax.
2011-04-16 18:41:58 +00:00
martin a6bdf6b9f3 Use <sys/atomic.h> ops on NetBSD (instead of MD gcc-isms). Stopgap fix
to unbreak the build on some risc platforms.
OK: elric
2011-04-16 17:45:44 +00:00
elric 9b1e92ba03 Randomness isn't terribly necessary when we are building tools. 2011-04-15 21:03:51 +00:00
elric 649d0dafa9 No need to -lfl -ly. 2011-04-15 21:02:47 +00:00
elric 46d08ee707 We need to include nbtool_config.h when we build tools. 2011-04-15 21:01:22 +00:00
elric f321446158 Define an empty libinstall:: target instead of the prior methodology
which doesn't necessarily work everywhere.
2011-04-15 20:56:51 +00:00
elric b125a0825f I forgot to fix this. .BEGIN: is not appropriate for the creation of
these symlinks as during the make obj phase it would attempt to create
them in the current directory.
2011-04-15 19:41:11 +00:00
elric 98fbe74f8c Upgrade Heimdal to 1.5pre1 by switching the build from crypto/dist/heimdal
to crypto/external/bsd/heimdal.  The latter was just imported as the head
of the Heimdal tree as of a few days ago.
2011-04-15 18:05:42 +00:00
elric f8f7efe31c On reasonably modern versions of Heimdal, you should not include krb5.h
to get the krb5 GSS functions.  gssapi/gssapi_krb5.h should be included.

[this is necesary for the next Heimdal upgrade as krb5.h inclusion is no
longer effective.]
2011-04-15 14:51:22 +00:00
elric d8282bb7a4 Also define GSSAPI_DEPRECATED and KRB5_DEPRECATED as NULL to complete the
work of the prior check in.
2011-04-15 14:41:11 +00:00
elric 8cb5359ca5 Need a variable to disable using an existent version-script.map as
dist/lib/kadm5 contains one but builds two libs only one of which
uses it.
2011-04-15 14:39:32 +00:00
elric 8263f47726 Fix $Id$ -> $NetBSD$ in our own include. 2011-04-15 12:19:20 +00:00
elric ecb7f4c28c For the duration of the import and upgrade, we eliminate the marking of
older interfaces as deprecated as this breaks the build and we want to
commit the changes in logical chunks.  We will revert this commit later.
2011-04-15 12:18:22 +00:00
elric 0037cd16e7 Quick makefile bits that will use a version-script.map file if it exists
when building libraries.
2011-04-15 12:16:31 +00:00
elric df8cd236ea Updates to man pages found as diffs in prior location in a batch. 2011-04-14 19:19:19 +00:00
elric c5a976719f From prior location. 2011-04-14 18:23:23 +00:00
elric b20725a7b5 From prior location:
revision 1.2
	date: 2010/04/02 15:26:17;  author: christos;  state: Exp;
	handle ctime returning NULL.
2011-04-14 18:22:35 +00:00
elric fb2eb8459a From prior location, handle ctime returning NULL.
revision 1.11
	date: 2010/04/02 15:25:04;  author: christos;  state: Exp;
	make it obvious to grep that ctime is being checked.

and

	revision 1.10
	date: 2010/04/02 15:23:17;  author: christos;  state: Exp;
	handle ctime returning NULL.
2011-04-14 18:21:32 +00:00
elric 54d91f2bd2 Turn inetd support back on. 2011-04-14 18:18:16 +00:00
elric 5792ac62ee Also take the $'s out from around $Id.*$ as well as $Id.* $. This change
was required because there are many unexanded $Id$'s in Heimdal when you
git clone.
2011-04-14 18:16:21 +00:00
elric 5d94aee4a8 Replicate changes to get_window_size() made in previous location:
revision 1.7
	date: 2010/01/24 16:45:57;  author: christos;  state: Exp;
	make the window size function return the lines and columns
	variables separately instead of depending on the existance
	of struct winsize. Technically I should bump the library
	version or version the symbol, but nothing seems to use
	this outside the library!
2011-04-14 18:12:08 +00:00
elric 363455e6cf Turn on the hack which disables Kerberos if there is no /etc/krb5.conf.
We should review this logic and come up with a better way to do this as
now that there are DNS SRV RRs for locating KDCs, the lack of a config
does not imply that Kerberos should be turned off.
2011-04-14 18:02:07 +00:00
elric 37b2f04395 Copy coverity alloc comments from old location. 2011-04-14 18:00:30 +00:00
elric b40995a48b Reimport Heimdal dist converted into NetBSD dist format. The prior
import did not catch all of the $Id$ tags because many of them are
unexpanded and the RE was only looking for expanded keywords.
2011-04-14 14:08:03 +00:00
christos 6a493f9311 no more amd, factor out more stuff. 2011-04-13 22:16:52 +00:00
elric 7a6a7ae08a Build framework for Heimdal. 2011-04-13 19:16:44 +00:00
elric bca0060340 Autogenerated headers for heimdal head-20110412. 2011-04-13 19:15:27 +00:00
elric 0b13a02041 Autogenerated files for HEIMDAL head-20110412. 2011-04-13 19:08:57 +00:00
elric b8d761750a Script to convert a git clone of Heimdal into our dist format. 2011-04-13 19:04:40 +00:00
elric 170f4091e1 Autogenerated headers for heimdal head-20110412. 2011-04-13 19:03:58 +00:00
elric 893dd9bedb _gss_DES3_get_mic_compat() requires that ctx->target has been defined, and,
well, it hasn't yet.  Move the call down to after it is defined and things
are better.
2011-04-13 18:30:04 +00:00
elric f22e4d20b3 Conditionalise the sqlite3 HDB backend. 2011-04-13 18:23:42 +00:00
elric ca1c9b0c53 Import latest Heimdal from the head of their git repository into the
new location for externally maintained software.
2011-04-13 18:14:29 +00:00
agc a2e4cd88b7 fix a repeated typo 2011-03-29 21:43:17 +00:00
wiz f96ea8d1d8 Sort sections. 2011-03-22 09:42:00 +00:00
jruoho bed0d8a5ad * Remove saslc_strmech(), which does not appear in the sources.
Instead, document saslc_sess_getmech().

* Add FUNCTIONS and describe the functions in a list for readability.

* Sort SYNOPSIS in the order of appearance in FUNCTIONS.

* Split couple of long paragraphs for readability.

* Split the code example into EXAMPLES.

* Add missing prototypes to SYNOPSIS.

* Small markup improvements.

No contextual change.
2011-03-22 07:06:02 +00:00
njoly 6f070d3570 Add missing quotes. 2011-03-21 15:04:18 +00:00
vanhu 2337f22d7b fixed a memory leak in oakley_append_rmconf_cr() while generating plist. patch by Roman Hoog Antink <rha@open.ch> 2011-03-17 14:42:58 +00:00
vanhu 949304356c free name later, to avoid a memory use after free in oakley_check_certid(). also give iph1->remote to some plog() calls. patch by Roman Hoog Antink <rha@open.ch> 2011-03-17 14:39:06 +00:00