Merge branch 'mbland-heartbeat-test-1.0.2' into OpenSSL_1_0_2-stable
Fix a wrong parameter count ERR_add_error_data
Adding padding extension to trace code.
(cherry picked from commit 6db14dbc514d6b8017827baebea4c75af8bb1976)
For portability use BUF_strndup instead of strndup.
(cherry picked from commit dcca7b13e9066443237dd3001ae52fd103151c98)
Don't allocate more than is needed in BUF_strndup().
Fix signed/unsigned warning.
Change default cipher in smime app to des3.

PR#3357
(cherry picked from commit ca3ffd9670f2b589bf8cc04923f953e06d6fbc58)
Fix for PKCS12_create if no-rc2 specified.

Use triple DES for certificate encryption if no-rc2 is
specified.

PR#3357
Fixes to host checking.

Fixes to host checking wild card support and add support for
setting host checking flags when verifying a certificate
chain.
(cherry picked from commit 397a8e747dc3f964196caed5ca4e08d4b598362a)
Implement BUF_strnlen() and use it instead of strlen().
Remove redundant test.
Fixed unterminated B tag, causing build to fail with newer pod2man versions
Fixed minor copy&paste error, and stray space causing rendering problem
Check length first in BUF_strnlen().
Fix heartbeat_test for -DOPENSSL_NO_HEARTBEATS

Replaces the entire test with a trivial implementation when
OPENSSL_NO_HEARTBEATS is defined, after a report from Lukas Tribus
on 2014-05-22: "build failure when using OPENSSL_NO_HEARTBEATS".