external/boringssl: Sync to f21650709a6f76e829ddcc77fe221c9d6a5c12de.

This includes the following changes:

https://boringssl.googlesource.com/boringssl/+log/348f0d8db9c2a0eca0503ba654020209c579d552..f21650709a6f76e829ddcc77fe221c9d6a5c12de

Test: BoringSSL CTS Presubmits.
Change-Id: Ie6e99c3315c552068b5ea57e31b1af7ff94f9b0f
diff --git a/src/crypto/obj/obj.c b/src/crypto/obj/obj.c
index 173257f..3968515 100644
--- a/src/crypto/obj/obj.c
+++ b/src/crypto/obj/obj.c
@@ -77,7 +77,7 @@
 
 
 static struct CRYPTO_STATIC_MUTEX global_added_lock = CRYPTO_STATIC_MUTEX_INIT;
-/* These globals are protected by |global_added_lock|. */
+// These globals are protected by |global_added_lock|.
 static LHASH_OF(ASN1_OBJECT) *global_added_by_data = NULL;
 static LHASH_OF(ASN1_OBJECT) *global_added_by_nid = NULL;
 static LHASH_OF(ASN1_OBJECT) *global_added_by_short_name = NULL;
@@ -107,7 +107,7 @@
   }
 
   if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC)) {
-    /* TODO(fork): this is a little dangerous. */
+    // TODO(fork): this is a little dangerous.
     return (ASN1_OBJECT *)o;
   }
 
@@ -126,7 +126,7 @@
     OPENSSL_memcpy(data, o->data, o->length);
   }
 
-  /* once data is attached to an object, it remains const */
+  // once data is attached to an object, it remains const
   r->data = data;
   r->length = o->length;
   r->nid = o->nid;
@@ -172,9 +172,9 @@
   return OPENSSL_memcmp(a->data, b->data, a->length);
 }
 
-/* obj_cmp is called to search the kNIDsInOIDOrder array. The |key| argument is
- * an |ASN1_OBJECT|* that we're looking for and |element| is a pointer to an
- * unsigned int in the array. */
+// obj_cmp is called to search the kNIDsInOIDOrder array. The |key| argument is
+// an |ASN1_OBJECT|* that we're looking for and |element| is a pointer to an
+// unsigned int in the array.
 static int obj_cmp(const void *key, const void *element) {
   unsigned nid = *((const unsigned*) element);
   const ASN1_OBJECT *a = key;
@@ -233,9 +233,9 @@
   return OBJ_obj2nid(&obj);
 }
 
-/* short_name_cmp is called to search the kNIDsInShortNameOrder array. The
- * |key| argument is name that we're looking for and |element| is a pointer to
- * an unsigned int in the array. */
+// short_name_cmp is called to search the kNIDsInShortNameOrder array. The
+// |key| argument is name that we're looking for and |element| is a pointer to
+// an unsigned int in the array.
 static int short_name_cmp(const void *key, const void *element) {
   const char *name = (const char *) key;
   unsigned nid = *((unsigned*) element);
@@ -269,9 +269,9 @@
   return kObjects[*nid_ptr].nid;
 }
 
-/* long_name_cmp is called to search the kNIDsInLongNameOrder array. The
- * |key| argument is name that we're looking for and |element| is a pointer to
- * an unsigned int in the array. */
+// long_name_cmp is called to search the kNIDsInLongNameOrder array. The
+// |key| argument is name that we're looking for and |element| is a pointer to
+// an unsigned int in the array.
 static int long_name_cmp(const void *key, const void *element) {
   const char *name = (const char *) key;
   unsigned nid = *((unsigned*) element);
@@ -392,12 +392,12 @@
     }
   }
 
-  /* Work out size of content octets */
+  // Work out size of content octets
   contents_len = a2d_ASN1_OBJECT(NULL, 0, s, -1);
   if (contents_len <= 0) {
     return NULL;
   }
-  /* Work out total size */
+  // Work out total size
   total_len = ASN1_object_size(0, contents_len, V_ASN1_OBJECT);
 
   buf = OPENSSL_malloc(total_len);
@@ -407,9 +407,9 @@
   }
 
   p = buf;
-  /* Write out tag+length */
+  // Write out tag+length
   ASN1_put_object(&p, 0, contents_len, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
-  /* Write out contents */
+  // Write out contents
   a2d_ASN1_OBJECT(p, contents_len, s, -1);
 
   bufp = buf;
@@ -436,16 +436,16 @@
       return 0;
     }
     if ((v >> (64 - 7)) != 0) {
-      /* The component is too large. */
+      // The component is too large.
       return 0;
     }
     if (v == 0 && b == 0x80) {
-      /* The component must be minimally encoded. */
+      // The component must be minimally encoded.
       return 0;
     }
     v = (v << 7) | (b & 0x7f);
 
-    /* Components end at an octet with the high bit cleared. */
+    // Components end at an octet with the high bit cleared.
   } while (b & 0x80);
 
   *out = v;
@@ -460,8 +460,8 @@
 
 int OBJ_obj2txt(char *out, int out_len, const ASN1_OBJECT *obj,
                 int always_return_oid) {
-  /* Python depends on the empty OID successfully encoding as the empty
-   * string. */
+  // Python depends on the empty OID successfully encoding as the empty
+  // string.
   if (obj == NULL || obj->length == 0) {
     return strlcpy_int(out, "", out_len);
   }
@@ -487,7 +487,7 @@
   CBS cbs;
   CBS_init(&cbs, obj->data, obj->length);
 
-  /* The first component is 40 * value1 + value2, where value1 is 0, 1, or 2. */
+  // The first component is 40 * value1 + value2, where value1 is 0, 1, or 2.
   uint64_t v;
   if (!parse_oid_component(&cbs, &v)) {
     goto err;
@@ -567,8 +567,8 @@
   return strcmp(a->ln, b->ln);
 }
 
-/* obj_add_object inserts |obj| into the various global hashes for run-time
- * added objects. It returns one on success or zero otherwise. */
+// obj_add_object inserts |obj| into the various global hashes for run-time
+// added objects. It returns one on success or zero otherwise.
 static int obj_add_object(ASN1_OBJECT *obj) {
   int ok;
   ASN1_OBJECT *old_object;
@@ -584,10 +584,10 @@
     global_added_by_long_name = lh_ASN1_OBJECT_new(hash_long_name, cmp_long_name);
   }
 
-  /* We don't pay attention to |old_object| (which contains any previous object
-   * that was evicted from the hashes) because we don't have a reference count
-   * on ASN1_OBJECT values. Also, we should never have duplicates nids and so
-   * should always have objects in |global_added_by_nid|. */
+  // We don't pay attention to |old_object| (which contains any previous object
+  // that was evicted from the hashes) because we don't have a reference count
+  // on ASN1_OBJECT values. Also, we should never have duplicates nids and so
+  // should always have objects in |global_added_by_nid|.
 
   ok = lh_ASN1_OBJECT_insert(global_added_by_nid, &old_object, obj);
   if (obj->length != 0 && obj->data != NULL) {