aboutsummaryrefslogtreecommitdiff
path: root/crypto/cmp/cmp_status.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cmp/cmp_status.c')
-rw-r--r--crypto/cmp/cmp_status.c7
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)