feat: Upgrade to Chromium 71.0.3578.98 (#15966)
This commit is contained in:
parent
92ddfd0d4c
commit
52fe92d02e
204 changed files with 2291 additions and 1760 deletions
|
@ -1 +1,3 @@
|
|||
implement_ssl_get_tlsext_status_type.patch
|
||||
add_ec_group_order_bits_for_openssl_compatibility.patch
|
||||
add_ec_key_key2buf_for_openssl_compatibility.patch
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Wed, 19 Dec 2018 14:42:26 -0800
|
||||
Subject: Add EC_GROUP_order_bits for OpenSSL compatibility
|
||||
|
||||
Change-Id: I37149fa4274357d84befff85728ce2337131afa7
|
||||
Reviewed-on: https://boringssl-review.googlesource.com/c/33804
|
||||
Commit-Queue: Adam Langley <agl@google.com>
|
||||
Reviewed-by: Adam Langley <agl@google.com>
|
||||
|
||||
diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c
|
||||
index 908e35e9d04e657c13ba61c8ea5bf4a4519228c5..43e170b9190bf1813216b10863bbaf6402331161 100644
|
||||
--- a/crypto/fipsmodule/ec/ec.c
|
||||
+++ b/crypto/fipsmodule/ec/ec.c
|
||||
@@ -605,6 +605,10 @@ int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
+int EC_GROUP_order_bits(const EC_GROUP *group) {
|
||||
+ return BN_num_bits(&group->order);
|
||||
+}
|
||||
+
|
||||
int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
|
||||
BN_CTX *ctx) {
|
||||
// All |EC_GROUP|s have cofactor 1.
|
||||
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
|
||||
index 41a9c34c5ad1bbfdff8e37c1e245ac7fac7a3869..e4195fc15a26e61ef1e74ac7054ddabb256ae9a3 100644
|
||||
--- a/include/openssl/ec.h
|
||||
+++ b/include/openssl/ec.h
|
||||
@@ -133,6 +133,9 @@ OPENSSL_EXPORT const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
|
||||
// |group| that specifies the order of the group.
|
||||
OPENSSL_EXPORT const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);
|
||||
|
||||
+// EC_GROUP_order_bits returns the number of bits of the order of |group|.
|
||||
+OPENSSL_EXPORT int EC_GROUP_order_bits(const EC_GROUP *group);
|
||||
+
|
||||
// EC_GROUP_get_cofactor sets |*cofactor| to the cofactor of |group| using
|
||||
// |ctx|, if it's not NULL. It returns one on success and zero otherwise.
|
||||
OPENSSL_EXPORT int EC_GROUP_get_cofactor(const EC_GROUP *group,
|
|
@ -0,0 +1,65 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Wed, 19 Dec 2018 14:46:14 -0800
|
||||
Subject: Add EC_KEY_key2buf for OpenSSL compatibility
|
||||
|
||||
Change-Id: If45ef3a9bb757bd0c7f592f40ececaf4aa2f607d
|
||||
Reviewed-on: https://boringssl-review.googlesource.com/c/33824
|
||||
Reviewed-by: Adam Langley <agl@google.com>
|
||||
Commit-Queue: Adam Langley <agl@google.com>
|
||||
|
||||
diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c
|
||||
index a6d469767adfad1c9095cc58c567b10c71e95cfa..ba69e83cb8f49c70a98c8fd68fd7fa4b122da5cd 100644
|
||||
--- a/crypto/fipsmodule/ec/ec_key.c
|
||||
+++ b/crypto/fipsmodule/ec/ec_key.c
|
||||
@@ -394,6 +394,33 @@ err:
|
||||
return ok;
|
||||
}
|
||||
|
||||
+size_t EC_KEY_key2buf(EC_KEY *key, point_conversion_form_t form,
|
||||
+ unsigned char **out_buf, BN_CTX *ctx) {
|
||||
+ if (key == NULL || key->pub_key == NULL || key->group == NULL) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ const size_t len =
|
||||
+ EC_POINT_point2oct(key->group, key->pub_key, form, NULL, 0, ctx);
|
||||
+ if (len == 0) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ uint8_t *buf = OPENSSL_malloc(len);
|
||||
+ if (buf == NULL) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (EC_POINT_point2oct(key->group, key->pub_key, form, buf, len, ctx) !=
|
||||
+ len) {
|
||||
+ OPENSSL_free(buf);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ *out_buf = buf;
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
int EC_KEY_generate_key(EC_KEY *key) {
|
||||
if (key == NULL || key->group == NULL) {
|
||||
OPENSSL_PUT_ERROR(EC, ERR_R_PASSED_NULL_PARAMETER);
|
||||
diff --git a/include/openssl/ec_key.h b/include/openssl/ec_key.h
|
||||
index 9bc788758b26bb4883626a80f3e0b8c8d6eb7974..3b1a5666fa1f2071212393a3f5c8d5394c32efeb 100644
|
||||
--- a/include/openssl/ec_key.h
|
||||
+++ b/include/openssl/ec_key.h
|
||||
@@ -177,6 +177,12 @@ OPENSSL_EXPORT int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
|
||||
BIGNUM *x,
|
||||
BIGNUM *y);
|
||||
|
||||
+// EC_KEY_key2buf encodes the public key in |key| to an allocated octet string
|
||||
+// and sets |*out_buf| to point to it. It returns the length of the encoded
|
||||
+// octet string or zero if an error occurred.
|
||||
+OPENSSL_EXPORT size_t EC_KEY_key2buf(EC_KEY *key, point_conversion_form_t form,
|
||||
+ unsigned char **out_buf, BN_CTX *ctx);
|
||||
+
|
||||
|
||||
// Key generation.
|
||||
|
|
@ -14,7 +14,7 @@ Commit-Queue: David Benjamin <davidben@google.com>
|
|||
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
|
||||
|
||||
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
|
||||
index ae8b8385fc73701a4346202f213b5974af4e2aed..0f3d1747173ffb09eafd5c7d5d692ae3c35c9874 100644
|
||||
index c0d44ce2820fb20273b453def0b5bcb5ddcc14e9..f0d9dd45e2c41968a84c8a3f31a8c9e4f621f018 100644
|
||||
--- a/include/openssl/ssl.h
|
||||
+++ b/include/openssl/ssl.h
|
||||
@@ -4268,6 +4268,14 @@ OPENSSL_EXPORT int OPENSSL_init_ssl(uint64_t opts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue