Commit 99d481bb authored by rennoch's avatar rennoch
Browse files

change of Authorization headers to allow multiple credentials

parent 17136315
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ group SubTypes{// Subtypes
/**
 * 
 * @desc Uniform Resource Identifier (URI)
 * @member scheme distinguishes call types, e.g. voice, fax etc.
 * @member scheme distinguishes call types, e.g. voice, fax etc. or related address scheme, e.g. tel, sip
 * @member userInfo Contains user information (also in non-SIP URLs) with optional parameter as passwords
 * @member hostPort Hostname or IP address information and port identifier of the target
 * @member urlParameters Contains either SIP or TEL URL parameters, separated by semicolons, e.g. transport=tcp or user=phone
@@ -522,7 +522,7 @@ group SubTypes{// Subtypes
 */
      type record SipUrl
      {
        charstring		scheme,  // contains "sip:"
        charstring		scheme,  // e.g "sip" or "tel"
        UserInfo		userInfo optional,
        HostPort		hostPort optional,
        SemicolonParam_List	urlParameters optional,
@@ -616,6 +616,9 @@ group SubTypes{// Subtypes
        OtherAuth  	    otherResponse
      }
      
      // allow multiple Authorization headers due to RFC3261 ch. 20.7 and 20.28
	  type record of Credentials CredentialsList;
      
      // [20.19, 20.23, 20.33]
      type charstring	DeltaSec;	// an external operation can handle this field
      
@@ -797,7 +800,7 @@ group SubTypes{// Subtypes
      type record Authorization
      {
        FieldName		fieldName (AUTHORIZATION_E),
        Credentials		body
		CredentialsList	body // changed from Credentials to allow multiple Authorization headers
      }
      
      // [20.8]
@@ -948,7 +951,7 @@ group SubTypes{// Subtypes
      type record ProxyAuthorization
      {
        FieldName		fieldName (PROXY_AUTHORIZATION_E),
        Credentials		credentials
        CredentialsList		credentials // changed from Credentials to allow multiple Authorization headers
      }
      
      // [20.29]
+5 −5
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 *            change requests shall be made to http://t-ort.etsi.org
 */

module LibSip_Templates language "TTCN-3:2005"//MRO
module LibSip_Templates
{
	//LibSip
	import from LibSip_SIPTypesAndValues all;
@@ -350,25 +350,25 @@ module LibSip_Templates language "TTCN-3:2005"//MRO
		template Authorization m_Authorization (template Credentials p_Credentials):=
		{
		  fieldName := AUTHORIZATION_E,
		  body := p_Credentials
		  body := {p_Credentials}
		}
		
		template Authorization m_Authorization_digest (template CommaParam_List p_CommaParam_List):=
		{
		  fieldName := AUTHORIZATION_E,
		  body := {digestResponse := p_CommaParam_List}
		  body := {{digestResponse := p_CommaParam_List}}
		}

		template Authorization m_add_Authorization_digest (in Authorization p_auth, template CommaParam_List p_CommaParam_List):=
		{
		  fieldName := AUTHORIZATION_E,
		  body := {digestResponse := f_merge_CommaParam_List(p_auth.body.digestResponse,valueof(p_CommaParam_List))}
		  body := {{digestResponse := f_merge_CommaParam_List(p_auth.body[0].digestResponse,valueof(p_CommaParam_List))}}
		}

		template Authorization m_Authorization_other :=
		{
		  fieldName := AUTHORIZATION_E,
		  body := {otherResponse := ?}
		  body := {{otherResponse := ?}}
		}

		template Contact m_Contact(template SipUrl p_sipUrl) :=