summaryrefslogtreecommitdiffstats
path: root/test/errtest.c
AgeCommit message (Collapse)Author
2018-05-23Save and restore the Windows error around TlsGetValue.David Benjamin
TlsGetValue clears the last error even on success, so that callers may distinguish it successfully returning NULL or failing. This error-mangling behavior interferes with the caller's use of GetLastError. In particular SSL_get_error queries the error queue to determine whether the caller should look at the OS's errors. To avoid destroying state, save and restore the Windows error. Fixes #6299. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6316)