Added stubs for handshake handling, server and peer variants
[strongswan.git] / src / charon / plugins / eap_tls / tls / tls_server.c
1 /*
2 * Copyright (C) 2010 Martin Willi
3 * Copyright (C) 2010 revosec AG
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 #include "tls_server.h"
17
18 #include <daemon.h>
19
20 typedef struct private_tls_server_t private_tls_server_t;
21
22 /**
23 * Private data of an tls_server_t object.
24 */
25 struct private_tls_server_t {
26
27 /**
28 * Public tls_server_t interface.
29 */
30 tls_server_t public;
31 };
32
33
34 METHOD(tls_handshake_t, process, status_t,
35 private_tls_server_t *this, tls_handshake_type_t type, chunk_t data)
36 {
37 return NEED_MORE;
38 }
39
40 METHOD(tls_handshake_t, build, status_t,
41 private_tls_server_t *this, tls_handshake_type_t *type, chunk_t *data)
42 {
43 return INVALID_STATE;
44 }
45
46 METHOD(tls_handshake_t, destroy, void,
47 private_tls_server_t *this)
48 {
49 free(this);
50 }
51
52 /**
53 * See header
54 */
55 tls_server_t *tls_server_create()
56 {
57 private_tls_server_t *this;
58
59 INIT(this,
60 .public.handshake = {
61 .process = _process,
62 .build = _build,
63 .destroy = _destroy,
64 },
65 );
66
67 return &this->public;
68 }