Fix infinite loop. PR#3347
Avoid out-of-bounds write in SSL_get_shared_ciphers

PR: 3317
dgram_sctp_ctrl: authkey memory leak

PR: 3327
Set authkey to NULL and check malloc return value.
Fixed NULL pointer dereference. See PR#3321
Replace manual ASN1 decoder with ASN1_get_object

Replace manual ASN.1 decoder with ASN1_get object. This
will decode the tag and length properly and check against
it does not exceed the supplied buffer length.

PR#3335
(cherry picked from commit b0308dddd1cc6a8e1de803ef29ba6da25ee072c2)
Correct the return type on the signature for X509_STORE_CTX_get_ex_data given in the pod file.
Check sk_SSL_CIPHER_num() after assigning sk.
Have the .pc files depend on each other rather than duplicating the
various link settings. PR#3332
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)