diff options
| author | tb <> | 2025-01-06 14:24:12 +0000 |
|---|---|---|
| committer | tb <> | 2025-01-06 14:24:12 +0000 |
| commit | 2a45225062c59456bcd24c5582c9099ce340f075 (patch) | |
| tree | 90842d8cfa189c86d1259ee20d6a0711f67a0784 /src | |
| parent | d945002b89bc5ba99f11a610b8906e1ebaa241c0 (diff) | |
| download | openbsd-2a45225062c59456bcd24c5582c9099ce340f075.tar.gz openbsd-2a45225062c59456bcd24c5582c9099ce340f075.tar.bz2 openbsd-2a45225062c59456bcd24c5582c9099ce340f075.zip | |
Rename dest into dst
requested by jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 8bae5940c2..3202229fb6 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_lib.c,v 1.98 2025/01/06 14:22:55 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.99 2025/01/06 14:24:12 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -148,52 +148,52 @@ EC_GROUP_clear_free(EC_GROUP *group) | |||
| 148 | LCRYPTO_ALIAS(EC_GROUP_clear_free); | 148 | LCRYPTO_ALIAS(EC_GROUP_clear_free); |
| 149 | 149 | ||
| 150 | int | 150 | int |
| 151 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) | 151 | EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src) |
| 152 | { | 152 | { |
| 153 | if (dest->meth != src->meth) { | 153 | if (dst->meth != src->meth) { |
| 154 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); | 154 | ECerror(EC_R_INCOMPATIBLE_OBJECTS); |
| 155 | return 0; | 155 | return 0; |
| 156 | } | 156 | } |
| 157 | if (dest == src) | 157 | if (dst == src) |
| 158 | return 1; | 158 | return 1; |
| 159 | 159 | ||
| 160 | if (!bn_copy(dest->p, src->p)) | 160 | if (!bn_copy(dst->p, src->p)) |
| 161 | return 0; | 161 | return 0; |
| 162 | if (!bn_copy(dest->a, src->a)) | 162 | if (!bn_copy(dst->a, src->a)) |
| 163 | return 0; | 163 | return 0; |
| 164 | if (!bn_copy(dest->b, src->b)) | 164 | if (!bn_copy(dst->b, src->b)) |
| 165 | return 0; | 165 | return 0; |
| 166 | 166 | ||
| 167 | dest->a_is_minus3 = src->a_is_minus3; | 167 | dst->a_is_minus3 = src->a_is_minus3; |
| 168 | 168 | ||
| 169 | BN_MONT_CTX_free(dest->mont_ctx); | 169 | BN_MONT_CTX_free(dst->mont_ctx); |
| 170 | dest->mont_ctx = NULL; | 170 | dst->mont_ctx = NULL; |
| 171 | if (src->mont_ctx != NULL) { | 171 | if (src->mont_ctx != NULL) { |
| 172 | if ((dest->mont_ctx = BN_MONT_CTX_new()) == NULL) | 172 | if ((dst->mont_ctx = BN_MONT_CTX_new()) == NULL) |
| 173 | return 0; | 173 | return 0; |
| 174 | if (!BN_MONT_CTX_copy(dest->mont_ctx, src->mont_ctx)) | 174 | if (!BN_MONT_CTX_copy(dst->mont_ctx, src->mont_ctx)) |
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | EC_POINT_free(dest->generator); | 178 | EC_POINT_free(dst->generator); |
| 179 | dest->generator = NULL; | 179 | dst->generator = NULL; |
| 180 | if (src->generator != NULL) { | 180 | if (src->generator != NULL) { |
| 181 | if (!EC_GROUP_set_generator(dest, src->generator, src->order, | 181 | if (!EC_GROUP_set_generator(dst, src->generator, src->order, |
| 182 | src->cofactor)) | 182 | src->cofactor)) |
| 183 | return 0; | 183 | return 0; |
| 184 | } else { | 184 | } else { |
| 185 | /* XXX - should do the sanity checks as in set_generator() */ | 185 | /* XXX - should do the sanity checks as in set_generator() */ |
| 186 | if (!bn_copy(dest->order, src->order)) | 186 | if (!bn_copy(dst->order, src->order)) |
| 187 | return 0; | 187 | return 0; |
| 188 | if (!bn_copy(dest->cofactor, src->cofactor)) | 188 | if (!bn_copy(dst->cofactor, src->cofactor)) |
| 189 | return 0; | 189 | return 0; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | dest->nid = src->nid; | 192 | dst->nid = src->nid; |
| 193 | dest->asn1_flag = src->asn1_flag; | 193 | dst->asn1_flag = src->asn1_flag; |
| 194 | dest->asn1_form = src->asn1_form; | 194 | dst->asn1_form = src->asn1_form; |
| 195 | 195 | ||
| 196 | if (!EC_GROUP_set_seed(dest, src->seed, src->seed_len)) | 196 | if (!EC_GROUP_set_seed(dst, src->seed, src->seed_len)) |
| 197 | return 0; | 197 | return 0; |
| 198 | 198 | ||
| 199 | return 1; | 199 | return 1; |
