diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2009-08-27 19:55:13 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2009-08-27 19:55:13 +0000 |
commit | 600ea59362df8c53ff23a6c5985eaf20b5460f5a (patch) | |
tree | e1f3266cc30ee3ae3b220f98c353e0058a51efbf /pjlib/src/pj/ssl_sock_common.c | |
parent | 04c1872db2effd3ba4f118328aae9d024c647fbc (diff) |
Ticket #957: Initial version of TLS transport for Symbian, includes:
- Secure socket, generic abstraction and Symbian implementation (using CSecureSocket).
- Initial rewriting of SIP TLS transport.
- Updated symbian_ua.mmp to support SIP transport TLS (experimental).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2913 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ssl_sock_common.c')
-rw-r--r-- | pjlib/src/pj/ssl_sock_common.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pjlib/src/pj/ssl_sock_common.c b/pjlib/src/pj/ssl_sock_common.c new file mode 100644 index 00000000..bcb249fb --- /dev/null +++ b/pjlib/src/pj/ssl_sock_common.c @@ -0,0 +1,43 @@ +/* $Id$ */ +/* + * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include <pj/ssl_sock.h> +#include <pj/string.h> + +/* + * Initialize the SSL socket configuration with the default values. + */ +PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param) +{ + pj_bzero(param, sizeof(*param)); + + /* Socket config */ + param->sock_af = PJ_AF_INET; + param->sock_type = pj_SOCK_STREAM(); + param->async_cnt = 1; + param->concurrency = -1; + param->whole_data = PJ_TRUE; +#if PJ_SYMBIAN + param->send_buffer_size = 8192; +#endif + + /* Security config */ + param->proto = PJ_SSL_SOCK_PROTO_DEFAULT; +} + + |