--- /dev/null
+<testcase>
+
+#Informational
+<info>
+<keywords>
+RTSP
+RTSP Basic auth
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+RTSP/1.0 401 Unauthorized please swsbounce\r
+Server: RTSPD/libcurl-test\r
+CSeq: 1\r
+WWW-Authenticate: Basic realm="please-auth-me"\r
+\r
+</data>
+<data1>
+RTSP/1.0 200 OK\r
+Server: RTSPD/libcurl-test\r
+CSeq: 2\r
+Content-Base: rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER\r
+Content-Length: 80\r
+Curl-private: swsclose\r
+\r
+v=0\r
+s=rtspd SDP\r
+i=A fake SDP reply\r
+u=http://www.curl.example.com/fakesdp.ps\r
+</data1>
+<datacheck>
+RTSP/1.0 401 Unauthorized please swsbounce\r
+Server: RTSPD/libcurl-test\r
+CSeq: 1\r
+WWW-Authenticate: Basic realm="please-auth-me"\r
+\r
+RTSP/1.0 200 OK\r
+Server: RTSPD/libcurl-test\r
+CSeq: 2\r
+Content-Base: rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER\r
+Content-Length: 80\r
+Curl-private: swsclose\r
+\r
+v=0\r
+s=rtspd SDP\r
+i=A fake SDP reply\r
+u=http://www.curl.example.com/fakesdp.ps\r
+</datacheck>
+</reply>
+
+# Client-Side
+<client>
+<server>
+rtsp
+</server>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<name>
+RTSP Authentication check
+</name>
+<command>
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+DESCRIBE rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER RTSP/1.0\r
+CSeq: 1\r
+Accept: application/sdp\r
+\r
+DESCRIBE rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER RTSP/1.0\r
+CSeq: 2\r
+Accept: application/sdp\r
+Authorization: Basic dXNlcjpwYXNzd29yZA==\r
+\r
+</protocol>
+</verify>
+
+</testcase>
lib1933 lib1934 lib1935 lib1936 lib1937 lib1938 lib1939 lib1940 \
lib1945 lib1946 lib1947 lib1948 lib1955 \
lib2301 lib2302 \
- lib3010 lib3025 lib3026 lib3027
+ lib3010 lib3025 lib3026 lib3027 \
+ lib3100
chkdecimalpoint_SOURCES = chkdecimalpoint.c ../../lib/mprintf.c \
../../lib/dynbuf.c ../../lib/strdup.c
lib3027_SOURCES = lib3027.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib3027_LDADD = $(TESTUTIL_LIBS)
lib3027_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib3100_SOURCES = lib3100.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib3100_LDADD = $(TESTUTIL_LIBS)
+lib3100_CPPFLAGS = $(AM_CPPFLAGS)
--- /dev/null
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include "test.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ int res;
+ CURL *curl;
+
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ curl = curl_easy_init();
+ if(!curl) {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ test_setopt(curl, CURLOPT_HEADERDATA, stdout);
+ test_setopt(curl, CURLOPT_WRITEDATA, stdout);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_RTSP_STREAM_URI, URL);
+
+ test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+ test_setopt(curl, CURLOPT_USERNAME, "user");
+ test_setopt(curl, CURLOPT_PASSWORD, "password");
+ test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE);
+
+ res = curl_easy_perform(curl);
+ if(res != (int)CURLE_OK) {
+ fprintf(stderr, "Failed to send DESCRIBE: %d\n", res);
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+
+test_cleanup:
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}