Skip to content

Commit 60a484b

Browse files
uenodbenoit17
authored andcommitted
Add stub for EVP_PKEY_CTX_set_ec_paramgen_curve_nid
This was missing in the previous port in: #143 Signed-off-by: Daiki Ueno <[email protected]>
1 parent a10e615 commit 60a484b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

openssl/goopenssl.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,17 @@ enum {
10541054
GO_EVP_PKEY_CTRL_RSA_KEYGEN_BITS = EVP_PKEY_CTRL_RSA_KEYGEN_BITS,
10551055
};
10561056

1057+
#if OPENSSL_VERSION_NUMBER >= 0x30000000
1058+
DEFINEFUNC(int, EVP_PKEY_CTX_set_ec_paramgen_curve_nid, (GO_EVP_PKEY_CTX *ctx, int nid), (ctx, nid))
1059+
#else
1060+
static int
1061+
_goboringcrypto_EVP_PKEY_CTX_set_ec_paramgen_curve_nid(GO_EVP_PKEY_CTX *ctx, int nid)
1062+
{
1063+
return _goboringcrypto_EVP_PKEY_CTX_ctrl(ctx, GO_EVP_PKEY_EC, -1,
1064+
GO_EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL);
1065+
}
1066+
#endif
1067+
10571068
DEFINEFUNC(int, EC_POINT_mul, (const GO_EC_GROUP *group, GO_EC_POINT *r, const GO_BIGNUM *n, const GO_EC_POINT *q, const GO_BIGNUM *m, GO_BN_CTX *ctx), (group, r, n, q, m, ctx))
10581069
#if OPENSSL_VERSION_NUMBER >= 0x30000000
10591070
DEFINEFUNC(int, EVP_PKEY_get_bits, (const GO_EVP_PKEY *pkey), (pkey));

0 commit comments

Comments
 (0)