List Info

Thread: MORE ABOUT THE TLS BUG's SOLUTION




MORE ABOUT THE TLS BUG's SOLUTION
user name
2007-02-14 03:06:43

Hi!

 

I’ve found there is more wrong code about the TLS SIP.

 

package net.java.sip.communicator.impl.protocol.sip;

public class ProtocolProviderServiceSipImpl

 

private void initOutboundProxy(AccountID accountID, Hashtable jainSipProperties)

 

Line 1692:

 

Changing:

 

//proxy transport
        String proxyTransport = (String) accountID.getAccountProperties()
           ; .get(ProtocolProviderFactory.PROXY_TRANSPORT);
 
        if (proxyTransport != null && proxyTransport.length() > 0)
        {
           ; if (!proxyTransport.equals(ListeningPoint.UDP)
           ;     || !proxyTransport.equals(ListeningPoint.TCP)
           ;     || !proxyTransport.equals(ListeningPoint.TLS))
           ; {
           ;     throw new IllegalArgumentException(proxyTransport
           ;         + " is not a valid transport protocol. Transport must be "
           ;         + "left blanc or set to TCP, UDP or TLS.");
           ; }
        }
        else
        {
           ; proxyTransport = ListeningPoint.UDP;
        }

 

For:

 

//proxy transport

        String proxyTransport = (String) accountID.getAccountProperties()

           ; .get(ProtocolProviderFactory.PREFERRED_TRANSPORT);

       

        if (proxyTransport != null && proxyTransport.length() > 0)

        {

           ; if (!proxyTransport.equals(ListeningPoint.UDP)

           ;     && !proxyTransport.equals(ListeningPoint.TCP)

           ;     && !proxyTransport.equals(ListeningPoint.TLS))

           ; {

           ;     throw new IllegalArgumentException(proxyTransport

           ;         + " is not a valid transport protocol. Transport must be "

           ;         + "left blanc or set to TCP, UDP or TLS.");

           ; }

        }

        else

        {

           ; proxyTransport = ListeningPoint.UDP;

        }

 

This bug is driving me crazy. Is there another similar transport tests like that in the code??

 

Regards, Pablo L.

 

Re: MORE ABOUT THE TLS BUG's SOLUTION
user name
2007-02-14 13:37:21
Good catch once again Pablo!

I've just committed.

Thanks
Emil

