| 1 |
/* |
| 2 |
* Conditions Of Use |
| 3 |
* |
| 4 |
* This software was developed by employees of the National Institute of |
| 5 |
* Standards and Technology (NIST), an agency of the Federal Government |
| 6 |
* and others. |
| 7 |
* Pursuant to title 15 Untied States Code Section 105, works of NIST |
| 8 |
* employees are not subject to copyright protection in the United States |
| 9 |
* and are considered to be in the public domain. As a result, a formal |
| 10 |
* license is not needed to use the software. |
| 11 |
* |
| 12 |
* This software is provided by NIST as a service and is expressly |
| 13 |
* provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED |
| 14 |
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF |
| 15 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT |
| 16 |
* AND DATA ACCURACY. NIST does not warrant or make any representations |
| 17 |
* regarding the use of the software or the results thereof, including but |
| 18 |
* not limited to the correctness, accuracy, reliability or usefulness of |
| 19 |
* the software. |
| 20 |
* |
| 21 |
* Permission to use this software is contingent upon your acceptance |
| 22 |
* of the terms of this agreement. |
| 23 |
* |
| 24 |
*/ |
| 25 |
/************************************************************************************************ |
| 26 |
* PRODUCT OF PT INOVACAO - EST DEPARTMENT and Telecommunications Institute (Aveiro, Portugal) * |
| 27 |
************************************************************************************************/ |
| 28 |
|
| 29 |
|
| 30 |
package gov.nist.javax.sip.header.ims; |
| 31 |
|
| 32 |
import java.text.ParseException; |
| 33 |
|
| 34 |
import javax.sip.InvalidArgumentException; |
| 35 |
import javax.sip.header.Header; |
| 36 |
import javax.sip.header.Parameters; |
| 37 |
|
| 38 |
|
| 39 |
/** |
| 40 |
* "Security Mechanism Agreemet for SIP Sessions" |
| 41 |
* - sec-agree: RFC 3329 + 3GPP TS33.203 (Annex H). |
| 42 |
* |
| 43 |
* <p>Headers: Security-Server + Security-Client + Security-Verify</p> |
| 44 |
* |
| 45 |
* @author Miguel Freitas (IT) PT-Inovacao |
| 46 |
*/ |
| 47 |
|
| 48 |
|
| 49 |
public interface SecurityAgreeHeader extends Parameters, Header |
| 50 |
{ |
| 51 |
|
| 52 |
/** |
| 53 |
* Set security mechanism. |
| 54 |
* <p>eg: Security-Client: ipsec-3gpp</p> |
| 55 |
* @param secMech - security mechanism name |
| 56 |
*/ |
| 57 |
public void setSecurityMechanism(String secMech) throws ParseException; |
| 58 |
|
| 59 |
/** |
| 60 |
* Set Encryption Algorithm (ealg parameter) |
| 61 |
* @param ealg - encryption algorithm value |
| 62 |
* @throws ParseException |
| 63 |
*/ |
| 64 |
public void setEncryptionAlgorithm(String ealg) throws ParseException; |
| 65 |
|
| 66 |
/** |
| 67 |
* Set Algorithm (alg parameter) |
| 68 |
* @param alg - algorithm value |
| 69 |
* @throws ParseException |
| 70 |
*/ |
| 71 |
public void setAlgorithm(String alg) throws ParseException; |
| 72 |
|
| 73 |
/** |
| 74 |
* Set Protocol (prot paramater) |
| 75 |
* @param prot - protocol value |
| 76 |
* @throws ParseException |
| 77 |
*/ |
| 78 |
public void setProtocol(String prot) throws ParseException; |
| 79 |
|
| 80 |
/** |
| 81 |
* Set Mode (mod parameter) |
| 82 |
* @param mod - mode value |
| 83 |
* @throws ParseException |
| 84 |
*/ |
| 85 |
public void setMode(String mod) throws ParseException; |
| 86 |
|
| 87 |
/** |
| 88 |
* Set Client SPI (spi-c parameter) |
| 89 |
* @param spic - spi-c value |
| 90 |
* @throws InvalidArgumentException |
| 91 |
*/ |
| 92 |
public void setSPIClient(int spic) throws InvalidArgumentException; |
| 93 |
|
| 94 |
/** |
| 95 |
* Set Server SPI (spi-s parameter) |
| 96 |
* @param spis - spi-s value |
| 97 |
* @throws InvalidArgumentException - when value is not valid |
| 98 |
*/ |
| 99 |
public void setSPIServer(int spis) throws InvalidArgumentException; |
| 100 |
|
| 101 |
/** |
| 102 |
* Set Client Port (port-c parameter) |
| 103 |
* @param portC - port-c value |
| 104 |
* @throws InvalidArgumentException - when value is not valid |
| 105 |
*/ |
| 106 |
public void setPortClient(int portC) throws InvalidArgumentException; |
| 107 |
|
| 108 |
|
| 109 |
/** |
| 110 |
* Set Server Port (port-s parameter) |
| 111 |
* @param portS - port-s value |
| 112 |
* @throws InvalidArgumentException - when value is not valid |
| 113 |
*/ |
| 114 |
public void setPortServer(int portS) throws InvalidArgumentException; |
| 115 |
|
| 116 |
/** |
| 117 |
* Set Preference |
| 118 |
* @param q - q parameter value |
| 119 |
* @throws InvalidArgumentException - when value is not valid |
| 120 |
*/ |
| 121 |
public void setPreference(float q) throws InvalidArgumentException; |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
/** |
| 126 |
* Get Security Mechanism |
| 127 |
* @return security mechanims value |
| 128 |
*/ |
| 129 |
public String getSecurityMechanism(); |
| 130 |
|
| 131 |
/** |
| 132 |
* Get Encryption Algorithm |
| 133 |
* @return ealg parameter value |
| 134 |
*/ |
| 135 |
public String getEncryptionAlgorithm(); |
| 136 |
|
| 137 |
/** |
| 138 |
* Get Algorithm |
| 139 |
* @return alg parameter value |
| 140 |
*/ |
| 141 |
public String getAlgorithm(); |
| 142 |
|
| 143 |
/** |
| 144 |
* Get Protocol |
| 145 |
* @return prot parameter value |
| 146 |
*/ |
| 147 |
public String getProtocol(); |
| 148 |
|
| 149 |
/** |
| 150 |
* Get Mode |
| 151 |
* @return mod parameter value |
| 152 |
*/ |
| 153 |
public String getMode(); |
| 154 |
|
| 155 |
/** |
| 156 |
* Get Client SPI |
| 157 |
* @return spi-c parameter value |
| 158 |
*/ |
| 159 |
public int getSPIClient(); |
| 160 |
|
| 161 |
/** |
| 162 |
* Get Server SPI |
| 163 |
* @return spi-s parameter value |
| 164 |
*/ |
| 165 |
public int getSPIServer(); |
| 166 |
|
| 167 |
/** |
| 168 |
* Get Client Port |
| 169 |
* @return port-c parameter value |
| 170 |
*/ |
| 171 |
public int getPortClient(); |
| 172 |
|
| 173 |
/** |
| 174 |
* Get Server Port |
| 175 |
* @return port-s parameter value |
| 176 |
*/ |
| 177 |
public int getPortServer(); |
| 178 |
|
| 179 |
/** |
| 180 |
* Get Preference |
| 181 |
* @return q parameter value |
| 182 |
*/ |
| 183 |
public float getPreference(); |
| 184 |
|
| 185 |
} |