diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_algor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index 0f1cd9cb65..a638337939 100644 --- a/src/lib/libcrypto/asn1/x_algor.c +++ b/src/lib/libcrypto/asn1/x_algor.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x_algor.c,v 1.25 2023/07/07 19:37:52 beck Exp $ */ | 1 | /* $OpenBSD: x_algor.c,v 1.26 2023/10/11 12:51:07 tb 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 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -205,16 +205,16 @@ X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md) | |||
| 205 | X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); | 205 | X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | /* Returns 0 if they are equal, != 0 otherwise. */ | ||
| 209 | int | 208 | int |
| 210 | X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) | 209 | X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) |
| 211 | { | 210 | { |
| 212 | int rv = OBJ_cmp(a->algorithm, b->algorithm); | 211 | int cmp; |
| 213 | if (!rv) { | 212 | |
| 214 | if (!a->parameter && !b->parameter) | 213 | if ((cmp = OBJ_cmp(a->algorithm, b->algorithm)) != 0) |
| 215 | rv = 0; | 214 | return cmp; |
| 216 | else | 215 | |
| 217 | rv = ASN1_TYPE_cmp(a->parameter, b->parameter); | 216 | if (a->parameter == NULL && b->parameter == NULL) |
| 218 | } | 217 | return 0; |
| 219 | return(rv); | 218 | |
| 219 | return ASN1_TYPE_cmp(a->parameter, b->parameter); | ||
| 220 | } | 220 | } |