Pablo wrote:
> Hi!
> 
>  
> 
> I’ve found there is more wrong code about the TLS SIP.
> 
>  
> 
> package net.java.sip.communicator.impl.protocol.sip;
> 
> public class ProtocolProviderServiceSipImpl
> 
>  
> 
> private void initOutboundProxy(AccountID accountID,
Hashtable 
> jainSipProperties)
> 
>  
> 
> Line 1692:
> 
>  
> 
> Changing:
> 
>  
> 
> //proxy transport
> 
>         String proxyTransport = (String)
accountID.getAccountProperties()
> 
>            
.get(ProtocolProviderFactory.PROXY_TRANSPORT);
> 
>  
> 
>         if (proxyTransport != null &&
proxyTransport.length() > 0)
> 
>         {
> 
>             if
(!proxyTransport.equals(ListeningPoint.UDP)
> 
>                 ||
!proxyTransport.equals(ListeningPoint.TCP)
> 
>                 ||
!proxyTransport.equals(ListeningPoint.TLS))
> 
>             {
> 
>                 throw new
IllegalArgumentException(proxyTransport
> 
>                     + " is not a valid transport
protocol. Transport must be "
> 
>                     + "left blanc or set to TCP,
UDP or TLS.");
> 
>             }
> 
>         }
> 
>         else
> 
>         {
> 
>             proxyTransport = ListeningPoint.UDP;
> 
>         }
> 
>  
> 
> For:
> 
>  
> 
> //proxy transport
> 
>         String proxyTransport = (String)
accountID.getAccountProperties()
> 
>            
.get(ProtocolProviderFactory.PREFERRED_TRANSPORT);
> 
>        
> 
>         if (proxyTransport != null &&
proxyTransport.length() > 0)
> 
>         {
> 
>             if
(!proxyTransport.equals(ListeningPoint.UDP)
> 
>                 &&
!proxyTransport.equals(ListeningPoint.TCP)
> 
>                 &&
!proxyTransport.equals(ListeningPoint.TLS))
> 
>             {
> 
>                 throw new
IllegalArgumentException(proxyTransport
> 
>                     + " is not a valid transport
protocol. Transport 
> must be "
> 
>                     + "left blanc or set to TCP,
UDP or TLS.");
> 
>             }
> 
>         }
> 
>         else
> 
>         {
> 
>             proxyTransport = ListeningPoint.UDP;
> 
>         }
> 
>  
> 
> This bug is driving me crazy. Is there another similar
transport tests 
> like that in the code??
> 
>  
> 
> Regards, Pablo L.
> 
>  
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: MORE ABOUT THE TLS BUG's SOLUTION
user name
2007-02-15 00:36:16
Romain just made me notice that my previous commit was
incomplete. I've 
now committed the rest of it.

Emil

Emil Ivov wrote:
> Good catch once again Pablo!
> 
> I've just committed.
> 
> Thanks
> Emil
> 
> Pablo wrote:
>> Hi!
>>
>>  
>>
>> I’ve found there is more wrong code about the TLS
SIP.
>>
>>  
>>
>> package
net.java.sip.communicator.impl.protocol.sip;
>>
>> public class ProtocolProviderServiceSipImpl
>>
>>  
>>
>> private void initOutboundProxy(AccountID accountID,
Hashtable 
>> jainSipProperties)
>>
>>  
>>
>> Line 1692:
>>
>>  
>>
>> Changing:
>>
>>  
>>
>> //proxy transport
>>
>>         String proxyTransport = (String)
accountID.getAccountProperties()
>>
>>            
.get(ProtocolProviderFactory.PROXY_TRANSPORT);
>>
>>  
>>
>>         if (proxyTransport != null &&
proxyTransport.length() > 0)
>>
>>         {
>>
>>             if
(!proxyTransport.equals(ListeningPoint.UDP)
>>
>>                 ||
!proxyTransport.equals(ListeningPoint.TCP)
>>
>>                 ||
!proxyTransport.equals(ListeningPoint.TLS))
>>
>>             {
>>
>>                 throw new
IllegalArgumentException(proxyTransport
>>
>>                     + " is not a valid
transport protocol. Transport must be "
>>
>>                     + "left blanc or set to
TCP, UDP or TLS.");
>>
>>             }
>>
>>         }
>>
>>         else
>>
>>         {
>>
>>             proxyTransport = ListeningPoint.UDP;
>>
>>         }
>>
>>  
>>
>> For:
>>
>>  
>>
>> //proxy transport
>>
>>         String proxyTransport = (String)
accountID.getAccountProperties()
>>
>>            
.get(ProtocolProviderFactory.PREFERRED_TRANSPORT);
>>
>>        
>>
>>         if (proxyTransport != null &&
proxyTransport.length() > 0)
>>
>>         {
>>
>>             if
(!proxyTransport.equals(ListeningPoint.UDP)
>>
>>                 &&
!proxyTransport.equals(ListeningPoint.TCP)
>>
>>                 &&
!proxyTransport.equals(ListeningPoint.TLS))
>>
>>             {
>>
>>                 throw new
IllegalArgumentException(proxyTransport
>>
>>                     + " is not a valid
transport protocol. Transport 
>> must be "
>>
>>                     + "left blanc or set to
TCP, UDP or TLS.");
>>
>>             }
>>
>>         }
>>
>>         else
>>
>>         {
>>
>>             proxyTransport = ListeningPoint.UDP;
>>
>>         }
>>
>>  
>>
>> This bug is driving me crazy. Is there another
similar transport tests 
>> like that in the code??
>>
>>  
>>
>> Regards, Pablo L.
>>
>>  
>>
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )