[Serusers] Fwd: Kphone, TLS and SER ... bug, and patch

Cesc Santasusana cesc.santasusana at nl.thalesgroup.com
Fri Mar 18 17:12:47 CET 2005


Sorry guys ... my fault ... the previous text was a screw up  ... 
I send it now with proper windows formatting ...

Cesc

>>> Cesc Santasusana 03/18/05 02:36PM >>>
Hi,

With the advent of TLS support for SER, i was testing it with KPhone
(TLS being used between SER proxies only, Kphone-to-SER via UDP).
Turned out that kphone would not respond to any message (it would
receive them, but plain ignore them). 

The problem: TLS as transport mode in the VIA headers was not
supported, 
thus, the SIP messages were considered not valid.

I am attaching a patch to correct this for kphone 4.1.0, but i guess it
can be applied
with little modifications to earlier versions (4.0.3 to 4.0.5) but i am
not sure.

Regards,

Cesc


PATCH STARTS HERE:
Index: dissipate2/sipclient.cpp
===================================================================
--- dissipate2/sipclient.cpp	(revision 1)
+++ dissipate2/sipclient.cpp	(working copy)
@@ -1034,6 +1034,9 @@
 			printf( "SipClient: Sending TCP Response\n" );
 			outsocket = new TCPMessageSocket;
 			break;
+		case SipVia::TLS:
+			printf( "SipClient: TLS in top via, not
supported (full TLS support not implemented)\n" );
+			break;
 		case SipVia::BadTransport:
 			printf( "SipClient: Bad transport on incoming
Via\n" );
 			break;
@@ -1232,6 +1235,9 @@
 			printf( "SipClient: Sending TCP Response\n" );
 			outsocket = new TCPMessageSocket;
 			break;
+		case SipVia::TLS:
+			printf( "SipClient: TLS in top via, not
supported (full TLS support not implemented)\n" );
+			break;
 		case SipVia::BadTransport:
 			printf( "SipClient: Bad transport on incoming
Via\n" );
 			break;
Index: dissipate2/sipvia.h
===================================================================
--- dissipate2/sipvia.h	(revision 1)
+++ dissipate2/sipvia.h	(working copy)
@@ -49,6 +49,7 @@
 	enum Transport {
 		UDP,
 		TCP,
+		TLS,
 		BadTransport };
 
 	/**
Index: dissipate2/sipvia.cpp
===================================================================
--- dissipate2/sipvia.cpp	(revision 1)
+++ dissipate2/sipvia.cpp	(working copy)
@@ -37,6 +37,7 @@
 	switch ( t ) {
 		case UDP: return "UDP";
 		case TCP: return "TCP";
+		case TLS: return "TLS";
 		case BadTransport: return "BAD";
 	}
 	return QString::null;
@@ -46,6 +47,7 @@
 {
 	if ( t.compare( getTransportString( UDP ) ) == 0 ) { return UDP;
}
 	if ( t.compare( getTransportString( TCP ) ) == 0 ) { return TCP;
};
+	if ( t.compare( getTransportString( TLS ) ) == 0 ) { return TLS;
};
 
 	return BadTransport;
 }

PATCH ENDS HERE









Unclassified




More information about the sr-users mailing list