RT3102: Document -verify_error_return flag

Also moved some options around so all the "verify" options.
are clumped together.

Reviewed-by: Matt Caswell <matt@openssl.org>
RT2193: #ifdef errors in bss_dgram.c

Problem with #ifdef in the BIO_CTRL_DGRAM_MTU_DISCOVER case that
is different from the BIO_CTRL_DGRAM_QUERY_MTU one which seems
correct.

Reviewed-by: Matt Caswell <matt@openssl.org>
RT1665,2300: Crypto doc cleanups

RT1665: aes documentation.

Paul Green wrote a nice aes.pod file.
But we now encourage the EVP interface.
So I took his RT item and used it as impetus to add
the AES modes to EVP_EncryptInit.pod
I also noticed that rc4.pod has spurious references to some other
cipher pages, so I removed them.

RT2300: Clean up MD history (merged into RT1665)

Put HISTORY section only in EVP_DigestInit.pod. Also add words
to discourage use of older cipher-specific API, and remove SEE ALSO
links that point to them.

Make sure digest pages have a NOTE that says use EVP_DigestInit.

Review feedback:
More cleanup in EVP_EncryptInit.pod
Fixed SEE ALSO links in ripemd160.pod, sha.pod, mdc2.pod, blowfish.pod,
rc4.d, and des.pod.  Re-order sections in des.pod for consistency

Reviewed-by: Matt Caswell <matt@openssl.org>
RT3246: req command prints version number wrong

Make X509_REQ_print_ex do the same thing that
X509_REQ_print does.

Reviewed-by: Matt Caswell <matt@openssl.org>
RT2880: HFS is case-insensitive filenames

Add Darwin to list of case-insensitive filenames when
installing manapges.  When doing this, I noticed that
we weren't setting "filecase" for the HTML doc install.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Fixed double inclusion of string.h

PR2693

Reviewed-by: Tim Hudson <tjh@openssl.org>
RT2379: Bug in BIO_set_accept_port.pod

The doc says that port can be "*" to mean any port.
That's wrong.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Add cscope.out and .d files to .gitignore

cscope.out is generated by cscope as described in:
http://wiki.openssl.org/index.php/Testing_and_Development_Tools_and_Tips

.d files are compiler-generated Makefile dependency files (e.g. using
'gcc -MMD -MP foo.c').

Signed-off-by: Mike Bland <mbland@acm.org>
Emit PERLASM_SCHEME to fix GitMake on OS X

This fixes the errors when trying to assemble .s files using GitMake on OS X.

Signed-off-by: Mike Bland <mbland@acm.org>
{,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;

Signed-off-by: Mike Bland <mbland@acm.org>
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.

Signed-off-by: Mike Bland <mbland@acm.org>
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.

Signed-off-by: Mike Bland <mbland@acm.org>
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

Signed-off-by: Mike Bland <mbland@acm.org>
Add whrlpool and camellia .s files to perlasm list

Signed-off-by: Mike Bland <mbland@acm.org>
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.

Signed-off-by: Mike Bland <mbland@acm.org>
Make crypto/constant_time inline functions static

Fixes errors like the following when using extra warning and error flags with
clang:

In file included from s3_cbc.c:56:
./../crypto/constant_time_locl.h:122:9: error: static function 'constant_time_msb' is used in an inline function with external linkage
      [-Werror,-Wstatic-in-inline]
        return constant_time_msb(lt);
               ^
./../crypto/constant_time_locl.h:84:1: note: use 'static' to give inline function 'constant_time_lt' internal linkage
inline unsigned int constant_time_lt(unsigned int a, unsigned int b);
^
static
./../crypto/constant_time_locl.h:79:28: note: 'constant_time_msb' declared here
static inline unsigned int constant_time_msb(unsigned int a);
                           ^
Signed-off-by: Mike Bland <mbland@acm.org>
Fix unused variable warning/error

The error occurs when using extra warning and error flags with clang:

t_req.c:95:14: error: unused variable 'neg' [-Werror,-Wunused-variable]
        const char *neg;
                    ^
1 error generated.

Signed-off-by: Mike Bland <mbland@acm.org>
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.

Signed-off-by: Mike Bland <mbland@acm.org>
Remove spurious extra target from tools/Makefile

Signed-off-by: Mike Bland <mbland@acm.org>
Add .d files to 'make clean' targets

This was automatically applied by AddDependencyFilesToCleanTargets() in:
https://code.google.com/p/mike-bland/source/browse/openssl/update_makefiles.py

Signed-off-by: Mike Bland <mbland@acm.org>