diff options
| author | tb <> | 2023-11-01 20:26:24 +0000 |
|---|---|---|
| committer | tb <> | 2023-11-01 20:26:24 +0000 |
| commit | de1587b78c4c5e44d3bf66cd6d9ceb8512074016 (patch) | |
| tree | e63a2cc412263ee6b830567a36f5b54611693908 /src | |
| parent | ddae0a4b075846655a5ed83e210e50797b3e2e81 (diff) | |
| download | openbsd-de1587b78c4c5e44d3bf66cd6d9ceb8512074016.tar.gz openbsd-de1587b78c4c5e44d3bf66cd6d9ceb8512074016.tar.bz2 openbsd-de1587b78c4c5e44d3bf66cd6d9ceb8512074016.zip | |
Explain the weird order of doing things in X509_ALGOR_set0()
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_algor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index 59e2adc928..76b78028ad 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.35 2023/11/01 20:25:27 tb Exp $ */ | 1 | /* $OpenBSD: x_algor.c,v 1.36 2023/11/01 20:26:24 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 | */ |
| @@ -187,6 +187,7 @@ X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int parameter_type, | |||
| 187 | if (alg == NULL) | 187 | if (alg == NULL) |
| 188 | return 0; | 188 | return 0; |
| 189 | 189 | ||
| 190 | /* Set parameter first to preserve public API behavior on failure. */ | ||
| 190 | if (!X509_ALGOR_set0_parameter(alg, parameter_type, parameter_value)) | 191 | if (!X509_ALGOR_set0_parameter(alg, parameter_type, parameter_value)) |
| 191 | return 0; | 192 | return 0; |
| 192 | 193 | ||
