remove duplicate 0x for default RSASSA-PSS salt len
(cherry picked from commit 3820fec3a09faecba7fe9912aa20ef7fcda8337b)
Fix memory leak.

PR#3278
(cherry picked from commit de56fe797081fc09ebd1add06d6e2df42a324fd5)
Set version number correctly.

PR#3249
(cherry picked from commit 8909bf20269035d295743fca559207ef2eb84eb3)
Don't compile heartbeat test code on Windows (for now).
(cherry picked from commit 2c575907d2c8601a18716f718ce309ed4e1f1783)
Use correct digest when exporting keying material.

PR#3319
(cherry picked from commit 84691390eae86befd33c83721dacedb539ae34e6)
Initialise alg.

PR#3313
(cherry picked from commit 7e2c6f7eb01515a990f77fbc5441be8e1a17152a)
Allocate extra space when NETSCAPE_HANG_BUG defined.

Make sure there is an extra 4 bytes for server done message when
NETSCAPE_HANG_BUG is defined.

PR#3361
(cherry picked from commit 92d81ba622396425764d676ba4fb3f0dac273f17)
Set default global mask to UTF8 only.
(cherry picked from commit 3009244da47b989c4cc59ba02cf81a4e9d8f8431)
Option to disable padding extension.

Add TLS padding extension to SSL_OP_ALL so it is used with other
"bugs" options and can be turned off.

This replaces SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG which is an ancient
option referring to SSLv2 and SSLREF.

PR#3336
(cherry picked from commit 758415b2259fa45d3fe17d8e53ae1341b7b6e482)

Conflicts:

	ssl/t1_lib.c
Recognise padding extension.
(cherry picked from commit ea2bb861f0daaa20819bf9ac8c146f7593feacd4)

Conflicts:

	apps/s_cb.c
Delays the queue insertion until after the ssl3_setup_buffers() call due to use-after-free bug. PR#3362
Added SSLErr call for internal error in dtls1_buffer_record
Typo: set i to -1 before goto.

PR#3302
(cherry picked from commit 9717f01951f976f76dd40a38d9fc7307057fa4c4)
Allow reordering of certificates when signing.

Add certificates if -nocerts and -certfile specified when signing
in smime application. This can be used this to specify the
order certificates appear in the PKCS#7 structure: some broken
applications require a certain ordering.

PR#3316
(cherry picked from commit e114abee9ec084a56c1d6076ac6de8a7a3a5cf34)
Free up s->d1->buffered_app_data.q properly.

PR#3286
(cherry picked from commit 71e95000afb2227fe5cac1c79ae884338bcd8d0b)
Check there is enough room for extension.
(cherry picked from commit 7d89b3bf42e4b4067371ab33ef7631434e41d1e4)