Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package live555 for openSUSE:Factory checked 
in at 2022-06-25 10:23:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/live555 (Old)
 and      /work/SRC/openSUSE:Factory/.live555.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "live555"

Sat Jun 25 10:23:55 2022 rev:32 rq:984903 version:2022.06.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/live555/live555.changes  2022-05-06 
18:58:16.529286783 +0200
+++ /work/SRC/openSUSE:Factory/.live555.new.1548/live555.changes        
2022-06-25 10:24:02.450654790 +0200
@@ -1,0 +2,14 @@
+Fri Jun 24 12:15:38 UTC 2022 - Dominique Leuenberger <[email protected]>
+
+- Update to version 2022.06.16:
+  + Both our RTSP client and RTSP server implementations now
+    support (optional) RTSP-over-HTTPS streaming, when
+    RTSP-over-TLS would otherwise be available.
+- Changes from version 2022.06.14:
+  + Added optional support (via #ifdefs) to the
+    "testOnDemandRTSPServer" demo application for streaming via
+    RTSPS (RTSP-over-TLS) and optionally SRTP (encrypted RTP/RTCP).
+    To use this, you would need to define SERVER_USE_TLS, and
+    PATHNAME_TO_CERTIFICATE_FILE and PATHNAME_TO_PRIVATE_KEY_FILE.
+
+-------------------------------------------------------------------

Old:
----
  live.2022.04.26.tar.gz

New:
----
  live.2022.06.16.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ live555.spec ++++++
--- /var/tmp/diff_new_pack.GeIl6N/_old  2022-06-25 10:24:03.670656532 +0200
+++ /var/tmp/diff_new_pack.GeIl6N/_new  2022-06-25 10:24:03.674656538 +0200
@@ -17,10 +17,10 @@
 #
 
 
-%define lmdmaj 106
+%define lmdmaj 107
 
 Name:           live555
-Version:        2022.04.26
+Version:        2022.06.16
 Release:        0
 Summary:        LIVE555 Streaming Media
 License:        LGPL-2.1-only

++++++ live.2022.04.26.tar.gz -> live.2022.06.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/live/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh 
new/live/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh
--- old/live/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh     
2022-04-26 02:01:17.000000000 +0200
+++ new/live/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh     
2022-06-16 13:14:03.000000000 +0200
@@ -19,7 +19,7 @@
 #ifndef _BASICUSAGEENVIRONMENT_VERSION_HH
 #define _BASICUSAGEENVIRONMENT_VERSION_HH
 
-#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING   "2022.04.26"
-#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT              1650931200
+#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING   "2022.06.16"
+#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT              1655337600
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/live/UsageEnvironment/include/UsageEnvironment_version.hh 
new/live/UsageEnvironment/include/UsageEnvironment_version.hh
--- old/live/UsageEnvironment/include/UsageEnvironment_version.hh       
2022-04-26 02:01:17.000000000 +0200
+++ new/live/UsageEnvironment/include/UsageEnvironment_version.hh       
2022-06-16 13:14:03.000000000 +0200
@@ -19,7 +19,7 @@
 #ifndef _USAGEENVIRONMENT_VERSION_HH
 #define _USAGEENVIRONMENT_VERSION_HH
 
-#define USAGEENVIRONMENT_LIBRARY_VERSION_STRING        "2022.04.26"
-#define USAGEENVIRONMENT_LIBRARY_VERSION_INT           1650931200
+#define USAGEENVIRONMENT_LIBRARY_VERSION_STRING        "2022.06.16"
+#define USAGEENVIRONMENT_LIBRARY_VERSION_INT           1655337600
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/config.linux-with-shared-libraries 
new/live/config.linux-with-shared-libraries
--- old/live/config.linux-with-shared-libraries 2022-04-26 02:02:15.000000000 
+0200
+++ new/live/config.linux-with-shared-libraries 2022-06-16 13:15:12.000000000 
+0200
@@ -3,8 +3,8 @@
 # At least one interface changes, or is removed => CURRENT += 1; REVISION = 0; 
AGE = 0
 # One or more interfaces were added, but no existing interfaces were changed 
or removed => CURRENT += 1; REVISION = 0; AGE += 1
 
-libliveMedia_VERSION_CURRENT=107
-libliveMedia_VERSION_REVISION=1
+libliveMedia_VERSION_CURRENT=108
+libliveMedia_VERSION_REVISION=0
 libliveMedia_VERSION_AGE=1
 libliveMedia_LIB_SUFFIX=so.$(shell expr $(libliveMedia_VERSION_CURRENT) - 
$(libliveMedia_VERSION_AGE)).$(libliveMedia_VERSION_AGE).$(libliveMedia_VERSION_REVISION)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/groupsock/include/groupsock_version.hh 
new/live/groupsock/include/groupsock_version.hh
--- old/live/groupsock/include/groupsock_version.hh     2022-04-26 
02:01:17.000000000 +0200
+++ new/live/groupsock/include/groupsock_version.hh     2022-06-16 
13:14:03.000000000 +0200
@@ -19,7 +19,7 @@
 #ifndef _GROUPSOCK_VERSION_HH
 #define _GROUPSOCK_VERSION_HH
 
-#define GROUPSOCK_LIBRARY_VERSION_STRING       "2022.04.26"
-#define GROUPSOCK_LIBRARY_VERSION_INT          1650931200
+#define GROUPSOCK_LIBRARY_VERSION_STRING       "2022.06.16"
+#define GROUPSOCK_LIBRARY_VERSION_INT          1655337600
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/GenericMediaServer.cpp 
new/live/liveMedia/GenericMediaServer.cpp
--- old/live/liveMedia/GenericMediaServer.cpp   2022-04-26 02:01:17.000000000 
+0200
+++ new/live/liveMedia/GenericMediaServer.cpp   2022-06-16 13:14:03.000000000 
+0200
@@ -265,6 +265,8 @@
                   int clientSocket, struct sockaddr_storage const& clientAddr,
                   Boolean useTLS)
   : fOurServer(ourServer), fOurSocket(clientSocket), fClientAddr(clientAddr), 
