diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-05-02 20:15:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:32 -0500 |
commit | 742c110cd67f4995639822981e8bfcb1f652f2c4 (patch) | |
tree | cd6774c861b0a968c3d22b24b5a02a0be9c54043 /source4/lib/socket | |
parent | 49994442bbb035b2c438a33f411d6b5a8b2313df (diff) | |
download | samba-742c110cd67f4995639822981e8bfcb1f652f2c4.tar.gz samba-742c110cd67f4995639822981e8bfcb1f652f2c4.tar.bz2 samba-742c110cd67f4995639822981e8bfcb1f652f2c4.zip |
r15400: Move the TLS code behind the socket interface.
This reduces caller complexity, because the TLS code is now called
just like any other socket. (A new socket context is returned by the
tls_init_server and tls_init_client routines).
When TLS is not available, the original socket is returned.
Andrew Bartlett
(This used to be commit 09b2f30dfa7a640f5187b4933204e9680be61497)
Diffstat (limited to 'source4/lib/socket')
-rw-r--r-- | source4/lib/socket/socket.c | 6 | ||||
-rw-r--r-- | source4/lib/socket/socket.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c index 4f7f4ef4b9..b7d4431c94 100644 --- a/source4/lib/socket/socket.c +++ b/source4/lib/socket/socket.c @@ -37,9 +37,9 @@ static int socket_destructor(void *ptr) return 0; } -static NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socket_ops *ops, - struct socket_context **new_sock, - enum socket_type type, uint32_t flags) +_PUBLIC_ NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socket_ops *ops, + struct socket_context **new_sock, + enum socket_type type, uint32_t flags) { NTSTATUS status; diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h index 04ae53e464..fefa999e08 100644 --- a/source4/lib/socket/socket.h +++ b/source4/lib/socket/socket.h @@ -117,6 +117,9 @@ struct socket_context { /* prototypes */ +NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socket_ops *ops, + struct socket_context **new_sock, + enum socket_type type, uint32_t flags); NTSTATUS socket_create(const char *name, enum socket_type type, struct socket_context **new_sock, uint32_t flags); NTSTATUS socket_connect(struct socket_context *sock, |