RT1744: SSL_CTX_set_dump_dh() doc feedback

The description of when the server creates a DH key is
confusing.  This cleans it up.
(rsalz: also removed trailing whitespace.)

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
RT1744: SSL_CTX_set_dump_dh() doc feedback

The description of when the server creates a DH key is
confusing.  This cleans it up.
(rsalz: also removed trailing whitespace.)

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Merge branch 'master' of git.openssl.org:openssl

Stupid git tricks :(

Reviewed-by: rsalz
Add tags/TAGS target; rm tags/TAGS in clean

Reviewed-by: Tim Hudson <tjh@openssl.org>
RT2210: Add missing EVP_cleanup to example

I also removed some trailing whitespace and cleaned
up the "see also" list.

Reviewed-by: Emilia Kasper <emilia@openssl.org>
RT3065: ec_private_key_dont_crash

This change saves several EC routines from crashing when an EC_KEY is
missing a public key. The public key is optional in the EC private key
format and, without this patch, running the following through `openssl
ec` causes a crash:

-----BEGIN EC PRIVATE KEY-----
MBkCAQEECAECAwQFBgcIoAoGCCqGSM49AwEH
-----END EC PRIVATE KEY-----

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
RT3065: automatically generate a missing EC public key

When d2i_ECPrivateKey reads a private key with a missing (optional) public key,
generate one automatically from the group and private key.

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
Explicitly check for empty ASN.1 strings in d2i_ECPrivateKey

The old code implicitly relies on the ASN.1 code returning a \0-prefixed buffer
when the buffer length is 0. Change this to verify explicitly that the ASN.1 string
has positive length.

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
Add cscope output file to .gitignore

This file is generated by cscope as described in:

http://wiki.openssl.org/index.php/Testing_and_Development_Tools_and_Tips
Emit PERLASM_SCHEME to fix GitMake on OS X

This fixes the errors when trying to assemble .s files using GitMake on OS X.
{,darwin64-}debug-test-64-clang Configure targets

These are based on debug-ben-debug-64-clang and is intended to produce
consistent settings for folks involved in the unit testing effort detailed at:

http://wiki.openssl.org/index.php/Unit_Testing

-fsanitize has been removed from the set of clang flags for now. Apparently
clang 3.1, which ships with FreeBSD 9.1, completely ignores -fsanitize. Clang
3.3, which ships with FreeBSD 9.2, compiles with it, but fails to link due to
the absence of libasan:

http://lists.freebsd.org/pipermail/freebsd-hackers/2013-December/043995.html
https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg92260.html
http://reviews.llvm.org/D2644

We need -Wno-error=unused-const-variable because of this error:
.../crypto/ec/ec_lib.c:74:19: error: unused variable 'EC_version' [-Werror,-Wunused-const-variable]
static const char EC_version[] = "EC" OPENSSL_VERSION_PTEXT;
Improve variable parsing when generating MINFO

Before this change, variables for which a '=' appeared in the assignment would
be parsed as the entire string up until the final '='. For example:

  BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \

would result in the variable name "BUILD_CMD=shlib_target". This doesn't
appear to harm the current generation of MINFO, but creates problems for other
Makefile-related work I'm attempting.
Remove redundant test targets outside of test/

These correspond to targets of the same name in test/Makefile that clash when
using the single-makefile build method using GitConfigure and GitMake.
Ignore dependency makefiles
Add missing SRC variable

This is the only Makefile without SRC defined. This change enables a
standard Makefile include directive to cover crypto/jpake/*.d files.

This was automatically applied by AddSrcVarIfNeeded() in:
https://code.google.com/p/mike-bland/source/browse/openssl/update_makefiles.py
Add whrlpool and camellia .s files to perlasm list
crypto: cversion.c depends on buildinf.h
Fix CC in FIPS_BUILD_CMD and FIPS_CRYPTO_BUILD_CMD

This should have been $(CC) all along; removing $(BUILDENV) from the
make invocation causes ${{CC}} to be empty, triggering a build failure as
LDCMD (in Makefile.shared) receives no value.
Fix Clang compile error due to missing cast

crypto/conf/conf_def.c:148:18: error: assigning to 'void *' from 'const
unsigned short [256]' discards qualifiers
      [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        conf->meth_data = CONF_type_default;
                        ^ ~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [crypto/conf/conf_def.o] Error 1
Fix mk1mf.pl rule generation for asm files

Before this change, the mk1mf.pl script only emitted incorrect rules for a
number of asm files, due to a combination of incomplete/incorrect pattern
matching (in the foreach block at line 1200 in the original) and missing
fix_asm() calls in 'copy' mode (line 909 in the original).

In the original, rules were emitted for files which appeared in the
lower-level Makefile variable definitions, regardless of the values defined in
the top-level Makefile. Now rules are emitted only for the top-level Makefile
values.

fix_asm() also now correctly handles the case where the asm variable is empty,
rather than causing a failure.

I noticed the problem during the course of my build system refactoring
experiments, while examining the makefile generated by GitConfigure in a clean
branch against one generated in my experimental branch. I used the same method
to verify that this change works as expected.