Fix signed/unsigned warning.
Allow the maximum value.
Unit/regression test for TLS heartbeats.

Regression test against CVE-2014-0160 (Heartbleed).

More info: http://mike-bland.com/tags/heartbleed.html

(based on commit 35cb55988b75573105eefd00d27d0138eebe40b1)
Merge branch 'mbland-heartbeat-test-1.0.1' into OpenSSL_1_0_1-stable
Fix a wrong parameter count ERR_add_error_data
For portability use BUF_strndup instead of strndup.
(cherry picked from commit dcca7b13e9066443237dd3001ae52fd103151c98)
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
(cherry picked from commit 4689c08453e95eeefcc88c9f32dc6e509f95caff)
Fixed minor copy&paste error, and stray space causing rendering problem
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".