diff options
| author | inoguchi <> | 2022-04-28 15:42:10 +0000 |
|---|---|---|
| committer | inoguchi <> | 2022-04-28 15:42:10 +0000 |
| commit | a4b8bbdad8f29f4bf82c5f38334d81a878b42e1a (patch) | |
| tree | c6b0463b9f842bc1072b64d980a3acf40072481f /src | |
| parent | da6a563f559ace0551eeecdcf0dd0911e542a6c5 (diff) | |
| download | openbsd-a4b8bbdad8f29f4bf82c5f38334d81a878b42e1a.tar.gz openbsd-a4b8bbdad8f29f4bf82c5f38334d81a878b42e1a.tar.bz2 openbsd-a4b8bbdad8f29f4bf82c5f38334d81a878b42e1a.zip | |
Fix comparison in openssl(1) pkcs12
comment from tb@
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/pkcs12.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr.bin/openssl/pkcs12.c b/src/usr.bin/openssl/pkcs12.c index 93924d4b8b..b725d773da 100644 --- a/src/usr.bin/openssl/pkcs12.c +++ b/src/usr.bin/openssl/pkcs12.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pkcs12.c,v 1.19 2022/04/28 15:29:10 inoguchi Exp $ */ | 1 | /* $OpenBSD: pkcs12.c,v 1.20 2022/04/28 15:42:10 inoguchi Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| @@ -784,7 +784,7 @@ pkcs12_main(int argc, char **argv) | |||
| 784 | if (!pkcs12_config.twopass) | 784 | if (!pkcs12_config.twopass) |
| 785 | strlcpy(macpass, pass, sizeof macpass); | 785 | strlcpy(macpass, pass, sizeof macpass); |
| 786 | 786 | ||
| 787 | if ((pkcs12_config.options & INFO) && p12->mac != NULL) | 787 | if ((pkcs12_config.options & INFO) != 0 && p12->mac != NULL) |
| 788 | BIO_printf(bio_err, "MAC Iteration %ld\n", | 788 | BIO_printf(bio_err, "MAC Iteration %ld\n", |
| 789 | p12->mac->iter ? ASN1_INTEGER_get(p12->mac->iter) : 1); | 789 | p12->mac->iter ? ASN1_INTEGER_get(p12->mac->iter) : 1); |
| 790 | if (pkcs12_config.macver) { | 790 | if (pkcs12_config.macver) { |
| @@ -1097,7 +1097,7 @@ set_pbe(BIO *err, int *ppbe, const char *str) | |||
| 1097 | { | 1097 | { |
| 1098 | if (str == NULL) | 1098 | if (str == NULL) |
| 1099 | return 0; | 1099 | return 0; |
| 1100 | if (!strcmp(str, "NONE")) { | 1100 | if (strcmp(str, "NONE") == 0) { |
| 1101 | *ppbe = -1; | 1101 | *ppbe = -1; |
| 1102 | return 1; | 1102 | return 1; |
| 1103 | } | 1103 | } |
