diff options
author | David Benjamin <davidben@google.com> | 2021-05-20 11:31:05 -0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2021-05-21 18:18:26 +0000 |
commit | b778b9c1b3d21450025e2cb22587bf79714912eb (patch) | |
tree | 75845498d466634a114cd58169b0451bd9bfa839 /ssl/d1_srtp.cc | |
parent | 49ee62fe13adacfc89d3d612f79e3a8425b500c5 (diff) | |
download | boringssl-b778b9c1b3d21450025e2cb22587bf79714912eb.zip boringssl-b778b9c1b3d21450025e2cb22587bf79714912eb.tar.gz boringssl-b778b9c1b3d21450025e2cb22587bf79714912eb.tar.bz2 |
Const-correct SSL_get_srtp_profiles.
This is part of a very deep dependency chain. I'm sniffing at making all
the add_clienthello callbacks const. Between HelloVerifyRequest,
HelloRetryRequest, and soon ECH, we're creating lots of ClientHellos per
connection. That's probably easiest to manage if constructing a
ClientHello had no side effects.
Update-Note: The change to the return type isn't quite compatible, but I
only found one caller of this function, which has since been fixed. (If
we need to return a non-const value for compatibility, we can do that
and document that the caller should not mutate the output.)
Change-Id: I21f18f7438920a5b03d874fa548f054af3a42c4a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/47664
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_srtp.cc')
-rw-r--r-- | ssl/d1_srtp.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/d1_srtp.cc b/ssl/d1_srtp.cc index 96d7d51..12c8075 100644 --- a/ssl/d1_srtp.cc +++ b/ssl/d1_srtp.cc @@ -202,7 +202,7 @@ int SSL_set_srtp_profiles(SSL *ssl, const char *profiles) { ssl_ctx_make_profiles(profiles, &ssl->config->srtp_profiles); } -STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl) { +const STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(const SSL *ssl) { if (ssl == nullptr) { return nullptr; } |