- fix coverity issues 966593-966596
Set Enveloped data version to 2 if ktri version not zero.
Initialize num properly.

PR#3289
PR#3345
Unit/regression test for TLS heartbeats.

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

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