BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

ssl_sock.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18#ifndef __PJ_SSL_SOCK_H__
19#define __PJ_SSL_SOCK_H__
20
26#include <pj/ioqueue.h>
27#include <pj/sock.h>
28#include <pj/sock_qos.h>
29
30
32
53
54
60
61
66{
71
76
81
86
92
97
104
109
114
119
127
131 PJ_SSL_CERT_EUNKNOWN = (1 << 31)
132
134
135
140{
141 PJ_SSL_CERT_NAME_UNKNOWN = 0,
142 PJ_SSL_CERT_NAME_RFC822,
143 PJ_SSL_CERT_NAME_DNS,
144 PJ_SSL_CERT_NAME_URI,
145 PJ_SSL_CERT_NAME_IP
147
151typedef struct pj_ssl_cert_info {
152
153 unsigned version;
159 struct {
166 struct {
167 pj_str_t cn;
168 pj_str_t info;
172 struct {
179 struct {
180 unsigned cnt;
181 struct {
185 } *entry;
186 } subj_alt_name;
192 struct {
193 unsigned cnt;
194 pj_str_t *cert_raw;
195 } raw_chain;
196
198
203
220 const pj_str_t *CA_file,
221 const pj_str_t *cert_file,
222 const pj_str_t *privkey_file,
223 const pj_str_t *privkey_pass,
224 pj_ssl_cert_t **p_cert);
225
247 pj_pool_t *pool,
248 const pj_str_t *CA_file,
249 const pj_str_t *CA_path,
250 const pj_str_t *cert_file,
251 const pj_str_t *privkey_file,
252 const pj_str_t *privkey_pass,
253 pj_ssl_cert_t **p_cert);
254
255
270 const pj_ssl_cert_buffer *CA_buf,
271 const pj_ssl_cert_buffer *cert_buf,
272 const pj_ssl_cert_buffer *privkey_buf,
273 const pj_str_t *privkey_pass,
274 pj_ssl_cert_t **p_cert);
275
288 const char *indent,
289 char *buf,
290 pj_size_t buf_size);
291
292
306 pj_uint32_t verify_status,
307 const char *error_strings[],
308 unsigned *count);
309
317
318
322typedef enum pj_ssl_cipher {
323
324 /* Unsupported cipher */
325 PJ_TLS_UNKNOWN_CIPHER = -1,
326
327 /* NULL */
328 PJ_TLS_NULL_WITH_NULL_NULL = 0x00000000,
329
330 /* TLS/SSLv3 */
331 PJ_TLS_RSA_WITH_NULL_MD5 = 0x00000001,
332 PJ_TLS_RSA_WITH_NULL_SHA = 0x00000002,
333 PJ_TLS_RSA_WITH_NULL_SHA256 = 0x0000003B,
334 PJ_TLS_RSA_WITH_RC4_128_MD5 = 0x00000004,
335 PJ_TLS_RSA_WITH_RC4_128_SHA = 0x00000005,
336 PJ_TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x0000000A,
337 PJ_TLS_RSA_WITH_AES_128_CBC_SHA = 0x0000002F,
338 PJ_TLS_RSA_WITH_AES_256_CBC_SHA = 0x00000035,
339 PJ_TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x0000003C,
340 PJ_TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x0000003D,
341 PJ_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 0x0000000D,
342 PJ_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 0x00000010,
343 PJ_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x00000013,
344 PJ_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x00000016,
345 PJ_TLS_DH_DSS_WITH_AES_128_CBC_SHA = 0x00000030,
346 PJ_TLS_DH_RSA_WITH_AES_128_CBC_SHA = 0x00000031,
347 PJ_TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x00000032,
348 PJ_TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x00000033,
349 PJ_TLS_DH_DSS_WITH_AES_256_CBC_SHA = 0x00000036,
350 PJ_TLS_DH_RSA_WITH_AES_256_CBC_SHA = 0x00000037,
351 PJ_TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 0x00000038,
352 PJ_TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x00000039,
353 PJ_TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 0x0000003E,
354 PJ_TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 0x0000003F,
355 PJ_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 0x00000040,
356 PJ_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x00000067,
357 PJ_TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 0x00000068,
358 PJ_TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 0x00000069,
359 PJ_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 0x0000006A,
360 PJ_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x0000006B,
361 PJ_TLS_DH_anon_WITH_RC4_128_MD5 = 0x00000018,
362 PJ_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 0x0000001B,
363 PJ_TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x00000034,
364 PJ_TLS_DH_anon_WITH_AES_256_CBC_SHA = 0x0000003A,
365 PJ_TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 0x0000006C,
366 PJ_TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 0x0000006D,
367
368 /* TLS (deprecated) */
369 PJ_TLS_RSA_EXPORT_WITH_RC4_40_MD5 = 0x00000003,
370 PJ_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 0x00000006,
371 PJ_TLS_RSA_WITH_IDEA_CBC_SHA = 0x00000007,
372 PJ_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x00000008,
373 PJ_TLS_RSA_WITH_DES_CBC_SHA = 0x00000009,
374 PJ_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x0000000B,
375 PJ_TLS_DH_DSS_WITH_DES_CBC_SHA = 0x0000000C,
376 PJ_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x0000000E,
377 PJ_TLS_DH_RSA_WITH_DES_CBC_SHA = 0x0000000F,
378 PJ_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x00000011,
379 PJ_TLS_DHE_DSS_WITH_DES_CBC_SHA = 0x00000012,
380 PJ_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x00000014,
381 PJ_TLS_DHE_RSA_WITH_DES_CBC_SHA = 0x00000015,
382 PJ_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 = 0x00000017,
383 PJ_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 0x00000019,
384 PJ_TLS_DH_anon_WITH_DES_CBC_SHA = 0x0000001A,
385
386 /* SSLv3 */
387 PJ_SSL_FORTEZZA_KEA_WITH_NULL_SHA = 0x0000001C,
388 PJ_SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA = 0x0000001D,
389 PJ_SSL_FORTEZZA_KEA_WITH_RC4_128_SHA = 0x0000001E,
390
391 /* SSLv2 */
392 PJ_SSL_CK_RC4_128_WITH_MD5 = 0x00010080,
393 PJ_SSL_CK_RC4_128_EXPORT40_WITH_MD5 = 0x00020080,
394 PJ_SSL_CK_RC2_128_CBC_WITH_MD5 = 0x00030080,
395 PJ_SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5 = 0x00040080,
396 PJ_SSL_CK_IDEA_128_CBC_WITH_MD5 = 0x00050080,
397 PJ_SSL_CK_DES_64_CBC_WITH_MD5 = 0x00060040,
398 PJ_SSL_CK_DES_192_EDE3_CBC_WITH_MD5 = 0x000700C0
399
401
402
412 unsigned *cipher_num);
413
414
423
424
433PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher);
434
435
446PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name);
447
451typedef enum pj_ssl_curve
452{
453 PJ_TLS_UNKNOWN_CURVE = 0,
454 PJ_TLS_CURVE_SECT163K1 = 1,
455 PJ_TLS_CURVE_SECT163R1 = 2,
456 PJ_TLS_CURVE_SECT163R2 = 3,
457 PJ_TLS_CURVE_SECT193R1 = 4,
458 PJ_TLS_CURVE_SECT193R2 = 5,
459 PJ_TLS_CURVE_SECT233K1 = 6,
460 PJ_TLS_CURVE_SECT233R1 = 7,
461 PJ_TLS_CURVE_SECT239K1 = 8,
462 PJ_TLS_CURVE_SECT283K1 = 9,
463 PJ_TLS_CURVE_SECT283R1 = 10,
464 PJ_TLS_CURVE_SECT409K1 = 11,
465 PJ_TLS_CURVE_SECT409R1 = 12,
466 PJ_TLS_CURVE_SECT571K1 = 13,
467 PJ_TLS_CURVE_SECT571R1 = 14,
468 PJ_TLS_CURVE_SECP160K1 = 15,
469 PJ_TLS_CURVE_SECP160R1 = 16,
470 PJ_TLS_CURVE_SECP160R2 = 17,
471 PJ_TLS_CURVE_SECP192K1 = 18,
472 PJ_TLS_CURVE_SECP192R1 = 19,
473 PJ_TLS_CURVE_SECP224K1 = 20,
474 PJ_TLS_CURVE_SECP224R1 = 21,
475 PJ_TLS_CURVE_SECP256K1 = 22,
476 PJ_TLS_CURVE_SECP256R1 = 23,
477 PJ_TLS_CURVE_SECP384R1 = 24,
478 PJ_TLS_CURVE_SECP521R1 = 25,
479 PJ_TLS_CURVE_BRAINPOOLP256R1 = 26,
480 PJ_TLS_CURVE_BRAINPOOLP384R1 = 27,
481 PJ_TLS_CURVE_BRAINPOOLP512R1 = 28,
482 PJ_TLS_CURVE_ARBITRARY_EXPLICIT_PRIME_CURVES = 0XFF01,
483 PJ_TLS_CURVE_ARBITRARY_EXPLICIT_CHAR2_CURVES = 0XFF02
485
495 unsigned *curve_num);
496
505
506
515PJ_DECL(const char*) pj_ssl_curve_name(pj_ssl_curve curve);
516
527PJ_DECL(pj_ssl_curve) pj_ssl_curve_id(const char *curve_name);
528
532typedef enum pj_ssl_entropy
533{
541
545typedef struct pj_ssl_sock_cb
546{
574 void *data,
575 pj_size_t size,
576 pj_status_t status,
577 pj_size_t *remainder);
599 void *data,
600 pj_size_t size,
601 const pj_sockaddr_t *src_addr,
602 int addr_len,
603 pj_status_t status);
604
620 pj_ssize_t sent);
621
638 pj_ssl_sock_t *newsock,
639 const pj_sockaddr_t *src_addr,
640 int src_addr_len);
660 pj_ssl_sock_t *newsock,
661 const pj_sockaddr_t *src_addr,
662 int src_addr_len,
663 pj_status_t status);
664
678 pj_status_t status);
679
694
696
697
703{
708
713
718
723
728
733
738
743 PJ_SSL_SOCK_PROTO_SSL23 = (1 << 16) - 1,
744 PJ_SSL_SOCK_PROTO_ALL = PJ_SSL_SOCK_PROTO_SSL23,
745
750
752
753
757typedef struct pj_ssl_sock_info
758{
764
770
776
781
786
791
796
801
805 unsigned long last_native_err;
806
811
813
814
818typedef struct pj_ssl_sock_param
819{
830
837
844
850
857
862
867
875
888 unsigned async_cnt;
889
904
919
929
939
946 unsigned ciphers_num;
947
953
961 unsigned curves_num;
962
968
978
989
998
1006
1013
1021
1033
1041
1050
1059
1067
1075
1084
1086
1087
1096
1101
1108
1113
1118
1120
1121
1129
1130
1139 pj_ssl_sock_param *dst,
1140 const pj_ssl_sock_param *src);
1141
1142
1153 const pj_ssl_sock_param *param,
1154 pj_ssl_sock_t **p_ssock);
1155
1156
1173 pj_ssl_sock_t *ssock,
1174 pj_pool_t *pool,
1175 const pj_ssl_cert_t *cert);
1176
1177
1187
1188
1202 void *user_data);
1203
1213
1214
1224 pj_ssl_sock_info *info);
1225
1226
1250 pj_pool_t *pool,
1251 unsigned buff_size,
1252 pj_uint32_t flags);
1253
1269 pj_pool_t *pool,
1270 unsigned buff_size,
1271 void *readbuf[],
1272 pj_uint32_t flags);
1273
1288 pj_pool_t *pool,
1289 unsigned buff_size,
1290 pj_uint32_t flags);
1291
1307 pj_pool_t *pool,
1308 unsigned buff_size,
1309 void *readbuf[],
1310 pj_uint32_t flags);
1311
1334 const void *data,
1335 pj_ssize_t *size,
1336 unsigned flags);
1337
1361 const void *data,
1362 pj_ssize_t *size,
1363 unsigned flags,
1364 const pj_sockaddr_t *addr,
1365 int addr_len);
1366
1367
1389 pj_pool_t *pool,
1390 const pj_sockaddr_t *local_addr,
1391 int addr_len);
1392
1393
1410PJ_DECL(pj_status_t)
1412 pj_pool_t *pool,
1413 const pj_sockaddr_t *local_addr,
1414 int addr_len,
1415 const pj_ssl_sock_param *newsock_param);
1416
1417
1437 pj_pool_t *pool,
1438 const pj_sockaddr_t *localaddr,
1439 const pj_sockaddr_t *remaddr,
1440 int addr_len);
1441
1458 pj_ssl_sock_t *ssock,
1459 pj_ssl_start_connect_param *connect_param);
1460
1476
1482
1483#endif /* __PJ_SSL_SOCK_H__ */
unsigned char pj_uint8_t
Definition: types.h:55
long pj_ssize_t
Definition: types.h:64
int pj_bool_t
Definition: types.h:71
struct pj_ioqueue_t pj_ioqueue_t
Definition: types.h:210
unsigned short pj_uint16_t
Definition: types.h:49
size_t pj_size_t
Definition: types.h:58
void pj_sockaddr_t
Definition: types.h:267
int pj_status_t
Definition: types.h:68
struct pj_grp_lock_t pj_grp_lock_t
Definition: types.h:242
struct pj_timer_heap_t pj_timer_heap_t
Definition: types.h:221
unsigned int pj_uint32_t
Definition: types.h:43
const char * pj_ssl_cipher_name(pj_ssl_cipher cipher)
pj_bool_t pj_ssl_cipher_is_supported(pj_ssl_cipher cipher)
const char * pj_ssl_curve_name(pj_ssl_curve curve)
pj_status_t pj_ssl_cipher_get_availables(pj_ssl_cipher ciphers[], unsigned *cipher_num)
pj_status_t pj_ssl_sock_set_certificate(pj_ssl_sock_t *ssock, pj_pool_t *pool, const pj_ssl_cert_t *cert)
pj_ssize_t pj_ssl_cert_info_dump(const pj_ssl_cert_info *ci, const char *indent, char *buf, pj_size_t buf_size)
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)
pj_status_t pj_ssl_sock_set_user_data(pj_ssl_sock_t *ssock, void *user_data)
pj_str_t pj_ssl_cert_buffer
Definition: ssl_sock.h:202
pj_status_t pj_ssl_sock_start_connect2(pj_ssl_sock_t *ssock, pj_ssl_start_connect_param *connect_param)
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)
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)
pj_status_t pj_ssl_sock_start_read(pj_ssl_sock_t *ssock, pj_pool_t *pool, unsigned buff_size, pj_uint32_t flags)
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)
void pj_ssl_sock_param_default(pj_ssl_sock_param *param)
pj_status_t pj_ssl_sock_create(pj_pool_t *pool, const pj_ssl_sock_param *param, pj_ssl_sock_t **p_ssock)
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)
pj_ssl_cipher
Definition: ssl_sock.h:322
pj_status_t pj_ssl_cert_get_verify_status_strings(pj_uint32_t verify_status, const char *error_strings[], unsigned *count)
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)
void * pj_ssl_sock_get_user_data(pj_ssl_sock_t *ssock)
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_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)
void pj_ssl_cert_wipe_keys(pj_ssl_cert_t *cert)
pj_ssl_cert_name_type
Definition: ssl_sock.h:140
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_ssl_curve
Definition: ssl_sock.h:452
struct pj_ssl_sock_t pj_ssl_sock_t
Definition: ssl_sock.h:52
struct pj_ssl_cert_t pj_ssl_cert_t
Definition: ssl_sock.h:59
pj_ssl_sock_proto
Definition: ssl_sock.h:703
pj_status_t pj_ssl_sock_renegotiate(pj_ssl_sock_t *ssock)
pj_status_t pj_ssl_cert_load_from_buffer(pj_pool_t *pool, const pj_ssl_cert_buffer *CA_buf, const pj_ssl_cert_buffer *cert_buf, const pj_ssl_cert_buffer *privkey_buf, const pj_str_t *privkey_pass, pj_ssl_cert_t **p_cert)
pj_ssl_cert_verify_flag_t
Definition: ssl_sock.h:66
pj_status_t pj_ssl_sock_close(pj_ssl_sock_t *ssock)
pj_bool_t pj_ssl_curve_is_supported(pj_ssl_curve curve)
void pj_ssl_sock_param_copy(pj_pool_t *pool, pj_ssl_sock_param *dst, const pj_ssl_sock_param *src)
pj_ssl_entropy_t
Definition: ssl_sock.h:533
pj_ssl_cipher pj_ssl_cipher_id(const char *cipher_name)
pj_status_t pj_ssl_curve_get_availables(pj_ssl_curve curves[], unsigned *curve_num)
pj_status_t pj_ssl_sock_start_recvfrom(pj_ssl_sock_t *ssock, pj_pool_t *pool, unsigned buff_size, pj_uint32_t flags)
pj_status_t pj_ssl_sock_get_info(pj_ssl_sock_t *ssock, pj_ssl_sock_info *info)
@ PJ_SSL_SOCK_PROTO_TLS1_2
Definition: ssl_sock.h:732
@ PJ_SSL_SOCK_PROTO_TLS1_1
Definition: ssl_sock.h:727
@ PJ_SSL_SOCK_PROTO_SSL23
Definition: ssl_sock.h:743
@ PJ_SSL_SOCK_PROTO_TLS1_3
Definition: ssl_sock.h:737
@ PJ_SSL_SOCK_PROTO_DEFAULT
Definition: ssl_sock.h:707
@ PJ_SSL_SOCK_PROTO_SSL2
Definition: ssl_sock.h:712
@ PJ_SSL_SOCK_PROTO_DTLS1
Definition: ssl_sock.h:749
@ PJ_SSL_SOCK_PROTO_TLS1
Definition: ssl_sock.h:722
@ PJ_SSL_SOCK_PROTO_SSL3
Definition: ssl_sock.h:717
@ PJ_SSL_CERT_EVALIDITY_PERIOD
Definition: ssl_sock.h:85
@ PJ_SSL_CERT_EISSUER_MISMATCH
Definition: ssl_sock.h:103
@ PJ_SSL_CERT_EINVALID_FORMAT
Definition: ssl_sock.h:91
@ PJ_SSL_CERT_ESUCCESS
Definition: ssl_sock.h:70
@ PJ_SSL_CERT_EINVALID_PURPOSE
Definition: ssl_sock.h:96
@ PJ_SSL_CERT_ECRL_FAILURE
Definition: ssl_sock.h:108
@ PJ_SSL_CERT_EREVOKED
Definition: ssl_sock.h:113
@ PJ_SSL_CERT_EIDENTITY_NOT_MATCH
Definition: ssl_sock.h:126
@ PJ_SSL_CERT_EUNKNOWN
Definition: ssl_sock.h:131
@ PJ_SSL_CERT_ECHAIN_TOO_LONG
Definition: ssl_sock.h:118
@ PJ_SSL_CERT_EISSUER_NOT_FOUND
Definition: ssl_sock.h:75
@ PJ_SSL_CERT_EUNTRUSTED
Definition: ssl_sock.h:80
@ PJ_SSL_ENTROPY_URANDOM
Definition: ssl_sock.h:537
@ PJ_SSL_ENTROPY_EGD
Definition: ssl_sock.h:535
@ PJ_SSL_ENTROPY_NONE
Definition: ssl_sock.h:534
@ PJ_SSL_ENTROPY_FILE
Definition: ssl_sock.h:538
@ PJ_SSL_ENTROPY_RANDOM
Definition: ssl_sock.h:536
@ PJ_SSL_ENTROPY_UNKNOWN
Definition: ssl_sock.h:539
#define PJ_BEGIN_DECL
Definition: config.h:1284
#define PJ_END_DECL
Definition: config.h:1285
pj_qos_type
Definition: sock_qos.h:235
I/O Dispatching Mechanism.
Socket Abstraction.
Socket QoS API.
Definition: ioqueue.h:208
Definition: pool.h:310
Definition: sock_qos.h:274
Definition: sock.h:653
Definition: ssl_sock.h:151
struct pj_ssl_cert_info::@5 subj_alt_name
pj_str_t cn
Definition: ssl_sock.h:160
struct pj_ssl_cert_info::@5::@7 * entry
struct pj_ssl_cert_info::@4 validity
pj_time_val start
Definition: ssl_sock.h:173
pj_str_t name
Definition: ssl_sock.h:184
pj_bool_t gmt
Definition: ssl_sock.h:175
pj_str_t info
Definition: ssl_sock.h:161
pj_uint8_t serial_no[20]
Definition: ssl_sock.h:155
pj_str_t raw
Definition: ssl_sock.h:189
pj_time_val end
Definition: ssl_sock.h:174
unsigned version
Definition: ssl_sock.h:153
struct pj_ssl_cert_info::@3 issuer
pj_ssl_cert_name_type type
Definition: ssl_sock.h:182
struct pj_ssl_cert_info::@2 subject
unsigned cnt
Definition: ssl_sock.h:180
Definition: ssl_sock.h:546
pj_bool_t(* on_accept_complete2)(pj_ssl_sock_t *ssock, pj_ssl_sock_t *newsock, const pj_sockaddr_t *src_addr, int src_addr_len, pj_status_t status)
Definition: ssl_sock.h:659
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:573
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:618
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:637
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:598
pj_bool_t(* on_verify_cb)(pj_ssl_sock_t *ssock, pj_bool_t is_server)
Definition: ssl_sock.h:693
pj_bool_t(* on_connect_complete)(pj_ssl_sock_t *ssock, pj_status_t status)
Definition: ssl_sock.h:677
Definition: ssl_sock.h:758
pj_uint32_t verify_status
Definition: ssl_sock.h:800
pj_sockaddr local_addr
Definition: ssl_sock.h:780
pj_bool_t established
Definition: ssl_sock.h:763
pj_ssl_cert_info * local_cert_info
Definition: ssl_sock.h:790
unsigned long last_native_err
Definition: ssl_sock.h:805
pj_ssl_cert_info * remote_cert_info
Definition: ssl_sock.h:795
pj_grp_lock_t * grp_lock
Definition: ssl_sock.h:810
pj_uint32_t proto
Definition: ssl_sock.h:769
pj_sockaddr remote_addr
Definition: ssl_sock.h:785
pj_ssl_cipher cipher
Definition: ssl_sock.h:775
Definition: ssl_sock.h:819
pj_ssl_entropy_t entropy_type
Definition: ssl_sock.h:988
unsigned ciphers_num
Definition: ssl_sock.h:946
pj_uint32_t proto
Definition: ssl_sock.h:874
pj_timer_heap_t * timer_heap
Definition: ssl_sock.h:856
pj_size_t send_buffer_size
Definition: ssl_sock.h:928
pj_grp_lock_t * grp_lock
Definition: ssl_sock.h:829
pj_time_val timeout
Definition: ssl_sock.h:1005
pj_bool_t reuse_addr
Definition: ssl_sock.h:1040
int sock_type
Definition: ssl_sock.h:843
void * user_data
Definition: ssl_sock.h:866
pj_ioqueue_t * ioqueue
Definition: ssl_sock.h:849
pj_sockopt_params sockopt_params
Definition: ssl_sock.h:1074
pj_ssl_curve * curves
Definition: ssl_sock.h:967
pj_str_t sigalgs
Definition: ssl_sock.h:977
unsigned curves_num
Definition: ssl_sock.h:961
pj_bool_t whole_data
Definition: ssl_sock.h:918
pj_bool_t require_client_cert
Definition: ssl_sock.h:1020
pj_str_t entropy_path
Definition: ssl_sock.h:997
pj_qos_type qos_type
Definition: ssl_sock.h:1049
pj_bool_t qos_ignore_error
Definition: ssl_sock.h:1066
pj_qos_params qos_params
Definition: ssl_sock.h:1058
unsigned async_cnt
Definition: ssl_sock.h:888
pj_str_t server_name
Definition: ssl_sock.h:1032
pj_ssl_sock_cb cb
Definition: ssl_sock.h:861
pj_bool_t sockopt_ignore_error
Definition: ssl_sock.h:1083
pj_ssl_cipher * ciphers
Definition: ssl_sock.h:952
int concurrency
Definition: ssl_sock.h:903
int sock_af
Definition: ssl_sock.h:836
pj_size_t read_buffer_size
Definition: ssl_sock.h:938
pj_bool_t verify_peer
Definition: ssl_sock.h:1012
Definition: ssl_sock.h:1091
const pj_sockaddr_t * localaddr
Definition: ssl_sock.h:1100
pj_pool_t * pool
Definition: ssl_sock.h:1095
pj_uint16_t local_port_range
Definition: ssl_sock.h:1107
int addr_len
Definition: ssl_sock.h:1117
const pj_sockaddr_t * remaddr
Definition: ssl_sock.h:1112
Definition: types.h:120
Definition: types.h:397
Definition: activesock.c:270
Definition: sock.h:633

 


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