aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/openssl/crypto/ec/ec_asn1.c
diff options
context:
space:
mode:
authortpashkin <tpashkin@yandex-team.ru>2022-02-10 16:46:42 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:42 +0300
commit656921707c02b816d730f31c1fdc1d615adbfe00 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/openssl/crypto/ec/ec_asn1.c
parent5475379a04e37df30085bd1724f1c57e3f40996f (diff)
downloadydb-656921707c02b816d730f31c1fdc1d615adbfe00.tar.gz
Restoring authorship annotation for <tpashkin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/openssl/crypto/ec/ec_asn1.c')
-rw-r--r--contrib/libs/openssl/crypto/ec/ec_asn1.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/libs/openssl/crypto/ec/ec_asn1.c b/contrib/libs/openssl/crypto/ec/ec_asn1.c
index 080b93e9be..c8ee1e6f17 100644
--- a/contrib/libs/openssl/crypto/ec/ec_asn1.c
+++ b/contrib/libs/openssl/crypto/ec/ec_asn1.c
@@ -8,7 +8,7 @@
*/
#include <string.h>
-#include "ec_local.h"
+#include "ec_local.h"
#include <openssl/err.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
@@ -452,7 +452,7 @@ ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group,
unsigned char *buffer = NULL;
const EC_POINT *point = NULL;
point_conversion_form_t form;
- ASN1_INTEGER *orig;
+ ASN1_INTEGER *orig;
if (params == NULL) {
if ((ret = ECPARAMETERS_new()) == NULL) {
@@ -503,9 +503,9 @@ ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group,
ECerr(EC_F_EC_GROUP_GET_ECPARAMETERS, ERR_R_EC_LIB);
goto err;
}
- ret->order = BN_to_ASN1_INTEGER(tmp, orig = ret->order);
+ ret->order = BN_to_ASN1_INTEGER(tmp, orig = ret->order);
if (ret->order == NULL) {
- ret->order = orig;
+ ret->order = orig;
ECerr(EC_F_EC_GROUP_GET_ECPARAMETERS, ERR_R_ASN1_LIB);
goto err;
}
@@ -513,9 +513,9 @@ ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group,
/* set the cofactor (optional) */
tmp = EC_GROUP_get0_cofactor(group);
if (tmp != NULL) {
- ret->cofactor = BN_to_ASN1_INTEGER(tmp, orig = ret->cofactor);
+ ret->cofactor = BN_to_ASN1_INTEGER(tmp, orig = ret->cofactor);
if (ret->cofactor == NULL) {
- ret->cofactor = orig;
+ ret->cofactor = orig;
ECerr(EC_F_EC_GROUP_GET_ECPARAMETERS, ERR_R_ASN1_LIB);
goto err;
}
@@ -866,20 +866,20 @@ EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params)
* serialized using explicit parameters by default.
*/
EC_GROUP_set_asn1_flag(ret, OPENSSL_EC_EXPLICIT_CURVE);
-
- /*
- * If the input params do not contain the optional seed field we make
- * sure it is not added to the returned group.
- *
- * The seed field is not really used inside libcrypto anyway, and
- * adding it to parsed explicit parameter keys would alter their DER
- * encoding output (because of the extra field) which could impact
- * applications fingerprinting keys by their DER encoding.
- */
- if (params->curve->seed == NULL) {
- if (EC_GROUP_set_seed(ret, NULL, 0) != 1)
- goto err;
- }
+
+ /*
+ * If the input params do not contain the optional seed field we make
+ * sure it is not added to the returned group.
+ *
+ * The seed field is not really used inside libcrypto anyway, and
+ * adding it to parsed explicit parameter keys would alter their DER
+ * encoding output (because of the extra field) which could impact
+ * applications fingerprinting keys by their DER encoding.
+ */
+ if (params->curve->seed == NULL) {
+ if (EC_GROUP_set_seed(ret, NULL, 0) != 1)
+ goto err;
+ }
}
ok = 1;
@@ -1322,7 +1322,7 @@ int ECDSA_size(const EC_KEY *r)
i = i2d_ASN1_INTEGER(&bs, NULL);
i += i; /* r and s */
ret = ASN1_object_size(1, i, V_ASN1_SEQUENCE);
- if (ret < 0)
- return 0;
+ if (ret < 0)
+ return 0;
return ret;
}