From: Dmitry Belyavskiy Date: Sat, 21 Sep 2019 13:03:30 +0000 (+0300) Subject: Fix fb infer complain X-Git-Tag: v3.0.0~269 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=17f533dde5dc27b45832116474ed5ed27fd609a7;p=openssl-gost%2Fengine.git Fix fb infer complain --- diff --git a/gost_ameth.c b/gost_ameth.c index 199aef2..b73f918 100644 --- a/gost_ameth.c +++ b/gost_ameth.c @@ -348,7 +348,7 @@ static int priv_decode_gost(EVP_PKEY *pk, const X509_ALGOR *palg = NULL; const ASN1_OBJECT *palg_obj = NULL; ASN1_INTEGER *priv_key = NULL; - int expected_key_len = 32; + int expected_key_len; if (!PKCS8_pkey_get0(&palg_obj, &pkey_buf, &priv_len, &palg, p8inf)) return 0; @@ -719,14 +719,13 @@ static int pub_encode_gost_ec(X509_PUBKEY *pub, const EVP_PKEY *pk) const EC_POINT *pub_key; BIGNUM *X = NULL, *Y = NULL, *order = NULL; const EC_KEY *ec = EVP_PKEY_get0((EVP_PKEY *)pk); - int ptype = V_ASN1_UNDEF; + int ptype = V_ASN1_SEQUENCE; ASN1_STRING *params; algobj = OBJ_nid2obj(EVP_PKEY_base_id(pk)); params = encode_gost_algor_params(pk); pval = params; - ptype = V_ASN1_SEQUENCE; order = BN_new(); if (!order) {