diff options
| author | tb <> | 2023-11-01 20:22:24 +0000 |
|---|---|---|
| committer | tb <> | 2023-11-01 20:22:24 +0000 |
| commit | 9ffa58886bdf395b50aabb89f4a186b8cc229e9d (patch) | |
| tree | afd8efc431c3b3d09d491de92cbce2918dea04d8 /src | |
| parent | 62ea29947263e0890bc7199abb27ec3945fb3f97 (diff) | |
| download | openbsd-9ffa58886bdf395b50aabb89f4a186b8cc229e9d.tar.gz openbsd-9ffa58886bdf395b50aabb89f4a186b8cc229e9d.tar.bz2 openbsd-9ffa58886bdf395b50aabb89f4a186b8cc229e9d.zip | |
Unindent X509_ALGOR_set0_parameter()
ok jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_algor.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index 869625036a..c0bc41dd34 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.33 2023/11/01 20:19:16 tb Exp $ */ | 1 | /* $OpenBSD: x_algor.c,v 1.34 2023/11/01 20:22: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 | */ |
| @@ -164,15 +164,18 @@ X509_ALGOR_set0_parameter(X509_ALGOR *alg, int ptype, void *pval) | |||
| 164 | if (ptype == V_ASN1_UNDEF) { | 164 | if (ptype == V_ASN1_UNDEF) { |
| 165 | ASN1_TYPE_free(alg->parameter); | 165 | ASN1_TYPE_free(alg->parameter); |
| 166 | alg->parameter = NULL; | 166 | alg->parameter = NULL; |
| 167 | } else { | 167 | |
| 168 | if (alg->parameter == NULL) | 168 | return 1; |
| 169 | alg->parameter = ASN1_TYPE_new(); | ||
| 170 | if (alg->parameter == NULL) | ||
| 171 | return 0; | ||
| 172 | if (ptype != 0) | ||
| 173 | ASN1_TYPE_set(alg->parameter, ptype, pval); | ||
| 174 | } | 169 | } |
| 175 | 170 | ||
| 171 | if (alg->parameter == NULL) | ||
| 172 | alg->parameter = ASN1_TYPE_new(); | ||
| 173 | if (alg->parameter == NULL) | ||
| 174 | return 0; | ||
| 175 | |||
| 176 | if (ptype != 0) | ||
| 177 | ASN1_TYPE_set(alg->parameter, ptype, pval); | ||
| 178 | |||
| 176 | return 1; | 179 | return 1; |
| 177 | } | 180 | } |
| 178 | 181 | ||
