]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - ssl/d1_srtp.c
QUIC TLS: Prohibit SRTP-related calls for QUIC TLS
[thirdparty/openssl.git] / ssl / d1_srtp.c
index 557336a0640d63bb4c68659d0a28244d4da10226..13f6bbd0a048996a0d645aa651cb2c170c4326f6 100644 (file)
@@ -139,6 +139,9 @@ static int ssl_ctx_make_profiles(const char *profiles_string,
 
 int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles)
 {
+    if (IS_QUIC_METHOD(ctx->method))
+        return 1;
+
     return ssl_ctx_make_profiles(profiles, &ctx->srtp_profiles);
 }
 
@@ -147,7 +150,7 @@ int SSL_set_tlsext_use_srtp(SSL *s, const char *profiles)
     SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
 
     if (sc == NULL)
-        return 0;
+        return 1;
 
     return ssl_ctx_make_profiles(profiles, &sc->srtp_profiles);
 }