summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_srtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/d1_srtp.c')
-rw-r--r--src/lib/libssl/d1_srtp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c
index 7b80d73d14..98bb24b4fe 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.16 2017/01/23 05:13:02 jsing Exp $ */ 1/* $OpenBSD: d1_srtp.c,v 1.17 2017/01/23 06:45:30 beck 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 *
@@ -223,7 +223,7 @@ SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles)
223int 223int
224SSL_set_tlsext_use_srtp(SSL *s, const char *profiles) 224SSL_set_tlsext_use_srtp(SSL *s, const char *profiles)
225{ 225{
226 return ssl_ctx_make_profiles(profiles, &s->srtp_profiles); 226 return ssl_ctx_make_profiles(profiles, &s->internal->srtp_profiles);
227} 227}
228 228
229 229
@@ -231,8 +231,8 @@ STACK_OF(SRTP_PROTECTION_PROFILE) *
231SSL_get_srtp_profiles(SSL *s) 231SSL_get_srtp_profiles(SSL *s)
232{ 232{
233 if (s != NULL) { 233 if (s != NULL) {
234 if (s->srtp_profiles != NULL) { 234 if (s->internal->srtp_profiles != NULL) {
235 return s->srtp_profiles; 235 return s->internal->srtp_profiles;
236 } else if ((s->ctx != NULL) && 236 } else if ((s->ctx != NULL) &&
237 (s->ctx->internal->srtp_profiles != NULL)) { 237 (s->ctx->internal->srtp_profiles != NULL)) {
238 return s->ctx->internal->srtp_profiles; 238 return s->ctx->internal->srtp_profiles;
@@ -245,7 +245,7 @@ SSL_get_srtp_profiles(SSL *s)
245SRTP_PROTECTION_PROFILE * 245SRTP_PROTECTION_PROFILE *
246SSL_get_selected_srtp_profile(SSL *s) 246SSL_get_selected_srtp_profile(SSL *s)
247{ 247{
248 return s->srtp_profile; 248 return s->internal->srtp_profile;
249} 249}
250 250
251/* Note: this function returns 0 length if there are no 251/* Note: this function returns 0 length if there are no
@@ -360,7 +360,7 @@ ssl_parse_clienthello_use_srtp_ext(SSL *s, const unsigned char *d, int len,
360 cprof = sk_SRTP_PROTECTION_PROFILE_value(clnt, j); 360 cprof = sk_SRTP_PROTECTION_PROFILE_value(clnt, j);
361 361
362 if (cprof->id == sprof->id) { 362 if (cprof->id == sprof->id) {
363 s->srtp_profile = sprof; 363 s->internal->srtp_profile = sprof;
364 *al = 0; 364 *al = 0;
365 ret = 0; 365 ret = 0;
366 goto done; 366 goto done;
@@ -387,13 +387,13 @@ ssl_add_serverhello_use_srtp_ext(SSL *s, unsigned char *p, int *len, int maxlen)
387 return 1; 387 return 1;
388 } 388 }
389 389
390 if (s->srtp_profile == 0) { 390 if (s->internal->srtp_profile == 0) {
391 SSLerr(SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT, 391 SSLerr(SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT,
392 SSL_R_USE_SRTP_NOT_NEGOTIATED); 392 SSL_R_USE_SRTP_NOT_NEGOTIATED);
393 return 1; 393 return 1;
394 } 394 }
395 s2n(2, p); 395 s2n(2, p);
396 s2n(s->srtp_profile->id, p); 396 s2n(s->internal->srtp_profile->id, p);
397 *p++ = 0; 397 *p++ = 0;
398 } 398 }
399 *len = 5; 399 *len = 5;
@@ -458,7 +458,7 @@ ssl_parse_serverhello_use_srtp_ext(SSL *s, const unsigned char *d, int len, int
458 prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i); 458 prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i);
459 459
460 if (prof->id == id) { 460 if (prof->id == id) {
461 s->srtp_profile = prof; 461 s->internal->srtp_profile = prof;
462 *al = 0; 462 *al = 0;
463 return 0; 463 return 0;
464 } 464 }