artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a96e967
)
Explain the weird order of doing things in X509_ALGOR_set0()
author
tb
<tb@openbsd.org>
Wed, 1 Nov 2023 20:26:24 +0000
(20:26 +0000)
committer
tb
<tb@openbsd.org>
Wed, 1 Nov 2023 20:26:24 +0000
(20:26 +0000)
lib/libcrypto/asn1/x_algor.c
patch
|
blob
|
history
diff --git
a/lib/libcrypto/asn1/x_algor.c
b/lib/libcrypto/asn1/x_algor.c
index
59e2adc
..
76b7802
100644
(file)
--- a/
lib/libcrypto/asn1/x_algor.c
+++ b/
lib/libcrypto/asn1/x_algor.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: x_algor.c,v 1.3
5 2023/11/01 20:25:27
tb Exp $ */
+/* $OpenBSD: x_algor.c,v 1.3
6 2023/11/01 20:26:24
tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@
-187,6
+187,7
@@
X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int parameter_type,
if (alg == NULL)
return 0;
+ /* Set parameter first to preserve public API behavior on failure. */
if (!X509_ALGOR_set0_parameter(alg, parameter_type, parameter_value))
return 0;