Message ID | 20211209090358.28231-16-nstange@suse.de |
---|---|
State | New |
Headers | show |
Series | crypto: dh - infrastructure for NVM in-band auth and FIPS conformance | expand |
diff --git a/crypto/dh.c b/crypto/dh.c index 2e49b114e038..38547c5301da 100644 --- a/crypto/dh.c +++ b/crypto/dh.c @@ -13,6 +13,7 @@ #include <linux/mpi.h> struct dh_ctx { + enum dh_group_id group_id; MPI p; /* Value is guaranteed to be set. */ MPI q; /* Value is optional. */ MPI g; /* Value is guaranteed to be set. */ @@ -55,6 +56,8 @@ static int dh_set_params(struct dh_ctx *ctx, struct dh *params) if (dh_check_params_length(params->p_size << 3)) return -EINVAL; + ctx->group_id = params->group_id; + ctx->p = mpi_read_raw_data(params->p, params->p_size); if (!ctx->p) return -EINVAL;