early-access version 2698
This commit is contained in:
22
externals/libressl/crypto/ecdh/ech_key.c
vendored
22
externals/libressl/crypto/ecdh/ech_key.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ech_key.c,v 1.9 2019/01/19 01:12:48 tb Exp $ */
|
||||
/* $OpenBSD: ech_key.c,v 1.12 2021/12/04 16:08:32 tb Exp $ */
|
||||
/* ====================================================================
|
||||
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
||||
*
|
||||
@@ -77,6 +77,7 @@
|
||||
#include <openssl/obj_mac.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#include "bn_lcl.h"
|
||||
#include "ech_locl.h"
|
||||
#include "ec_lcl.h"
|
||||
|
||||
@@ -140,23 +141,10 @@ ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) ==
|
||||
NID_X9_62_prime_field) {
|
||||
if (!EC_POINT_get_affine_coordinates_GFp(group, tmp, x, y,
|
||||
ctx)) {
|
||||
ECDHerror(ECDH_R_POINT_ARITHMETIC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
if (!EC_POINT_get_affine_coordinates(group, tmp, x, y, ctx)) {
|
||||
ECDHerror(ECDH_R_POINT_ARITHMETIC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
#ifndef OPENSSL_NO_EC2M
|
||||
else {
|
||||
if (!EC_POINT_get_affine_coordinates_GF2m(group, tmp, x, y,
|
||||
ctx)) {
|
||||
ECDHerror(ECDH_R_POINT_ARITHMETIC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
buflen = ECDH_size(ecdh);
|
||||
len = BN_num_bytes(x);
|
||||
|
Reference in New Issue
Block a user