summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinoguchi <>2021-07-24 13:21:04 +0000
committerinoguchi <>2021-07-24 13:21:04 +0000
commit6e182d448a0e438667357c83acce36b18a989e75 (patch)
tree3dde6e1b033091253c89cbb573ad1c8247c63fd3
parent77b879fbc20694ea5be8a58c18a8d11ba7b7b129 (diff)
downloadopenbsd-6e182d448a0e438667357c83acce36b18a989e75.tar.gz
openbsd-6e182d448a0e438667357c83acce36b18a989e75.tar.bz2
openbsd-6e182d448a0e438667357c83acce36b18a989e75.zip
Compare strcmp and strcasecmp return value with zero
-rw-r--r--src/usr.bin/openssl/ca.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/usr.bin/openssl/ca.c b/src/usr.bin/openssl/ca.c
index 2b34d29a1b..86efbdb657 100644
--- a/src/usr.bin/openssl/ca.c
+++ b/src/usr.bin/openssl/ca.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ca.c,v 1.34 2021/07/20 12:04:53 inoguchi Exp $ */ 1/* $OpenBSD: ca.c,v 1.35 2021/07/24 13:21:04 inoguchi Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -780,7 +780,7 @@ ca_main(int argc, char **argv)
780 f = NCONF_get_string(conf, ca_config.section, UTF8_IN); 780 f = NCONF_get_string(conf, ca_config.section, UTF8_IN);
781 if (f == NULL) 781 if (f == NULL)
782 ERR_clear_error(); 782 ERR_clear_error();
783 else if (!strcmp(f, "yes")) 783 else if (strcmp(f, "yes") == 0)
784 ca_config.chtype = MBSTRING_UTF8; 784 ca_config.chtype = MBSTRING_UTF8;
785 } 785 }
786 db_attr.unique_subject = 1; 786 db_attr.unique_subject = 1;
@@ -1058,7 +1058,7 @@ ca_main(int argc, char **argv)
1058 lookup_fail(ca_config.section, ENV_DEFAULT_MD); 1058 lookup_fail(ca_config.section, ENV_DEFAULT_MD);
1059 goto err; 1059 goto err;
1060 } 1060 }
1061 if (!strcmp(ca_config.md, "default")) { 1061 if (strcmp(ca_config.md, "default") == 0) {
1062 int def_nid; 1062 int def_nid;
1063 if (EVP_PKEY_get_default_digest_nid(pkey, &def_nid) <= 0) { 1063 if (EVP_PKEY_get_default_digest_nid(pkey, &def_nid) <= 0) {
1064 BIO_puts(bio_err, "no default digest\n"); 1064 BIO_puts(bio_err, "no default digest\n");
@@ -1863,7 +1863,7 @@ do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
1863 } 1863 }
1864 last2 = -1; 1864 last2 = -1;
1865 1865
1866again2: 1866 again2:
1867 j = X509_NAME_get_index_by_OBJ(CAname, obj, 1867 j = X509_NAME_get_index_by_OBJ(CAname, obj,
1868 last2); 1868 last2);
1869 if ((j < 0) && (last2 == -1)) { 1869 if ((j < 0) && (last2 == -1)) {
@@ -2688,7 +2688,7 @@ make_revocation_str(int rev_type, char *rev_arg)
2688 2688
2689 case REV_CRL_REASON: 2689 case REV_CRL_REASON:
2690 for (i = 0; i < 8; i++) { 2690 for (i = 0; i < 8; i++) {
2691 if (!strcasecmp(rev_arg, crl_reasons[i])) { 2691 if (strcasecmp(rev_arg, crl_reasons[i]) == 0) {
2692 reason = crl_reasons[i]; 2692 reason = crl_reasons[i];
2693 break; 2693 break;
2694 } 2694 }
@@ -2883,7 +2883,7 @@ unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
2883 } 2883 }
2884 if (reason_str != NULL) { 2884 if (reason_str != NULL) {
2885 for (i = 0; i < NUM_REASONS; i++) { 2885 for (i = 0; i < NUM_REASONS; i++) {
2886 if (!strcasecmp(reason_str, crl_reasons[i])) { 2886 if (strcasecmp(reason_str, crl_reasons[i]) == 0) {
2887 reason_code = i; 2887 reason_code = i;
2888 break; 2888 break;
2889 } 2889 }