diff options
Diffstat (limited to 'src/lib/libssl/d1_srtp.c')
| -rw-r--r-- | src/lib/libssl/d1_srtp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c index 70e9a4f127..6d4a1661e1 100644 --- a/src/lib/libssl/d1_srtp.c +++ b/src/lib/libssl/d1_srtp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_srtp.c,v 1.24 2020/03/16 15:25:13 tb Exp $ */ | 1 | /* $OpenBSD: d1_srtp.c,v 1.25 2020/10/11 01:16:31 guenther Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -126,7 +126,7 @@ | |||
| 126 | #include "bytestring.h" | 126 | #include "bytestring.h" |
| 127 | #include "srtp.h" | 127 | #include "srtp.h" |
| 128 | 128 | ||
| 129 | static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = { | 129 | static const SRTP_PROTECTION_PROFILE srtp_known_profiles[] = { |
| 130 | { | 130 | { |
| 131 | "SRTP_AES128_CM_SHA1_80", | 131 | "SRTP_AES128_CM_SHA1_80", |
| 132 | SRTP_AES128_CM_SHA1_80, | 132 | SRTP_AES128_CM_SHA1_80, |
| @@ -139,10 +139,10 @@ static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = { | |||
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | int | 141 | int |
| 142 | srtp_find_profile_by_name(char *profile_name, SRTP_PROTECTION_PROFILE **pptr, | 142 | srtp_find_profile_by_name(char *profile_name, |
| 143 | unsigned int len) | 143 | const SRTP_PROTECTION_PROFILE **pptr, unsigned int len) |
| 144 | { | 144 | { |
| 145 | SRTP_PROTECTION_PROFILE *p; | 145 | const SRTP_PROTECTION_PROFILE *p; |
| 146 | 146 | ||
| 147 | p = srtp_known_profiles; | 147 | p = srtp_known_profiles; |
| 148 | while (p->name) { | 148 | while (p->name) { |
| @@ -160,9 +160,9 @@ srtp_find_profile_by_name(char *profile_name, SRTP_PROTECTION_PROFILE **pptr, | |||
| 160 | 160 | ||
| 161 | int | 161 | int |
| 162 | srtp_find_profile_by_num(unsigned int profile_num, | 162 | srtp_find_profile_by_num(unsigned int profile_num, |
| 163 | SRTP_PROTECTION_PROFILE **pptr) | 163 | const SRTP_PROTECTION_PROFILE **pptr) |
| 164 | { | 164 | { |
| 165 | SRTP_PROTECTION_PROFILE *p; | 165 | const SRTP_PROTECTION_PROFILE *p; |
| 166 | 166 | ||
| 167 | p = srtp_known_profiles; | 167 | p = srtp_known_profiles; |
| 168 | while (p->name) { | 168 | while (p->name) { |
| @@ -185,7 +185,7 @@ ssl_ctx_make_profiles(const char *profiles_string, | |||
| 185 | char *col; | 185 | char *col; |
| 186 | char *ptr = (char *)profiles_string; | 186 | char *ptr = (char *)profiles_string; |
| 187 | 187 | ||
| 188 | SRTP_PROTECTION_PROFILE *p; | 188 | const SRTP_PROTECTION_PROFILE *p; |
| 189 | 189 | ||
| 190 | if (!(profiles = sk_SRTP_PROTECTION_PROFILE_new_null())) { | 190 | if (!(profiles = sk_SRTP_PROTECTION_PROFILE_new_null())) { |
| 191 | SSLerrorx(SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES); | 191 | SSLerrorx(SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES); |
| @@ -245,7 +245,8 @@ SSL_get_srtp_profiles(SSL *s) | |||
| 245 | SRTP_PROTECTION_PROFILE * | 245 | SRTP_PROTECTION_PROFILE * |
| 246 | SSL_get_selected_srtp_profile(SSL *s) | 246 | SSL_get_selected_srtp_profile(SSL *s) |
| 247 | { | 247 | { |
| 248 | return s->internal->srtp_profile; | 248 | /* XXX cast away the const */ |
| 249 | return (SRTP_PROTECTION_PROFILE *)s->internal->srtp_profile; | ||
| 249 | } | 250 | } |
| 250 | 251 | ||
| 251 | #endif | 252 | #endif |
