ERR: exempt flags from fallback decimal reason code printing

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/17072)
This commit is contained in:
Dr. David von Oheimb 2021-11-19 11:58:40 +01:00 committed by Dr. David von Oheimb
parent 2349d7ba57
commit 9350aaa41d

View File

@ -527,7 +527,8 @@ void ossl_err_string_int(unsigned long e, const char *func,
}
#endif
if (rs == NULL) {
BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)",
r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
rs = rsbuf;
}