fTLS(envir()) {
+  fInputTLS = fOutputTLS = &fTLS;
+
   // Add ourself to our 'client connections' table:
   fOurServer.fClientConnections->Add((char const*)this, this);
   
@@ -304,16 +306,16 @@
 }
 
 void GenericMediaServer::ClientConnection::incomingRequestHandler() {
-  if (fTLS.tlsAcceptIsNeeded) { // we need to successfully call fTLS.accept() 
first:
-    if (fTLS.accept(fOurSocket) <= 0) return; // either an error, or we need 
to try again later
+  if (fInputTLS->tlsAcceptIsNeeded) { // we need to successfully call 
fInputTLS->accept() first:
+    if (fInputTLS->accept(fOurSocket) <= 0) return; // either an error, or we 
need to try again later
 
-    fTLS.tlsAcceptIsNeeded = False;
+    fInputTLS->tlsAcceptIsNeeded = False;
     // We can now read data, as usual:
   }
 
   int bytesRead;
-  if (fTLS.isNeeded) {
-    bytesRead = fTLS.read(&fRequestBuffer[fRequestBytesAlreadySeen], 
fRequestBufferBytesLeft);
+  if (fInputTLS->isNeeded) {
+    bytesRead = fInputTLS->read(&fRequestBuffer[fRequestBytesAlreadySeen], 
fRequestBufferBytesLeft);
   } else {
     struct sockaddr_storage dummy; // 'from' address, meaningless in this case
   
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/RTSPClient.cpp 
new/live/liveMedia/RTSPClient.cpp
--- old/live/liveMedia/RTSPClient.cpp   2022-04-26 02:01:17.000000000 +0200
+++ new/live/liveMedia/RTSPClient.cpp   2022-06-16 13:14:03.000000000 +0200
@@ -276,7 +276,7 @@
       defaultPortNumber = 554;
       from = &url[rtspPrefixLength];
     } else if (_strncasecmp(url, rtspsPrefix, rtspsPrefixLength) == 0) {
-      useTLS();
+      fTLS.isNeeded = True;
       defaultPortNumber = 322;
       from = &url[rtspsPrefixLength];
     } else {
@@ -400,7 +400,8 @@
     fInputSocketNum(-1), fOutputSocketNum(-1), fBaseURL(NULL), 
fTCPStreamIdCount(0),
     fLastSessionId(NULL), fSessionTimeoutParameter(0), fRequireStr(NULL),
     fSessionCookieCounter(0), fHTTPTunnelingConnectionIsPending(False),
-    fTLS(*this) {
+    fTLS(*this), fPOSTSocketTLS(*this) {
+  fInputTLS = fOutputTLS = &fTLS; // fOutputTLS will change if we're doing 
RTSP-over-HTTPS
   setBaseURL(rtspURL);
 
   fResponseBuffer = new char[responseBufferSize+1];
@@ -908,9 +909,10 @@
     NetAddress destAddress;
     portNumBits urlPortNum;
     char const* urlSuffix;
+
     if (!parseRTSPURL(fBaseURL, username, password, destAddress, urlPortNum, 
&urlSuffix)) break;
+    if (urlPortNum == 322) fTLS.isNeeded = True; // port 322 is a special 
case: "rtsps"
     portNumBits destPortNum = fTunnelOverHTTPPortNum == 0 ? urlPortNum : 
fTunnelOverHTTPPortNum;
-    if (destPortNum == 322) useTLS(); // port 322 is a special case: "rtsps"
 
     if (username != NULL || password != NULL) {
       fCurrentAuthenticator.setUsernameAndPassword(username, password);
@@ -930,9 +932,9 @@
     int connectResult = connectToServer(fInputSocketNum, destPortNum);
     if (connectResult < 0) break;
     else if (connectResult > 0) {
-      if (fTLS.isNeeded) {
+      if (fInputTLS->isNeeded) {
        // We need to complete an additional TLS connection:
-       connectResult = fTLS.connect(fInputSocketNum);
+       connectResult = fInputTLS->connect(fInputSocketNum);
        if (connectResult < 0) break;
        if (connectResult > 0 && fVerbosityLevel >= 1) envir() << "...TLS 
connection completed\n";
       }
@@ -1277,13 +1279,13 @@
     if (streamUsingTCP) {
       // Tell the subsession to receive RTP (and send/receive RTCP) over the 
RTSP stream:
       if (subsession.rtpSource() != NULL) {
-       subsession.rtpSource()->setStreamSocket(fInputSocketNum, 
subsession.rtpChannelId, &fTLS);
+       subsession.rtpSource()->setStreamSocket(fInputSocketNum, 
subsession.rtpChannelId, fInputTLS);
          // So that we continue to receive & handle RTSP commands and 
responses from the server
        subsession.rtpSource()->enableRTCPReports() = False;
          // To avoid confusing the server (which won't start handling 
RTP/RTCP-over-TCP until "PLAY"), don't send RTCP "RR"s yet
        increaseReceiveBufferTo(envir(), fInputSocketNum, 50*1024);
       }
-      if (subsession.rtcpInstance() != NULL) 
subsession.rtcpInstance()->setStreamSocket(fInputSocketNum, 
subsession.rtcpChannelId, &fTLS);
+      if (subsession.rtcpInstance() != NULL) 
subsession.rtcpInstance()->setStreamSocket(fInputSocketNum, 
subsession.rtcpChannelId, fInputTLS);
       RTPInterface::setServerRequestAlternativeByteHandler(envir(), 
fInputSocketNum, handleAlternativeRequestByte, this);
     } else {
       // Normal case.
@@ -1560,6 +1562,8 @@
     fOutputSocketNum = setupStreamSocket(envir(), 0, fServerAddress.ss_family);
     if (fOutputSocketNum < 0) break;
     ignoreSigPipeOnSocket(fOutputSocketNum); // so that servers on the same 
host that killed don't also kill us
+    fOutputTLS = &fPOSTSocketTLS;
+    fOutputTLS->isNeeded = fInputTLS->isNeeded;
 
     fHTTPTunnelingConnectionIsPending = True;
     int connectResult = connectToServer(fOutputSocketNum, 
fTunnelOverHTTPPortNum);
@@ -1571,6 +1575,12 @@
        fRequestsAwaitingConnection.enqueue(request);
       }
       return;
+    } else { // connectResult > 0
+      if (fOutputTLS->isNeeded) {
+       // We need to complete an additional TLS connection:
+       connectResult = fOutputTLS->connect(fOutputSocketNum);
+       if (connectResult < 0) break;
+      }
     }
 
     // The connection succeeded.  Continue setting up RTSP-over-HTTP:
@@ -1631,9 +1641,9 @@
     // The connection succeeded.  If the connection came about from an attempt 
to set up RTSP-over-HTTP, finish this now:
     if (fHTTPTunnelingConnectionIsPending && !setupHTTPTunneling2()) break;
 
-    if (fTLS.isNeeded) {
+    if (fInputTLS->isNeeded) {
       // We need to complete an additional TLS connection:
-      int tlsConnectResult = fTLS.connect(fInputSocketNum);
+      int tlsConnectResult = fInputTLS->connect(fInputSocketNum);
       if (tlsConnectResult < 0) break; // error in TLS connection
       if (tlsConnectResult > 0 && fVerbosityLevel >= 1) envir() << "...TLS 
connection completed\n";
       if (tlsConnectResult == 0) {
@@ -2009,16 +2019,16 @@
 }
 
 int RTSPClient::write(const char* data, unsigned count) {
-      if (fTLS.isNeeded) {
-       return fTLS.write(data, count);
+      if (fOutputTLS->isNeeded) {
+       return fOutputTLS->write(data, count);
       } else {
        return send(fOutputSocketNum, data, count, 0);
       }
 }
 
 int RTSPClient::read(u_int8_t* buffer, unsigned bufferSize) {
-  if (fTLS.isNeeded) {
-    return fTLS.read(buffer, bufferSize);
+  if (fInputTLS->isNeeded) {
+    return fInputTLS->read(buffer, bufferSize);
   } else {
     struct sockaddr_storage dummy; // 'from' address - not used
     return readSocket(envir(), fInputSocketNum, buffer, bufferSize, dummy);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/RTSPServer.cpp 
new/live/liveMedia/RTSPServer.cpp
--- old/live/liveMedia/RTSPServer.cpp   2022-04-26 02:01:17.000000000 +0200
+++ new/live/liveMedia/RTSPServer.cpp   2022-06-16 13:14:03.000000000 +0200
@@ -114,6 +114,10 @@
 }
 
 Boolean RTSPServer::setUpTunnelingOverHTTP(Port httpPort) {
+  if (fWeServeSRTP) return False;
+    // If we've already set up streaming using SRTP, then streaming over HTTPS 
would make no
+    // sense (as SRTP would add extra overhead for no benefit).
+
   fHTTPServerSocketIPv4 = setUpOurSocket(envir(), httpPort, AF_INET);
   fHTTPServerSocketIPv6 = setUpOurSocket(envir(), httpPort, AF_INET6);
   if (fHTTPServerSocketIPv4 >= 0 || fHTTPServerSocketIPv6 >= 0) {
@@ -142,7 +146,7 @@
 
   if (fWeServeSRTP) disableStreamingRTPOverTCP();
     // If you want to stream RTP-over-TCP using a secure TCP connection, then 
stream over TLS,
-    // but without SRTP (as that would add extra overhead for no benefit).
+    // but without SRTP (as SRTP would add extra overhead for no benefit).
 }
 
 char const* RTSPServer::allowedCommandNames() {
@@ -178,7 +182,6 @@
     fRegisterOrDeregisterRequestCounter(0), fAuthDB(authDatabase),
     fAllowStreamingRTPOverTCP(True),
     fOurConnectionsUseTLS(False), fWeServeSRTP(False) {
-  portNumBits serverPortNumHostOrder = ntohs(fServerPort.num());
 }
 
 // A data structure that is used to implement "fTCPStreamingDatabase"
@@ -326,7 +329,7 @@
                       Boolean useTLS)
   : GenericMediaServer::ClientConnection(ourServer, clientSocket, clientAddr, 
useTLS),
     fOurRTSPServer(ourServer), fClientInputSocket(fOurSocket), 
fClientOutputSocket(fOurSocket),
-    fAddressFamily(clientAddr.ss_family),
+    fPOSTSocketTLS(envir()), fAddressFamily(clientAddr.ss_family),
     fIsActive(True), fRecursionCount(0), fOurSessionCookie(NULL), 
fScheduledDelayedTask(0) {
   resetRequestBuffer();
 }
@@ -627,8 +630,11 @@
 #endif
   
   // Change the previous "RTSPClientSession" object's input socket to ours.  
It will be used for subsequent requests:
-  prevClientConnection->changeClientInputSocket(fClientInputSocket, extraData, 
extraDataSize);
+  prevClientConnection->changeClientInputSocket(fClientInputSocket, fInputTLS,
+                                               extraData, extraDataSize);
   fClientInputSocket = fClientOutputSocket = -1; // so the socket doesn't get 
closed when we get deleted
+  fInputTLS->nullify(); // so that our destructor doesn't reset the copied TLS 
state
+
   return True;
 }
 
@@ -967,8 +973,8 @@
     fprintf(stderr, "sending response: %s", fResponseBuffer);
 #endif
     unsigned const numBytesToWrite = strlen((char*)fResponseBuffer);
-    if (fTLS.isNeeded) {
-        fTLS.write((char const*)fResponseBuffer, numBytesToWrite);
+    if (fOutputTLS->isNeeded) {
+        fOutputTLS->write((char const*)fResponseBuffer, numBytesToWrite);
     } else {
         send(fClientOutputSocket, (char const*)fResponseBuffer, 
numBytesToWrite, 0);
    }
@@ -1203,12 +1209,18 @@
 }
 
 void RTSPServer::RTSPClientConnection
-::changeClientInputSocket(int newSocketNum, unsigned char const* extraData, 
unsigned extraDataSize) {
+::changeClientInputSocket(int newSocketNum, ServerTLSState const* newTLSState,
+                         unsigned char const* extraData, unsigned 
extraDataSize) {
+  // Change the socket number:
   envir().taskScheduler().disableBackgroundHandling(fClientInputSocket);
   fClientInputSocket = newSocketNum;
   envir().taskScheduler().setBackgroundHandling(fClientInputSocket, 
SOCKET_READABLE|SOCKET_EXCEPTION,
                                                incomingRequestHandler, this);
   
+  // Change the TLS state:
+  fPOSTSocketTLS.assignStateFrom(*newTLSState);
+  fInputTLS = &fPOSTSocketTLS;
+  
   // Also write any extra data to our buffer, and handle it:
   if (extraDataSize > 0 && extraDataSize <= fRequestBufferBytesLeft/*sanity 
check; should always be true*/) {
     unsigned char* ptr = &fRequestBuffer[fRequestBytesAlreadySeen];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/TLSState.cpp 
new/live/liveMedia/TLSState.cpp
--- old/live/liveMedia/TLSState.cpp     2022-04-26 02:01:17.000000000 +0200
+++ new/live/liveMedia/TLSState.cpp     2022-06-16 13:14:03.000000000 +0200
@@ -64,6 +64,14 @@
 #endif
 }
 
+void TLSState::nullify() {
+#ifndef NO_OPENSSL
+  isNeeded = fHasBeenSetup = False;
+  fCtx = NULL;
+  fCon = NULL;
+#endif
+}
+
 #ifndef NO_OPENSSL
 void TLSState::initLibrary() {
   static Boolean SSLLibraryHasBeenInitialized = False;
@@ -174,6 +182,18 @@
 #endif
 }
 
+void ServerTLSState::assignStateFrom(ServerTLSState const& from) {
+#ifndef NO_OPENSSL
+  isNeeded = from.isNeeded;
+  fHasBeenSetup = from.fHasBeenSetup;
+  fCtx = from.fCtx;
+  fCon = from.fCon;
+
+  fCertificateFileName = from.fCertificateFileName;
+  fPrivateKeyFileName = from.fPrivateKeyFileName;
+#endif
+}
+
 int ServerTLSState::accept(int socketNum) {
 #ifndef NO_OPENSSL
   if (!fHasBeenSetup && !setup(socketNum)) return -1; // error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/include/GenericMediaServer.hh 
new/live/liveMedia/include/GenericMediaServer.hh
--- old/live/liveMedia/include/GenericMediaServer.hh    2022-04-26 
02:01:17.000000000 +0200
+++ new/live/liveMedia/include/GenericMediaServer.hh    2022-06-16 
13:14:03.000000000 +0200
@@ -128,6 +128,8 @@
 
     // Optional support for TLS:
     ServerTLSState fTLS;
+    ServerTLSState* fInputTLS; // by default, just points to "fTLS", but 
subclasses may change
+    ServerTLSState* fOutputTLS; // ditto
   };
 
   // The state of an individual client session (using one or more sequential 
TCP connections) handled by a server:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/include/RTSPClient.hh 
new/live/liveMedia/include/RTSPClient.hh
--- old/live/liveMedia/include/RTSPClient.hh    2022-04-26 02:01:17.000000000 
+0200
+++ new/live/liveMedia/include/RTSPClient.hh    2022-06-16 13:14:03.000000000 
+0200
@@ -195,8 +195,6 @@
 
   char const* url() const { return fBaseURL; }
 
-  void useTLS() { fTLS.isNeeded = True; }
-
   static unsigned responseBufferSize;
 
 public: // Some compilers complain if this is "private:"
@@ -364,6 +362,9 @@
 
   // Optional support for TLS:
   ClientTLSState fTLS;
+  ClientTLSState fPOSTSocketTLS; // used only for RTSP-over-HTTPS
+  ClientTLSState* fInputTLS;
+  ClientTLSState* fOutputTLS;
   friend class ClientTLSState;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/include/RTSPServer.hh 
new/live/liveMedia/include/RTSPServer.hh
--- old/live/liveMedia/include/RTSPServer.hh    2022-04-26 02:01:17.000000000 
+0200
+++ new/live/liveMedia/include/RTSPServer.hh    2022-06-16 13:14:03.000000000 
+0200
@@ -214,7 +214,8 @@
     static void handleAlternativeRequestByte(void*, u_int8_t requestByte);
     void handleAlternativeRequestByte1(u_int8_t requestByte);
     Boolean authenticationOK(char const* cmdName, char const* urlSuffix, char 
const* fullRequestStr);
-    void changeClientInputSocket(int newSocketNum, unsigned char const* 
extraData, unsigned extraDataSize);
+    void changeClientInputSocket(int newSocketNum, ServerTLSState const* 
newTLSState,
+                                unsigned char const* extraData, unsigned 
extraDataSize);
       // used to implement RTSP-over-HTTP tunneling
     static void continueHandlingREGISTER(ParamsForREGISTER* params);
     virtual void continueHandlingREGISTER1(ParamsForREGISTER* params);
@@ -228,6 +229,7 @@
     RTSPServer& fOurRTSPServer; // same as ::fOurServer
     int& fClientInputSocket; // aliased to ::fOurSocket
     int fClientOutputSocket;
+    ServerTLSState fPOSTSocketTLS; // used only for RTSP-over-HTTPS
     int fAddressFamily;
     Boolean fIsActive;
     unsigned char* fLastCRLF;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/include/ServerMediaSession.hh 
new/live/liveMedia/include/ServerMediaSession.hh
--- old/live/liveMedia/include/ServerMediaSession.hh    2022-04-26 
02:01:17.000000000 +0200
+++ new/live/liveMedia/include/ServerMediaSession.hh    2022-06-16 
13:14:03.000000000 +0200
@@ -69,9 +69,9 @@
 
   void deleteAllSubsessions();
     // Removes and deletes all subsessions added by "addSubsession()", 
returning us to an 'empty' state
-    // Note: If you have already added this "ServerMediaSession" to a 
"RTSPServer" then, before calling this function,
+    // Note: If you have already added this "ServerMediaSession" to a server 
then, before calling this function,
     //   you must first close any client connections that use it,
-    //   by calling 
"RTSPServer::closeAllClientSessionsForServerMediaSession()".
+    //   by calling 
"GenericMediaServer::closeAllClientSessionsForServerMediaSession()".
 
   Boolean streamingUsesSRTP; // by default, False
   Boolean streamingIsEncrypted; // by default, False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/include/TLSState.hh 
new/live/liveMedia/include/TLSState.hh
--- old/live/liveMedia/include/TLSState.hh      2022-04-26 02:01:17.000000000 
+0200
+++ new/live/liveMedia/include/TLSState.hh      2022-06-16 13:14:03.000000000 
+0200
@@ -41,6 +41,8 @@
   int write(const char* data, unsigned count);
   int read(u_int8_t* buffer, unsigned bufferSize);
 
+  void nullify(); // clear the state so that the destructor will have no effect
+
 protected: // we're an abstract base class
   TLSState();
   virtual ~TLSState();
@@ -78,6 +80,7 @@
   virtual ~ServerTLSState();
 
   void setCertificateAndPrivateKeyFileNames(char const* certFileName, char 
const* privKeyFileName);
+  void assignStateFrom(ServerTLSState const& from);
 
   int accept(int socketNum); // returns: <0 (error), 0 (pending), >0 (success)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/liveMedia/include/liveMedia_version.hh 
new/live/liveMedia/include/liveMedia_version.hh
--- old/live/liveMedia/include/liveMedia_version.hh     2022-04-26 
02:01:17.000000000 +0200
+++ new/live/liveMedia/include/liveMedia_version.hh     2022-06-16 
13:14:03.000000000 +0200
@@ -19,7 +19,7 @@
 #ifndef _LIVEMEDIA_VERSION_HH
 #define _LIVEMEDIA_VERSION_HH
 
-#define LIVEMEDIA_LIBRARY_VERSION_STRING       "2022.04.26"
-#define LIVEMEDIA_LIBRARY_VERSION_INT          1650931200
+#define LIVEMEDIA_LIBRARY_VERSION_STRING       "2022.06.16"
+#define LIVEMEDIA_LIBRARY_VERSION_INT          1655337600
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/live/testProgs/testOnDemandRTSPServer.cpp 
new/live/testProgs/testOnDemandRTSPServer.cpp
--- old/live/testProgs/testOnDemandRTSPServer.cpp       2022-04-26 
02:01:17.000000000 +0200
+++ new/live/testProgs/testOnDemandRTSPServer.cpp       2022-06-16 
13:14:03.000000000 +0200
@@ -67,11 +67,24 @@
 #endif
 
   // Create the RTSP server:
+#ifdef SERVER_USE_TLS
+  // Serve RTSPS: RTSP over a TLS connection:
+  RTSPServer* rtspServer = RTSPServer::createNew(*env, 322, authDB);
+#else
+  // Serve regular RTSP (over a TCP connection):
   RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, authDB);
+#endif
   if (rtspServer == NULL) {
     *env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
     exit(1);
   }
+#ifdef SERVER_USE_TLS
+#ifndef STREAM_USING_SRTP
+#define STREAM_USING_SRTP True
+#endif
+  rtspServer->setTLSState(PATHNAME_TO_CERTIFICATE_FILE, 
PATHNAME_TO_PRIVATE_KEY_FILE,
+                         STREAM_USING_SRTP);
+#endif
 
   char const* descriptionString
     = "Session streamed by \"testOnDemandRTSPServer\"";
@@ -433,10 +446,17 @@
   // Try first with the default HTTP port (80), and then with the alternative 
HTTP
   // port numbers (8000 and 8080).
 
+#ifdef SERVER_USE_TLS
+  // (Attempt to) use the default HTTPS port (443) instead:
+  char const* httpProtocolStr = "HTTPS";
+  if (rtspServer->setUpTunnelingOverHTTP(443)) {
+#else
+  char const* httpProtocolStr = "HTTP";
   if (rtspServer->setUpTunnelingOverHTTP(80) || 
rtspServer->setUpTunnelingOverHTTP(8000) || 
rtspServer->setUpTunnelingOverHTTP(8080)) {
-    *env << "\n(We use port " << rtspServer->httpServerPortNum() << " for 
optional RTSP-over-HTTP tunneling.)\n";
+#endif
+    *env << "\n(We use port " << rtspServer->httpServerPortNum() << " for 
optional RTSP-over-" << httpProtocolStr << " tunneling.)\n";
   } else {
-    *env << "\n(RTSP-over-HTTP tunneling is not available.)\n";
+    *env << "\n(RTSP-over-" << httpProtocolStr << " tunneling is not 
available.)\n";
   }
 
   env->taskScheduler().doEventLoop(); // does not return

Reply via email to