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 22:17:06 +0000 (23:17 +0100)
commit145419423e1a74ae54cdbd3aed8bb15cbd53c7cc
treed4d0791605a348396bc3b7d7f6eb0d0567d699b5
parentfaafe140a856ecbe743a0533a2d7117ece040f29
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)

(cherry picked from commit 91c5473035aaf2c0d86e4039c2a29a5b70541905)
crypto/err/err.c