VMS build fix #2.
Fix free errors in ocsp utility.

Keep copy of any host, path and port values allocated by
OCSP_parse_url and free as necessary.
(cherry picked from commit 5219d3dd350cc74498dd49daef5e6ee8c34d9857)
Add new key fingerprint.
(cherry picked from commit 3143a332e8f2f5ca1a6f0262a1a1a66103f2adf7)
Clarify CMS_decrypt behaviour.
(cherry picked from commit 5f8e9a477a18551052f2019c1f374061acbaa5e6)
Extension checking fixes.

When looking for an extension we need to set the last found
position to -1 to properly search all extensions.

PR#3309.
(cherry picked from commit 300b9f0b704048f60776881f1d378c74d9c32fbd)
Document -debug_decrypt option.
(cherry picked from commit 0dd5b94aeb77c2982bdf6886962b7a8491c6c9ed)
Fix double frees.
Fix use after free.
Add new sponsors
(cherry picked from commit 351f0a124bffaa94d2a8abdec2e7dde5ae9c457d)
Fix eckey_priv_encode()

Fix eckey_priv_encode to return an error on failure of i2d_ECPrivateKey.
Fix version documentation.

Specify -f is for compilation flags. Add -d to synopsis section.

(cherry picked from commit 006397ea62bbcae22c8664d53c2222b808c4bdd1)

Closes #79.
POD: Fix item numbering

Newer pod2man considers =item [1-9] part of a numbered list, while =item
0 starts an unnumbered list. Add a zero effect formatting mark to override
this.

doc/apps/smime.pod around line 315: Expected text after =item, not a
number
...

PR#3146
Fixed spelling error in error message. Fix supplied by Marcos Marado
typo in SSL_get_peer_cert_chain docs

RT: 3304
Double free in i2o_ECPublicKey

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

PR#3289
PR#3345
(cherry picked from commit 3ba1e406c2309adb427ced9815ebf05f5b58d155)
dso: eliminate VMS code on non-VMS systems

Even though the meat of dso_vms.c is compiled out on non-VMS builds,
the (pre-)compiler still traverses some of the macro handling. This
trips up at least one non-VMS build configuration, so this commit
makes the skip-VMS case more robust.

Signed-off-by: Geoff Thorpe <geoff@openssl.org>
bignum: allow concurrent BN_MONT_CTX_set_locked()

The lazy-initialisation of BN_MONT_CTX was serialising all threads, as
noted by Daniel Sands and co at Sandia. This was to handle the case that
2 or more threads race to lazy-init the same context, but stunted all
scalability in the case where 2 or more threads are doing unrelated
things! We favour the latter case by punishing the former. The init work
gets done by each thread that finds the context to be uninitialised, and
we then lock the "set" logic after that work is done - the winning
thread's work gets used, the losing threads throw away what they've done.

Signed-off-by: Geoff Thorpe <geoff@openssl.org>