summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-04-28 15:57:38 +0000
committertb <>2023-04-28 15:57:38 +0000
commit727b091098f2b808b37f5a4169c917fbcf5a2263 (patch)
tree4988f832ce71a7146c9a2b14178e938420e0bbe4
parenta81c6b203cc45b0823f01aa70872017a83e763b4 (diff)
downloadopenbsd-727b091098f2b808b37f5a4169c917fbcf5a2263.tar.gz
openbsd-727b091098f2b808b37f5a4169c917fbcf5a2263.tar.bz2
openbsd-727b091098f2b808b37f5a4169c917fbcf5a2263.zip
Silence gcc-4 warnings about sk_sort()
Tell it we deliberately ignore the return value, (we really don't care what the old comparison function was).
-rw-r--r--src/lib/libcrypto/x509/x509_policy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_policy.c b/src/lib/libcrypto/x509/x509_policy.c
index 03f0f10ac5..e51e193085 100644
--- a/src/lib/libcrypto/x509/x509_policy.c
+++ b/src/lib/libcrypto/x509/x509_policy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_policy.c,v 1.23 2023/04/28 15:39:29 tb Exp $ */ 1/* $OpenBSD: x509_policy.c,v 1.24 2023/04/28 15:57:38 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022, Google Inc. 3 * Copyright (c) 2022, Google Inc.
4 * 4 *
@@ -380,7 +380,7 @@ process_certificate_policies(const X509 *x509, X509_POLICY_LEVEL *level,
380 goto err; 380 goto err;
381 } 381 }
382 382
383 sk_POLICYINFO_set_cmp_func(policies, policyinfo_cmp); 383 (void)sk_POLICYINFO_set_cmp_func(policies, policyinfo_cmp);
384 sk_POLICYINFO_sort(policies); 384 sk_POLICYINFO_sort(policies);
385 cert_has_any_policy = 0; 385 cert_has_any_policy = 0;
386 for (i = 0; i < sk_POLICYINFO_num(policies); i++) { 386 for (i = 0; i < sk_POLICYINFO_num(policies); i++) {
@@ -544,7 +544,8 @@ process_policy_mappings(const X509 *cert,
544 } 544 }
545 545
546 /* Sort to group by issuerDomainPolicy. */ 546 /* Sort to group by issuerDomainPolicy. */
547 sk_POLICY_MAPPING_set_cmp_func(mappings, compare_issuer_policy); 547 (void)sk_POLICY_MAPPING_set_cmp_func(mappings,
548 compare_issuer_policy);
548 sk_POLICY_MAPPING_sort(mappings); 549 sk_POLICY_MAPPING_sort(mappings);
549 550
550 if (mapping_allowed) { 551 if (mapping_allowed) {
@@ -631,7 +632,7 @@ process_policy_mappings(const X509 *cert,
631 } 632 }
632 633
633 /* Sort to group by subjectDomainPolicy. */ 634 /* Sort to group by subjectDomainPolicy. */
634 sk_POLICY_MAPPING_set_cmp_func(mappings, compare_subject_policy); 635 (void)sk_POLICY_MAPPING_set_cmp_func(mappings, compare_subject_policy);
635 sk_POLICY_MAPPING_sort(mappings); 636 sk_POLICY_MAPPING_sort(mappings);
636 637
637 /* Convert |mappings| to our "expected_policy_set" representation. */ 638 /* Convert |mappings| to our "expected_policy_set" representation. */
@@ -995,7 +996,7 @@ X509_policy_check(const STACK_OF(X509) *certs,
995 user_policies); 996 user_policies);
996 if (user_policies_sorted == NULL) 997 if (user_policies_sorted == NULL)
997 goto err; 998 goto err;
998 sk_ASN1_OBJECT_set_cmp_func(user_policies_sorted, 999 (void)sk_ASN1_OBJECT_set_cmp_func(user_policies_sorted,
999 asn1_object_cmp); 1000 asn1_object_cmp);
1000 sk_ASN1_OBJECT_sort(user_policies_sorted); 1001 sk_ASN1_OBJECT_sort(user_policies_sorted);
1001 } 1002 }