external/boringssl: Sync to 8459d0659920ab8c99bd300b8a989d4cda251118.
This includes the following changes:
https://boringssl.googlesource.com/boringssl/+log/f21650709a6f76e829ddcc77fe221c9d6a5c12de..8459d0659920ab8c99bd300b8a989d4cda251118
Test: BoringSSL CTS Presubmits.
Change-Id: I5745e86549d938f384e5de73a8fabb2405ed9b56
diff --git a/src/ssl/ssl_key_share.cc b/src/ssl/ssl_key_share.cc
index eb61535..207f11e 100644
--- a/src/ssl/ssl_key_share.cc
+++ b/src/ssl/ssl_key_share.cc
@@ -42,14 +42,14 @@
bool Offer(CBB *out) override {
assert(!private_key_);
- /* Set up a shared |BN_CTX| for all operations. */
+ // Set up a shared |BN_CTX| for all operations.
UniquePtr<BN_CTX> bn_ctx(BN_CTX_new());
if (!bn_ctx) {
return false;
}
BN_CTXScope scope(bn_ctx.get());
- /* Generate a private key. */
+ // Generate a private key.
UniquePtr<EC_GROUP> group(EC_GROUP_new_by_curve_name(nid_));
private_key_.reset(BN_new());
if (!group || !private_key_ ||
@@ -58,7 +58,7 @@
return false;
}
- /* Compute the corresponding public key and serialize it. */
+ // Compute the corresponding public key and serialize it.
UniquePtr<EC_POINT> public_key(EC_POINT_new(group.get()));
if (!public_key ||
!EC_POINT_mul(group.get(), public_key.get(), private_key_.get(), NULL,
@@ -76,7 +76,7 @@
assert(private_key_);
*out_alert = SSL_AD_INTERNAL_ERROR;
- /* Set up a shared |BN_CTX| for all operations. */
+ // Set up a shared |BN_CTX| for all operations.
UniquePtr<BN_CTX> bn_ctx(BN_CTX_new());
if (!bn_ctx) {
return false;
@@ -101,7 +101,7 @@
return false;
}
- /* Compute the x-coordinate of |peer_key| * |private_key_|. */
+ // Compute the x-coordinate of |peer_key| * |private_key_|.
if (!EC_POINT_mul(group.get(), result.get(), NULL, peer_point.get(),
private_key_.get(), bn_ctx.get()) ||
!EC_POINT_get_affine_coordinates_GFp(group.get(), result.get(), x, NULL,
@@ -109,7 +109,7 @@
return false;
}
- /* Encode the x-coordinate left-padded with zeros. */
+ // Encode the x-coordinate left-padded with zeros.
size_t secret_len = (EC_GROUP_get_degree(group.get()) + 7) / 8;
UniquePtr<uint8_t> secret((uint8_t *)OPENSSL_malloc(secret_len));
if (!secret || !BN_bn2bin_padded(secret.get(), secret_len, x)) {