diff options
author | tb <> | 2024-10-22 12:02:43 +0000 |
---|---|---|
committer | tb <> | 2024-10-22 12:02:43 +0000 |
commit | be5e187728b9e1db7125618e3f37ce6a553b5dbd (patch) | |
tree | ca40b1d49f6085798aafffc70563bde569bee901 /src | |
parent | 3a680fea8e4a6a2fb16443b4edd0e75531ccafd8 (diff) | |
download | openbsd-be5e187728b9e1db7125618e3f37ce6a553b5dbd.tar.gz openbsd-be5e187728b9e1db7125618e3f37ce6a553b5dbd.tar.bz2 openbsd-be5e187728b9e1db7125618e3f37ce6a553b5dbd.zip |
Inline a use of EC_GROUP_method_of()
We can just reach into the group to obtain its EC_GROUP_METHOD. After all
ec_local.h has to be in scope. This will permit marking this ugly API as
unused internally after the next commit.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ec/ec_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_key.c b/src/lib/libcrypto/ec/ec_key.c index e959829478..38a5582ba0 100644 --- a/src/lib/libcrypto/ec/ec_key.c +++ b/src/lib/libcrypto/ec/ec_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_key.c,v 1.40 2024/03/27 01:22:30 tb Exp $ */ | 1 | /* $OpenBSD: ec_key.c,v 1.41 2024/10/22 12:02:43 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -135,7 +135,7 @@ EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) | |||
135 | } | 135 | } |
136 | /* copy the parameters */ | 136 | /* copy the parameters */ |
137 | if (src->group) { | 137 | if (src->group) { |
138 | const EC_METHOD *meth = EC_GROUP_method_of(src->group); | 138 | const EC_METHOD *meth = src->group->meth; |
139 | /* clear the old group */ | 139 | /* clear the old group */ |
140 | EC_GROUP_free(dest->group); | 140 | EC_GROUP_free(dest->group); |
141 | dest->group = EC_GROUP_new(meth); | 141 | dest->group = EC_GROUP_new(meth); |