summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-07-12 09:35:55 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-07-12 09:35:55 +0000
commit342068009b01448e02a3302fef67afe0295d2d93 (patch)
tree7ca8a71a71baef6c50a2a3166cc669e01a74e0fb
parent6c23a9242d15f3ab8751793b982aee7aef098f0d (diff)
Simplify X509_EXTENSION_get_critical()
This is a silly API, but there are worse. ok jsing
-rw-r--r--lib/libcrypto/x509/x509_v3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libcrypto/x509/x509_v3.c b/lib/libcrypto/x509/x509_v3.c
index 5ae8fabf469..b5aee01d2df 100644
--- a/lib/libcrypto/x509/x509_v3.c
+++ b/lib/libcrypto/x509/x509_v3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_v3.c,v 1.37 2024/07/12 09:33:05 tb Exp $ */
+/* $OpenBSD: x509_v3.c,v 1.38 2024/07/12 09:35:54 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -290,8 +290,7 @@ X509_EXTENSION_get_critical(const X509_EXTENSION *ext)
{
if (ext == NULL)
return 0;
- if (ext->critical > 0)
- return 1;
- return 0;
+
+ return ext->critical > 0;
}
LCRYPTO_ALIAS(X509_EXTENSION_get_critical);