early-access version 2698
This commit is contained in:
5
externals/libressl/crypto/gost/gost2814789.c
vendored
5
externals/libressl/crypto/gost/gost2814789.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gost2814789.c,v 1.6 2020/09/12 02:45:05 inoguchi Exp $ */
|
||||
/* $OpenBSD: gost2814789.c,v 1.7 2021/11/09 18:40:21 bcook Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -49,8 +49,7 @@
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
#include <endian.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gost89imit_ameth.c,v 1.2 2014/11/09 23:06:52 miod Exp $ */
|
||||
/* $OpenBSD: gost89imit_ameth.c,v 1.3 2021/12/12 21:30:14 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -55,6 +55,7 @@
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#include "asn1_locl.h"
|
||||
#include "evp_locl.h"
|
||||
|
||||
static void
|
||||
mackey_free_gost(EVP_PKEY *pk)
|
||||
|
9
externals/libressl/crypto/gost/gostr341001.c
vendored
9
externals/libressl/crypto/gost/gostr341001.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gostr341001.c,v 1.7 2017/01/29 17:49:23 beck Exp $ */
|
||||
/* $OpenBSD: gostr341001.c,v 1.9 2022/01/07 09:40:03 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <openssl/gost.h>
|
||||
|
||||
#include "bn_lcl.h"
|
||||
#include "ecs_locl.h"
|
||||
#include "gost_locl.h"
|
||||
|
||||
/* Convert little-endian byte array into bignum */
|
||||
@@ -206,7 +207,7 @@ gost2001_do_sign(BIGNUM *md, GOST_KEY *eckey)
|
||||
GOSTerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (EC_POINT_get_affine_coordinates_GFp(group, C, X,
|
||||
if (EC_POINT_get_affine_coordinates(group, C, X,
|
||||
NULL, ctx) == 0) {
|
||||
GOSTerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
@@ -304,7 +305,7 @@ gost2001_do_verify(BIGNUM *md, ECDSA_SIG *sig, GOST_KEY *ec)
|
||||
GOSTerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (EC_POINT_get_affine_coordinates_GFp(group, C, X, NULL, ctx) == 0) {
|
||||
if (EC_POINT_get_affine_coordinates(group, C, X, NULL, ctx) == 0) {
|
||||
GOSTerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
@@ -354,7 +355,7 @@ VKO_compute_key(BIGNUM *X, BIGNUM *Y, const GOST_KEY *pkey, GOST_KEY *priv_key,
|
||||
goto err;
|
||||
if (EC_POINT_mul(group, pnt, NULL, pub_key, p, ctx) == 0)
|
||||
goto err;
|
||||
if (EC_POINT_get_affine_coordinates_GFp(group, pnt, X, Y, ctx) == 0)
|
||||
if (EC_POINT_get_affine_coordinates(group, pnt, X, Y, ctx) == 0)
|
||||
goto err;
|
||||
ok = 1;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gostr341001_ameth.c,v 1.16 2020/06/05 17:17:22 jsing Exp $ */
|
||||
/* $OpenBSD: gostr341001_ameth.c,v 1.19 2021/12/26 15:38:49 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -63,6 +63,7 @@
|
||||
|
||||
|
||||
#include "asn1_locl.h"
|
||||
#include "evp_locl.h"
|
||||
#include "gost_locl.h"
|
||||
#include "gost_asn1.h"
|
||||
|
||||
@@ -290,7 +291,7 @@ pub_encode_gost01(X509_PUBKEY *pub, const EVP_PKEY *pk)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (EC_POINT_get_affine_coordinates_GFp(GOST_KEY_get0_group(ec),
|
||||
if (EC_POINT_get_affine_coordinates(GOST_KEY_get0_group(ec),
|
||||
pub_key, X, Y, NULL) == 0) {
|
||||
GOSTerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
@@ -352,8 +353,7 @@ pub_print_gost01(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)
|
||||
goto err;
|
||||
pubkey = GOST_KEY_get0_public_key(pkey->pkey.gost);
|
||||
group = GOST_KEY_get0_group(pkey->pkey.gost);
|
||||
if (EC_POINT_get_affine_coordinates_GFp(group, pubkey, X, Y,
|
||||
ctx) == 0) {
|
||||
if (EC_POINT_get_affine_coordinates(group, pubkey, X, Y, ctx) == 0) {
|
||||
GOSTerror(ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
@@ -365,7 +365,8 @@ pub_print_gost01(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)
|
||||
BIO_printf(out, "X:");
|
||||
BN_print(out, X);
|
||||
BIO_printf(out, "\n");
|
||||
BIO_indent(out, indent + 3, 128);
|
||||
if (BIO_indent(out, indent + 3, 128) == 0)
|
||||
goto err;
|
||||
BIO_printf(out, "Y:");
|
||||
BN_print(out, Y);
|
||||
BIO_printf(out, "\n");
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gostr341001_key.c,v 1.8 2017/05/02 03:59:44 deraadt Exp $ */
|
||||
/* $OpenBSD: gostr341001_key.c,v 1.9 2021/04/20 17:16:38 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -201,10 +201,10 @@ GOST_KEY_set_public_key_affine_coordinates(GOST_KEY *key, BIGNUM *x, BIGNUM *y)
|
||||
goto err;
|
||||
if ((ty = BN_CTX_get(ctx)) == NULL)
|
||||
goto err;
|
||||
if (EC_POINT_set_affine_coordinates_GFp(key->group, point, x, y,
|
||||
if (EC_POINT_set_affine_coordinates(key->group, point, x, y,
|
||||
ctx) == 0)
|
||||
goto err;
|
||||
if (EC_POINT_get_affine_coordinates_GFp(key->group, point, tx, ty,
|
||||
if (EC_POINT_get_affine_coordinates(key->group, point, tx, ty,
|
||||
ctx) == 0)
|
||||
goto err;
|
||||
/*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gostr341001_pmeth.c,v 1.14 2017/01/29 17:49:23 beck Exp $ */
|
||||
/* $OpenBSD: gostr341001_pmeth.c,v 1.16 2022/03/30 07:17:48 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -62,6 +62,7 @@
|
||||
#include <openssl/ecdsa.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
#include "ecs_locl.h"
|
||||
#include "evp_locl.h"
|
||||
#include "gost_locl.h"
|
||||
#include "gost_asn1.h"
|
||||
@@ -174,7 +175,10 @@ pkey_gost01_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
|
||||
static void
|
||||
pkey_gost01_cleanup(EVP_PKEY_CTX *ctx)
|
||||
{
|
||||
struct gost_pmeth_data *data = EVP_PKEY_CTX_get_data(ctx);
|
||||
struct gost_pmeth_data *data;
|
||||
|
||||
if ((data = EVP_PKEY_CTX_get_data(ctx)) == NULL)
|
||||
return;
|
||||
|
||||
free(data->shared_ukm);
|
||||
free(data);
|
||||
|
5
externals/libressl/crypto/gost/streebog.c
vendored
5
externals/libressl/crypto/gost/streebog.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: streebog.c,v 1.6 2019/05/09 22:54:28 tb Exp $ */
|
||||
/* $OpenBSD: streebog.c,v 1.7 2021/11/09 18:40:21 bcook Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
* Copyright (c) 2005-2006 Cryptocom LTD
|
||||
@@ -49,8 +49,7 @@
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
#include <endian.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
Reference in New Issue
Block a user