BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

ssl_sock.h
Go to the documentation of this file.
1 /* $Id: ssl_sock.h 5472 2016-10-27 07:58:01Z ming $ */
2 /*
3  * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 #ifndef __PJ_SSL_SOCK_H__
20 #define __PJ_SSL_SOCK_H__
21 
27 #include <pj/ioqueue.h>
28 #include <pj/sock.h>
29 #include <pj/sock_qos.h>
30 
31 
33 
54 
55 
61 
62 
64 {
69 
74 
79 
84 
90 
95 
102 
107 
112 
117 
125 
130 
132 
133 
134 typedef enum pj_ssl_cert_name_type
135 {
136  PJ_SSL_CERT_NAME_UNKNOWN = 0,
137  PJ_SSL_CERT_NAME_RFC822,
138  PJ_SSL_CERT_NAME_DNS,
139  PJ_SSL_CERT_NAME_URI,
140  PJ_SSL_CERT_NAME_IP
141 } pj_ssl_cert_name_type;
142 
146 typedef struct pj_ssl_cert_info {
147 
148  unsigned version;
154  struct {
159  } subject;
161  struct {
162  pj_str_t cn;
163  pj_str_t info;
165  } issuer;
167  struct {
172  } validity;
174  struct {
175  unsigned cnt;
176  struct {
177  pj_ssl_cert_name_type type;
180  } *entry;
181  } subj_alt_name;
188 
189 
205  const pj_str_t *CA_file,
206  const pj_str_t *cert_file,
207  const pj_str_t *privkey_file,
208  const pj_str_t *privkey_pass,
209  pj_ssl_cert_t **p_cert);
210 
231  pj_pool_t *pool,
232  const pj_str_t *CA_file,
233  const pj_str_t *CA_path,
234  const pj_str_t *cert_file,
235  const pj_str_t *privkey_file,
236  const pj_str_t *privkey_pass,
237  pj_ssl_cert_t **p_cert);
238 
239 
252  const char *indent,
253  char *buf,
254  pj_size_t buf_size);
255 
256 
270  pj_uint32_t verify_status,
271  const char *error_strings[],
272  unsigned *count);
273 
274 
278 typedef enum pj_ssl_cipher {
279 
280  /* Unsupported cipher */
281  PJ_TLS_UNKNOWN_CIPHER = -1,
282 
283  /* NULL */
284  PJ_TLS_NULL_WITH_NULL_NULL = 0x00000000,
285 
286  /* TLS/SSLv3 */
287  PJ_TLS_RSA_WITH_NULL_MD5 = 0x00000001,
288  PJ_TLS_RSA_WITH_NULL_SHA = 0x00000002,
289  PJ_TLS_RSA_WITH_NULL_SHA256 = 0x0000003B,
290  PJ_TLS_RSA_WITH_RC4_128_MD5 = 0x00000004,
291  PJ_TLS_RSA_WITH_RC4_128_SHA = 0x00000005,
292  PJ_TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x0000000A,
293  PJ_TLS_RSA_WITH_AES_128_CBC_SHA = 0x0000002F,
294  PJ_TLS_RSA_WITH_AES_256_CBC_SHA = 0x00000035,
295  PJ_TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x0000003C,
296  PJ_TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x0000003D,
297  PJ_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 0x0000000D,
298  PJ_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 0x00000010,
299  PJ_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x00000013,
300  PJ_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x00000016,
301  PJ_TLS_DH_DSS_WITH_AES_128_CBC_SHA = 0x00000030,
302  PJ_TLS_DH_RSA_WITH_AES_128_CBC_SHA = 0x00000031,
303  PJ_TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x00000032,
304  PJ_TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x00000033,
305  PJ_TLS_DH_DSS_WITH_AES_256_CBC_SHA = 0x00000036,
306  PJ_TLS_DH_RSA_WITH_AES_256_CBC_SHA = 0x00000037,
307  PJ_TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 0x00000038,
308  PJ_TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x00000039,
309  PJ_TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 0x0000003E,
310  PJ_TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 0x0000003F,
311  PJ_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 0x00000040,
312  PJ_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x00000067,
313  PJ_TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 0x00000068,
314  PJ_TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 0x00000069,
315  PJ_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 0x0000006A,
316  PJ_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x0000006B,
317  PJ_TLS_DH_anon_WITH_RC4_128_MD5 = 0x00000018,
318  PJ_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 0x0000001B,
319  PJ_TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x00000034,
320  PJ_TLS_DH_anon_WITH_AES_256_CBC_SHA = 0x0000003A,
321  PJ_TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 0x0000006C,
322  PJ_TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 0x0000006D,
323 
324  /* TLS (deprecated) */
325  PJ_TLS_RSA_EXPORT_WITH_RC4_40_MD5 = 0x00000003,
326  PJ_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 0x00000006,
327  PJ_TLS_RSA_WITH_IDEA_CBC_SHA = 0x00000007,
328  PJ_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x00000008,
329  PJ_TLS_RSA_WITH_DES_CBC_SHA = 0x00000009,
330  PJ_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x0000000B,
331  PJ_TLS_DH_DSS_WITH_DES_CBC_SHA = 0x0000000C,
332  PJ_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x0000000E,
333  PJ_TLS_DH_RSA_WITH_DES_CBC_SHA = 0x0000000F,
334  PJ_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x00000011,
335  PJ_TLS_DHE_DSS_WITH_DES_CBC_SHA = 0x00000012,
336  PJ_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x00000014,
337  PJ_TLS_DHE_RSA_WITH_DES_CBC_SHA = 0x00000015,
338  PJ_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 = 0x00000017,
339  PJ_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 0x00000019,
340  PJ_TLS_DH_anon_WITH_DES_CBC_SHA = 0x0000001A,
341 
342  /* SSLv3 */
343  PJ_SSL_FORTEZZA_KEA_WITH_NULL_SHA = 0x0000001C,
344  PJ_SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA = 0x0000001D,
345  PJ_SSL_FORTEZZA_KEA_WITH_RC4_128_SHA = 0x0000001E,
346 
347  /* SSLv2 */
348  PJ_SSL_CK_RC4_128_WITH_MD5 = 0x00010080,
349  PJ_SSL_CK_RC4_128_EXPORT40_WITH_MD5 = 0x00020080,
350  PJ_SSL_CK_RC2_128_CBC_WITH_MD5 = 0x00030080,
351  PJ_SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5 = 0x00040080,
352  PJ_SSL_CK_IDEA_128_CBC_WITH_MD5 = 0x00050080,
353  PJ_SSL_CK_DES_64_CBC_WITH_MD5 = 0x00060040,
354  PJ_SSL_CK_DES_192_EDE3_CBC_WITH_MD5 = 0x000700C0
355 
356 } pj_ssl_cipher;
357 
358 
368  unsigned *cipher_num);
369 
370 
379 
380 
389 PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher);
390 
391 
402 PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name);
403 
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 
451  unsigned *curve_num);
452 
461 
462 
471 PJ_DECL(const char*) pj_ssl_curve_name(pj_ssl_curve curve);
472 
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;
497 
501 typedef struct pj_ssl_sock_cb
502 {
530  void *data,
531  pj_size_t size,
532  pj_status_t status,
533  pj_size_t *remainder);
555  void *data,
556  pj_size_t size,
557  const pj_sockaddr_t *src_addr,
558  int addr_len,
559  pj_status_t status);
560 
576  pj_ssize_t sent);
577 
593  pj_ssl_sock_t *newsock,
594  const pj_sockaddr_t *src_addr,
595  int src_addr_len);
596 
610  pj_status_t status);
611 
613 
614 
619 typedef enum pj_ssl_sock_proto
620 {
625 
630 
635 
640 
645 
650 
655  PJ_SSL_SOCK_PROTO_SSL23 = (1 << 16) - 1,
656 
661 
663 
664 
668 typedef struct pj_ssl_sock_info
669 {
675 
681 
687 
692 
697 
702 
707 
712 
716  unsigned long last_native_err;
717 
722 
724 
725 
729 typedef struct pj_ssl_sock_param
730 {
741 
747  int sock_af;
748 
755 
761 
768 
773 
777  void *user_data;
778 
786 
799  unsigned async_cnt;
800 
815 
830 
840 
850 
857  unsigned ciphers_num;
858 
864 
872  unsigned curves_num;
873 
879 
889 
899  pj_ssl_entropy_t entropy_type;
900 
909 
917 
924 
932 
943 
951 
960 
969 
977 
985 
994 
996 
997 
1004 PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param);
1005 
1006 
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);
1017 
1018 
1029  const pj_ssl_sock_param *param,
1030  pj_ssl_sock_t **p_ssock);
1031 
1032 
1049  pj_ssl_sock_t *ssock,
1050  pj_pool_t *pool,
1051  const pj_ssl_cert_t *cert);
1052 
1053 
1063 
1064 
1078  void *user_data);
1079 
1088 PJ_DECL(void*) pj_ssl_sock_get_user_data(pj_ssl_sock_t *ssock);
1089 
1090 
1100  pj_ssl_sock_info *info);
1101 
1102 
1126  pj_pool_t *pool,
1127  unsigned buff_size,
1128  pj_uint32_t flags);
1129 
1145  pj_pool_t *pool,
1146  unsigned buff_size,
1147  void *readbuf[],
1148  pj_uint32_t flags);
1149 
1164  pj_pool_t *pool,
1165  unsigned buff_size,
1166  pj_uint32_t flags);
1167 
1183  pj_pool_t *pool,
1184  unsigned buff_size,
1185  void *readbuf[],
1186  pj_uint32_t flags);
1187 
1210  const void *data,
1211  pj_ssize_t *size,
1212  unsigned flags);
1213 
1236  pj_ioqueue_op_key_t *send_key,
1237  const void *data,
1238  pj_ssize_t *size,
1239  unsigned flags,
1240  const pj_sockaddr_t *addr,
1241  int addr_len);
1242 
1243 
1265  pj_pool_t *pool,
1266  const pj_sockaddr_t *local_addr,
1267  int addr_len);
1268 
1269 
1286 PJ_DECL(pj_status_t)
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 
1313  pj_pool_t *pool,
1314  const pj_sockaddr_t *localaddr,
1315  const pj_sockaddr_t *remaddr,
1316  int addr_len);
1317 
1318 
1334 
1335 
1341 
1342 #endif /* __PJ_SSL_SOCK_H__ */
pj_str_t cn
Definition: ssl_sock.h:155
struct pj_timer_heap_t pj_timer_heap_t
Definition: types.h:221
pj_bool_t verify_peer
Definition: ssl_sock.h:923
Definition: ssl_sock.h:655
pj_time_val end
Definition: ssl_sock.h:169
Definition: ssl_sock.h:634
pj_uint32_t proto
Definition: ssl_sock.h:680
pj_bool_t reuse_addr
Definition: ssl_sock.h:950
pj_ssl_cert_info * remote_cert_info
Definition: ssl_sock.h:706
pj_ioqueue_t * ioqueue
Definition: ssl_sock.h:760
pj_status_t pj_ssl_sock_get_info(pj_ssl_sock_t *ssock, pj_ssl_sock_info *info)
struct pj_ssl_cert_info::@3 issuer
pj_ssl_curve * curves
Definition: ssl_sock.h:878
pj_ssl_cert_verify_flag_t
Definition: ssl_sock.h:63
int pj_bool_t
Definition: types.h:71
Definition: ssl_sock.h:111
pj_qos_params qos_params
Definition: ssl_sock.h:968
pj_ssl_cipher pj_ssl_cipher_id(const char *cipher_name)
struct pj_ssl_cert_info::@4 validity
Definition: sock.h:638
Definition: ssl_sock.h:73
pj_time_val timeout
Definition: ssl_sock.h:916
unsigned async_cnt
Definition: ssl_sock.h:799
pj_bool_t(* on_data_read)(pj_ssl_sock_t *ssock, void *data, pj_size_t size, pj_status_t status, pj_size_t *remainder)
Definition: ssl_sock.h:529
pj_ssl_sock_proto
Definition: ssl_sock.h:619
Definition: types.h:382
pj_uint8_t serial_no[20]
Definition: ssl_sock.h:150
pj_qos_type qos_type
Definition: ssl_sock.h:959
Definition: ssl_sock.h:660
pj_status_t pj_ssl_sock_sendto(pj_ssl_sock_t *ssock, pj_ioqueue_op_key_t *send_key, const void *data, pj_ssize_t *size, unsigned flags, const pj_sockaddr_t *addr, int addr_len)
pj_ssl_cipher
Definition: ssl_sock.h:278
Socket QoS API.
pj_status_t pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[], unsigned *cipher_num)
pj_status_t pj_ssl_sock_close(pj_ssl_sock_t *ssock)
pj_bool_t pj_ssl_curve_is_supported(pj_ssl_curve curve)
pj_ssl_curve pj_ssl_curve_id(const char *curve_name)
pj_status_t pj_ssl_sock_start_recvfrom2(pj_ssl_sock_t *ssock, pj_pool_t *pool, unsigned buff_size, void *readbuf[], pj_uint32_t flags)
unsigned long last_native_err
Definition: ssl_sock.h:716
pj_size_t send_buffer_size
Definition: ssl_sock.h:839
struct pj_ssl_cert_info::@5 subj_alt_name
Definition: ssl_sock.h:124
unsigned curves_num
Definition: ssl_sock.h:872
pj_ssl_sock_cb cb
Definition: ssl_sock.h:772
pj_size_t read_buffer_size
Definition: ssl_sock.h:849
int pj_status_t
Definition: types.h:68
Definition: sock.h:616
pj_str_t name
Definition: ssl_sock.h:179
Definition: ssl_sock.h:106
pj_status_t pj_ssl_cert_get_verify_status_strings(pj_uint32_t verify_status, const char *error_strings[], unsigned *count)
pj_bool_t(* on_data_recvfrom)(pj_ssl_sock_t *ssock, void *data, pj_size_t size, const pj_sockaddr_t *src_addr, int addr_len, pj_status_t status)
Definition: ssl_sock.h:554
pj_status_t pj_ssl_sock_start_read(pj_ssl_sock_t *ssock, pj_pool_t *pool, unsigned buff_size, pj_uint32_t flags)
const char * pj_ssl_curve_name(pj_ssl_curve curve)
pj_status_t pj_ssl_sock_start_accept2(pj_ssl_sock_t *ssock, pj_pool_t *pool, const pj_sockaddr_t *local_addr, int addr_len, const pj_ssl_sock_param *newsock_param)
Definition: ioqueue.h:209
struct pj_ssl_cert_t pj_ssl_cert_t
Definition: ssl_sock.h:60
void pj_sockaddr_t
Definition: types.h:267
unsigned ciphers_num
Definition: ssl_sock.h:857
pj_timer_heap_t * timer_heap
Definition: ssl_sock.h:767
pj_uint32_t proto
Definition: ssl_sock.h:785
Definition: types.h:119
struct pj_ssl_cert_info::@5::@6 * entry
int sock_af
Definition: ssl_sock.h:747
pj_status_t pj_ssl_sock_create(pj_pool_t *pool, const pj_ssl_sock_param *param, pj_ssl_sock_t **p_ssock)
struct pj_grp_lock_t pj_grp_lock_t
Definition: types.h:242
pj_status_t pj_ssl_sock_renegotiate(pj_ssl_sock_t *ssock)
Definition: ssl_sock.h:649
pj_bool_t(* on_accept_complete)(pj_ssl_sock_t *ssock, pj_ssl_sock_t *newsock, const pj_sockaddr_t *src_addr, int src_addr_len)
Definition: ssl_sock.h:592
pj_bool_t sockopt_ignore_error
Definition: ssl_sock.h:993
Definition: ssl_sock.h:101
struct pj_ioqueue_t pj_ioqueue_t
Definition: types.h:210
unsigned int pj_uint32_t
Definition: types.h:43
pj_bool_t(* on_data_sent)(pj_ssl_sock_t *ssock, pj_ioqueue_op_key_t *send_key, pj_ssize_t sent)
Definition: ssl_sock.h:574
pj_bool_t qos_ignore_error
Definition: ssl_sock.h:976
Definition: ssl_sock.h:89
Definition: ssl_sock.h:624
pj_str_t raw
Definition: ssl_sock.h:184
pj_bool_t pj_ssl_cipher_is_supported(pj_ssl_cipher cipher)
pj_status_t pj_ssl_cert_load_from_files(pj_pool_t *pool, const pj_str_t *CA_file, const pj_str_t *cert_file, const pj_str_t *privkey_file, const pj_str_t *privkey_pass, pj_ssl_cert_t **p_cert)
struct pj_ssl_sock_t pj_ssl_sock_t
Definition: ssl_sock.h:53
pj_status_t pj_ssl_sock_start_recvfrom(pj_ssl_sock_t *ssock, pj_pool_t *pool, unsigned buff_size, pj_uint32_t flags)
#define PJ_END_DECL
Definition: config.h:1139
pj_bool_t require_client_cert
Definition: ssl_sock.h:931
Definition: ssl_sock.h:78
I/O Dispatching Mechanism.
pj_status_t pj_ssl_sock_start_accept(pj_ssl_sock_t *ssock, pj_pool_t *pool, const pj_sockaddr_t *local_addr, int addr_len)
Definition: ssl_sock.h:146
Definition: ssl_sock.h:116
pj_ssl_cipher cipher
Definition: ssl_sock.h:686
Definition: ssl_sock.h:729
unsigned version
Definition: ssl_sock.h:148
#define PJ_BEGIN_DECL
Definition: config.h:1138
pj_qos_type
Definition: sock_qos.h:235
pj_ssl_curve
Definition: ssl_sock.h:407
pj_status_t pj_ssl_sock_set_user_data(pj_ssl_sock_t *ssock, void *user_data)
struct pj_ssl_cert_info::@2 subject
int concurrency
Definition: ssl_sock.h:814
pj_status_t pj_ssl_curve_get_availables(pj_ssl_curve curves[], unsigned *curve_num)
pj_bool_t gmt
Definition: ssl_sock.h:170
pj_uint32_t verify_status
Definition: ssl_sock.h:711
long pj_ssize_t
Definition: types.h:64
pj_ssize_t pj_ssl_cert_info_dump(const pj_ssl_cert_info *ci, const char *indent, char *buf, pj_size_t buf_size)
Definition: ssl_sock.h:94
pj_str_t server_name
Definition: ssl_sock.h:942
int sock_type
Definition: ssl_sock.h:754
unsigned char pj_uint8_t
Definition: types.h:55
Definition: pool.h:313
Socket Abstraction.
Definition: ssl_sock.h:501
Definition: ssl_sock.h:644
Definition: ssl_sock.h:68
pj_grp_lock_t * grp_lock
Definition: ssl_sock.h:721
pj_sockopt_params sockopt_params
Definition: ssl_sock.h:984
void pj_ssl_sock_param_copy(pj_pool_t *pool, pj_ssl_sock_param *dst, const pj_ssl_sock_param *src)
pj_status_t pj_ssl_sock_set_certificate(pj_ssl_sock_t *ssock, pj_pool_t *pool, const pj_ssl_cert_t *cert)
Definition: ssl_sock.h:83
pj_bool_t established
Definition: ssl_sock.h:674
pj_status_t pj_ssl_sock_start_read2(pj_ssl_sock_t *ssock, pj_pool_t *pool, unsigned buff_size, void *readbuf[], pj_uint32_t flags)
Definition: ssl_sock.h:668
pj_status_t pj_ssl_sock_start_connect(pj_ssl_sock_t *ssock, pj_pool_t *pool, const pj_sockaddr_t *localaddr, const pj_sockaddr_t *remaddr, int addr_len)
pj_sockaddr local_addr
Definition: ssl_sock.h:691
void * pj_ssl_sock_get_user_data(pj_ssl_sock_t *ssock)
pj_bool_t(* on_connect_complete)(pj_ssl_sock_t *ssock, pj_status_t status)
Definition: ssl_sock.h:609
pj_str_t sigalgs
Definition: ssl_sock.h:888
pj_ssl_cert_info * local_cert_info
Definition: ssl_sock.h:701
pj_str_t info
Definition: ssl_sock.h:156
Definition: ssl_sock.h:129
void pj_ssl_sock_param_default(pj_ssl_sock_param *param)
Definition: ssl_sock.h:639
Definition: sock_qos.h:274
pj_sockaddr remote_addr
Definition: ssl_sock.h:696
pj_time_val start
Definition: ssl_sock.h:168
const char * pj_ssl_cipher_name(pj_ssl_cipher cipher)
pj_grp_lock_t * grp_lock
Definition: ssl_sock.h:740
Definition: ssl_sock.h:629
pj_str_t entropy_path
Definition: ssl_sock.h:908
Definition: activesock.c:270
pj_status_t pj_ssl_cert_load_from_files2(pj_pool_t *pool, const pj_str_t *CA_file, const pj_str_t *CA_path, const pj_str_t *cert_file, const pj_str_t *privkey_file, const pj_str_t *privkey_pass, pj_ssl_cert_t **p_cert)
pj_status_t pj_ssl_sock_send(pj_ssl_sock_t *ssock, pj_ioqueue_op_key_t *send_key, const void *data, pj_ssize_t *size, unsigned flags)
unsigned cnt
Definition: ssl_sock.h:175
size_t pj_size_t
Definition: types.h:58
pj_ssl_cert_name_type type
Definition: ssl_sock.h:177
void * user_data
Definition: ssl_sock.h:777
pj_ssl_entropy_t entropy_type
Definition: ssl_sock.h:899
pj_bool_t whole_data
Definition: ssl_sock.h:829
pj_ssl_cipher * ciphers
Definition: ssl_sock.h:863

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.