- Timestamp:
- Dec 28, 2016 3:40:07 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 (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjlib/include/pj/ssl_sock.h
r5087 r5513 181 181 } subj_alt_name; /**< Subject alternative 182 182 name extension */ 183 184 pj_str_t raw; /**< Raw certificate in PEM format, only 185 available for remote certificate. */ 183 186 184 187 } pj_ssl_cert_info; … … 399 402 PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name); 400 403 404 /** 405 * Elliptic curves enumeration. 406 */ 407 typedef enum pj_ssl_curve 408 { 409 PJ_TLS_UNKNOWN_CURVE = 0, 410 PJ_TLS_CURVE_SECT163K1 = 1, 411 PJ_TLS_CURVE_SECT163R1 = 2, 412 PJ_TLS_CURVE_SECT163R2 = 3, 413 PJ_TLS_CURVE_SECT193R1 = 4, 414 PJ_TLS_CURVE_SECT193R2 = 5, 415 PJ_TLS_CURVE_SECT233K1 = 6, 416 PJ_TLS_CURVE_SECT233R1 = 7, 417 PJ_TLS_CURVE_SECT239K1 = 8, 418 PJ_TLS_CURVE_SECT283K1 = 9, 419 PJ_TLS_CURVE_SECT283R1 = 10, 420 PJ_TLS_CURVE_SECT409K1 = 11, 421 PJ_TLS_CURVE_SECT409R1 = 12, 422 PJ_TLS_CURVE_SECT571K1 = 13, 423 PJ_TLS_CURVE_SECT571R1 = 14, 424 PJ_TLS_CURVE_SECP160K1 = 15, 425 PJ_TLS_CURVE_SECP160R1 = 16, 426 PJ_TLS_CURVE_SECP160R2 = 17, 427 PJ_TLS_CURVE_SECP192K1 = 18, 428 PJ_TLS_CURVE_SECP192R1 = 19, 429 PJ_TLS_CURVE_SECP224K1 = 20, 430 PJ_TLS_CURVE_SECP224R1 = 21, 431 PJ_TLS_CURVE_SECP256K1 = 22, 432 PJ_TLS_CURVE_SECP256R1 = 23, 433 PJ_TLS_CURVE_SECP384R1 = 24, 434 PJ_TLS_CURVE_SECP521R1 = 25, 435 PJ_TLS_CURVE_BRAINPOOLP256R1 = 26, 436 PJ_TLS_CURVE_BRAINPOOLP384R1 = 27, 437 PJ_TLS_CURVE_BRAINPOOLP512R1 = 28, 438 PJ_TLS_CURVE_ARBITRARY_EXPLICIT_PRIME_CURVES = 0XFF01, 439 PJ_TLS_CURVE_ARBITRARY_EXPLICIT_CHAR2_CURVES = 0XFF02 440 } pj_ssl_curve; 441 442 /** 443 * Get curve list supported by SSL/TLS backend. 444 * 445 * @param curves The curves buffer to receive curve list. 446 * @param curves_num Maximum number of curves to be received. 447 * 448 * @return PJ_SUCCESS when successful. 449 */ 450 PJ_DECL(pj_status_t) pj_ssl_curve_get_availables(pj_ssl_curve curves[], 451 unsigned *curve_num); 452 453 /** 454 * Check if the specified curve is supported by SSL/TLS backend. 455 * 456 * @param curve The curve. 457 * 458 * @return PJ_TRUE when supported. 459 */ 460 PJ_DECL(pj_bool_t) pj_ssl_curve_is_supported(pj_ssl_curve curve); 461 462 463 /** 464 * Get curve name string. 465 * 466 * @param curve The curve. 467 * 468 * @return The curve name or NULL if curve is not recognized/ 469 * supported. 470 */ 471 PJ_DECL(const char*) pj_ssl_curve_name(pj_ssl_curve curve); 472 473 /** 474 * Get curve ID from curve name string. Note that on different backends 475 * (e.g. OpenSSL or Symbian implementation), curve names may not be 476 * equivalent for the same curve ID. 477 * 478 * @param curve_name The curve name string. 479 * 480 * @return The curve ID or PJ_TLS_UNKNOWN_CURVE if the curve 481 * name string is not recognized/supported. 482 */ 483 PJ_DECL(pj_ssl_curve) pj_ssl_curve_id(const char *curve_name); 484 485 /* 486 * Entropy enumeration 487 */ 488 typedef enum pj_ssl_entropy 489 { 490 PJ_SSL_ENTROPY_NONE = 0, 491 PJ_SSL_ENTROPY_EGD = 1, 492 PJ_SSL_ENTROPY_RANDOM = 2, 493 PJ_SSL_ENTROPY_URANDOM = 3, 494 PJ_SSL_ENTROPY_FILE = 4, 495 PJ_SSL_ENTROPY_UNKNOWN = 0x0F 496 } pj_ssl_entropy_t; 401 497 402 498 /** … … 768 864 769 865 /** 866 * Number of curves contained in the specified curve preference. 867 * If this is set to zero, then default curve list of the backend 868 * will be used. 869 * 870 * Default: 0 (zero). 871 */ 872 unsigned curves_num; 873 874 /** 875 * Curves and order preference. The #pj_ssl_curve_get_availables() 876 * can be used to check the available curves supported by backend. 877 */ 878 pj_ssl_curve *curves; 879 880 /** 881 * The supported signature algorithms. Set the sigalgs string 882 * using this form: 883 * "<DIGEST>+<ALGORITHM>:<DIGEST>+<ALGORITHM>" 884 * Digests are: "RSA", "DSA" or "ECDSA" 885 * Algorithms are: "MD5", "SHA1", "SHA224", "SHA256", "SHA384", "SHA512" 886 * Example: "ECDSA+SHA256:RSA+SHA256" 887 */ 888 pj_str_t sigalgs; 889 890 /** 891 * Reseed random number generator. 892 * For type #PJ_SSL_ENTROPY_FILE, parameter \a entropy_path 893 * must be set to a file. 894 * For type #PJ_SSL_ENTROPY_EGD, parameter \a entropy_path 895 * must be set to a socket. 896 * 897 * Default value is PJ_SSL_ENTROPY_NONE. 898 */ 899 pj_ssl_entropy_t entropy_type; 900 901 /** 902 * When using a file/socket for entropy #PJ_SSL_ENTROPY_EGD or 903 * #PJ_SSL_ENTROPY_FILE, \a entropy_path must contain the path 904 * to entropy socket/file. 905 * 906 * Default value is an empty string. 907 */ 908 pj_str_t entropy_path; 909 910 /** 770 911 * Security negotiation timeout. If this is set to zero (both sec and 771 912 * msec), the negotiation doesn't have a timeout. … … 862 1003 */ 863 1004 PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param); 1005 1006 1007 /** 1008 * Duplicate pj_ssl_sock_param. 1009 * 1010 * @param pool Pool to allocate memory. 1011 * @param dst Destination parameter. 1012 * @param src Source parameter. 1013 */ 1014 PJ_DECL(void) pj_ssl_sock_param_copy(pj_pool_t *pool, 1015 pj_ssl_sock_param *dst, 1016 const pj_ssl_sock_param *src); 864 1017 865 1018 … … 1116 1269 1117 1270 /** 1271 * Same as #pj_ssl_sock_start_accept(), but application can provide 1272 * a secure socket parameter, which will be used to create a new secure 1273 * socket reported in \a on_accept_complete() callback when there is 1274 * an incoming connection. 1275 * 1276 * @param ssock The secure socket. 1277 * @param pool Pool used to allocate some internal data for the 1278 * operation. 1279 * @param localaddr Local address to bind on. 1280 * @param addr_len Length of buffer containing local address. 1281 * @param newsock_param Secure socket parameter for new accepted sockets. 1282 * 1283 * @return PJ_SUCCESS if the operation has been successful, 1284 * or the appropriate error code on failure. 1285 */ 1286 PJ_DECL(pj_status_t) 1287 pj_ssl_sock_start_accept2(pj_ssl_sock_t *ssock, 1288 pj_pool_t *pool, 1289 const pj_sockaddr_t *local_addr, 1290 int addr_len, 1291 const pj_ssl_sock_param *newsock_param); 1292 1293 1294 /** 1118 1295 * Starts asynchronous socket connect() operation and SSL/TLS handshaking 1119 1296 * for this socket. Once the connection is done (either successfully or not),
Note: See TracChangeset
for help on using the changeset viewer.