diff options
author | tb <> | 2023-11-01 20:26:24 +0000 |
---|---|---|
committer | tb <> | 2023-11-01 20:26:24 +0000 |
commit | 718563113a50e94a6425cdd51e05876a3d29a3ba (patch) | |
tree | e63a2cc412263ee6b830567a36f5b54611693908 /src/lib/libcrypto | |
parent | e7fb20ea25ae162b95a9b2eb4fe73857e7b66d2f (diff) | |
download | openbsd-718563113a50e94a6425cdd51e05876a3d29a3ba.tar.gz openbsd-718563113a50e94a6425cdd51e05876a3d29a3ba.tar.bz2 openbsd-718563113a50e94a6425cdd51e05876a3d29a3ba.zip |
Explain the weird order of doing things in X509_ALGOR_set0()
Diffstat (limited to 'src/lib/libcrypto')
-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 | ||