diff options
author | Pierre Pronchery <pierre@freebsdfoundation.org> | 2023-09-22 14:52:58 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2023-09-22 15:55:26 +0000 |
commit | 315108b81694de474bbc273c0050b195047f5eed (patch) | |
tree | e3f2a313c74d0ae64bb2f0da5ecd9edb258e361f /crypto/cmp/cmp_status.c | |
parent | cf2fc1b0f5ce501f5a29d307294e5637e0f5aba6 (diff) |
Diffstat (limited to 'crypto/cmp/cmp_status.c')
-rw-r--r-- | crypto/cmp/cmp_status.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/cmp/cmp_status.c b/crypto/cmp/cmp_status.c index bfe6cd9906b8..68144aa4fed8 100644 --- a/crypto/cmp/cmp_status.c +++ b/crypto/cmp/cmp_status.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved. * Copyright Nokia 2007-2019 * Copyright Siemens AG 2015-2019 * @@ -30,9 +30,12 @@ int ossl_cmp_pkisi_get_status(const OSSL_CMP_PKISI *si) { + int res ; + if (!ossl_assert(si != NULL && si->status != NULL)) return -1; - return ossl_cmp_asn1_get_int(si->status); + res = ossl_cmp_asn1_get_int(si->status); + return res == -2 ? -1 : res; } const char *ossl_cmp_PKIStatus_to_string(int status) |