Convert comments in ssl.
That's the last of it!
Change-Id: I93d1f5ab7e95b2ad105c34b24297a0bf77625263
Reviewed-on: https://boringssl-review.googlesource.com/19784
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/custom_extensions.cc b/ssl/custom_extensions.cc
index dff7041..c22f4fe 100644
--- a/ssl/custom_extensions.cc
+++ b/ssl/custom_extensions.cc
@@ -47,9 +47,9 @@
return NULL;
}
-/* default_add_callback is used as the |add_callback| when the user doesn't
- * provide one. For servers, it does nothing while, for clients, it causes an
- * empty extension to be included. */
+// default_add_callback is used as the |add_callback| when the user doesn't
+// provide one. For servers, it does nothing while, for clients, it causes an
+// empty extension to be included.
static int default_add_callback(SSL *ssl, unsigned extension_value,
const uint8_t **out, size_t *out_len,
int *out_alert_value, void *add_arg) {
@@ -76,7 +76,7 @@
if (ssl->server &&
!(hs->custom_extensions.received & (1u << i))) {
- /* Servers cannot echo extensions that the client didn't send. */
+ // Servers cannot echo extensions that the client didn't send.
continue;
}
@@ -135,9 +135,9 @@
const SSL_CUSTOM_EXTENSION *ext =
custom_ext_find(ssl->ctx->client_custom_extensions, &index, value);
- if (/* Unknown extensions are not allowed in a ServerHello. */
+ if (// Unknown extensions are not allowed in a ServerHello.
ext == NULL ||
- /* Also, if we didn't send the extension, that's also unacceptable. */
+ // Also, if we didn't send the extension, that's also unacceptable.
!(hs->custom_extensions.sent & (1u << index))) {
OPENSSL_PUT_ERROR(SSL, SSL_R_UNEXPECTED_EXTENSION);
ERR_add_error_dataf("extension %u", (unsigned)value);
@@ -185,9 +185,9 @@
return custom_ext_add_hello(hs, extensions);
}
-/* MAX_NUM_CUSTOM_EXTENSIONS is the maximum number of custom extensions that
- * can be set on an |SSL_CTX|. It's determined by the size of the bitset used
- * to track when an extension has been sent. */
+// MAX_NUM_CUSTOM_EXTENSIONS is the maximum number of custom extensions that
+// can be set on an |SSL_CTX|. It's determined by the size of the bitset used
+// to track when an extension has been sent.
#define MAX_NUM_CUSTOM_EXTENSIONS \
(sizeof(((SSL_HANDSHAKE *)NULL)->custom_extensions.sent) * 8)
@@ -200,8 +200,8 @@
if (add_cb == NULL ||
0xffff < extension_value ||
SSL_extension_supported(extension_value) ||
- /* Specifying a free callback without an add callback is nonsensical
- * and an error. */
+ // Specifying a free callback without an add callback is nonsensical
+ // and an error.
(*stack != NULL &&
(MAX_NUM_CUSTOM_EXTENSIONS <= sk_SSL_CUSTOM_EXTENSION_num(*stack) ||
custom_ext_find(*stack, NULL, extension_value) != NULL))) {