- Timestamp:
- Jan 18, 2017 10:55:35 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk merged: 5516-5525,5527,5530-5531
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjsip/include/pjsua2/endpoint.hpp
r5513 r5532 125 125 126 126 /** 127 * SSL certificate type and name structure. 128 */ 129 struct SslCertName 130 { 131 pj_ssl_cert_name_type type; /**< Name type */ 132 string name; /**< The name */ 133 }; 134 135 /** 136 * SSL certificate information. 137 */ 138 struct SslCertInfo 139 { 140 unsigned version; /**< Certificate version */ 141 unsigned char serialNo[20]; /**< Serial number, array 142 of octets, first index 143 is MSB */ 144 string subjectCn; /**< Subject common name */ 145 string subjectInfo; /**< One line subject, fields 146 are separated by slash, e.g: 147 "CN=sample.org/OU=HRD" */ 148 149 string issuerCn; /**< Issuer common name */ 150 string issuerInfo; /**< One line subject, fields 151 are separated by slash */ 152 153 TimeVal validityStart; /**< Validity start */ 154 TimeVal validityEnd; /**< Validity end */ 155 bool validityGmt; /**< Flag if validity 156 date/time use GMT */ 157 158 vector<SslCertName> subjectAltName; /**< Subject alternative 159 name extension */ 160 161 string raw; /**< Raw certificate in PEM 162 format, only available 163 for remote certificate */ 164 165 public: 166 /** 167 * Constructor. 168 */ 169 SslCertInfo(); 170 171 /** 172 * Check if the info is set with empty values. 173 * 174 * @return True if the info is empty. 175 */ 176 bool isEmpty() const; 177 178 /** 179 * Convert from pjsip 180 */ 181 void fromPj(const pj_ssl_cert_info &info); 182 183 private: 184 bool empty; 185 }; 186 187 /** 188 * TLS transport information. 189 */ 190 struct TlsInfo 191 { 192 /** 193 * Describes whether secure socket connection is established, i.e: TLS/SSL 194 * handshaking has been done successfully. 195 */ 196 bool established; 197 198 /** 199 * Describes secure socket protocol being used, see #pj_ssl_sock_proto. 200 * Use bitwise OR operation to combine the protocol type. 201 */ 202 unsigned protocol; 203 204 /** 205 * Describes cipher suite being used, this will only be set when connection 206 * is established. 207 */ 208 pj_ssl_cipher cipher; 209 210 /** 211 * Describes cipher name being used, this will only be set when connection 212 * is established. 213 */ 214 string cipherName; 215 216 /** 217 * Describes local address. 218 */ 219 SocketAddress localAddr; 220 221 /** 222 * Describes remote address. 223 */ 224 SocketAddress remoteAddr; 225 226 /** 227 * Describes active local certificate info. Use SslCertInfo.isEmpty() 228 * to check if the local cert info is available. 229 */ 230 SslCertInfo localCertInfo; 231 232 /** 233 * Describes active remote certificate info. Use SslCertInfo.isEmpty() 234 * to check if the remote cert info is available. 235 */ 236 SslCertInfo remoteCertInfo; 237 238 /** 239 * Status of peer certificate verification. 240 */ 241 unsigned verifyStatus; 242 243 /** 244 * Error messages (if any) of peer certificate verification, based on 245 * the field verifyStatus above. 246 */ 247 StringVector verifyMsgs; 248 249 public: 250 /** 251 * Constructor. 252 */ 253 TlsInfo(); 254 255 /** 256 * Check if the info is set with empty values. 257 * 258 * @return True if the info is empty. 259 */ 260 bool isEmpty() const; 261 262 /** 263 * Convert from pjsip 264 */ 265 void fromPj(const pjsip_tls_state_info &info); 266 267 private: 268 bool empty; 269 }; 270 271 /** 127 272 * Parameter of Endpoint::onTransportState() callback. 128 273 */ … … 133 278 */ 134 279 TransportHandle hnd; 280 281 /** 282 * The transport type. 283 */ 284 string type; 135 285 136 286 /** … … 143 293 */ 144 294 pj_status_t lastError; 295 296 /** 297 * TLS transport info, only used if transport type is TLS. Use 298 * TlsInfo.isEmpty() to check if this info is available. 299 */ 300 TlsInfo tlsInfo; 145 301 }; 146 302 … … 1030 1186 */ 1031 1187 void transportClose(TransportId id) throw(Error); 1188 1189 /** 1190 * Start graceful shutdown procedure for this transport handle. After 1191 * graceful shutdown has been initiated, no new reference can be 1192 * obtained for the transport. However, existing objects that currently 1193 * uses the transport may still use this transport to send and receive 1194 * packets. After all objects release their reference to this transport, 1195 * the transport will be destroyed immediately. 1196 * 1197 * Note: application normally uses this API after obtaining the handle 1198 * from onTransportState() callback. 1199 * 1200 * @param tp The transport. 1201 */ 1202 void transportShutdown(TransportHandle tp) throw(Error); 1032 1203 1033 1204 /*************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.