ERR: preserve system error number in a few more places
authorRichard Levitte <levitte@openssl.org>
Fri, 14 Dec 2018 18:33:55 +0000 (19:33 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 14 Dec 2018 18:33:55 +0000 (19:33 +0100)
commit91c5473035aaf2c0d86e4039c2a29a5b70541905
tree5141a7d7322d4ad3e3bce979a7669582fa1d5d2b
parent9a3b5b766421b7ed9df859956d44fcbe52c2dd82
ERR: preserve system error number in a few more places

It turns out that intialization may change the error number, so we
need to preserve the system error number in functions where
initialization is called for.
These are ERR_get_state() and err_shelve_state()

Fixes #7897

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7902)
crypto/err/err.c