tls_none.c revision 1f69aa52ea2e0a73ac502565df8c666ee49cab6a
1/* 2 * SSL/TLS interface functions for no TLS case 3 * Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi> 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 version 2 as 7 * published by the Free Software Foundation. 8 * 9 * Alternatively, this software may be distributed under the terms of BSD 10 * license. 11 * 12 * See README and COPYING for more details. 13 */ 14 15#include "includes.h" 16 17#include "common.h" 18#include "tls.h" 19 20void * tls_init(const struct tls_config *conf) 21{ 22 return (void *) 1; 23} 24 25 26void tls_deinit(void *ssl_ctx) 27{ 28} 29 30 31int tls_get_errors(void *tls_ctx) 32{ 33 return 0; 34} 35 36 37struct tls_connection * tls_connection_init(void *tls_ctx) 38{ 39 return NULL; 40} 41 42 43void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn) 44{ 45} 46 47 48int tls_connection_established(void *tls_ctx, struct tls_connection *conn) 49{ 50 return -1; 51} 52 53 54int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn) 55{ 56 return -1; 57} 58 59 60int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn, 61 const struct tls_connection_params *params) 62{ 63 return -1; 64} 65 66 67int tls_global_set_params(void *tls_ctx, 68 const struct tls_connection_params *params) 69{ 70 return -1; 71} 72 73 74int tls_global_set_verify(void *tls_ctx, int check_crl) 75{ 76 return -1; 77} 78 79 80int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn, 81 int verify_peer) 82{ 83 return -1; 84} 85 86 87int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn, 88 struct tls_keys *keys) 89{ 90 return -1; 91} 92 93 94int tls_connection_prf(void *tls_ctx, struct tls_connection *conn, 95 const char *label, int server_random_first, 96 u8 *out, size_t out_len) 97{ 98 return -1; 99} 100 101 102struct wpabuf * tls_connection_handshake(void *tls_ctx, 103 struct tls_connection *conn, 104 const struct wpabuf *in_data, 105 struct wpabuf **appl_data) 106{ 107 return NULL; 108} 109 110 111struct wpabuf * tls_connection_server_handshake(void *tls_ctx, 112 struct tls_connection *conn, 113 const struct wpabuf *in_data, 114 struct wpabuf **appl_data) 115{ 116 return NULL; 117} 118 119 120struct wpabuf * tls_connection_encrypt(void *tls_ctx, 121 struct tls_connection *conn, 122 const struct wpabuf *in_data) 123{ 124 return NULL; 125} 126 127 128struct wpabuf * tls_connection_decrypt(void *tls_ctx, 129 struct tls_connection *conn, 130 const struct wpabuf *in_data) 131{ 132 return NULL; 133} 134 135 136int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn) 137{ 138 return 0; 139} 140 141 142int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn, 143 u8 *ciphers) 144{ 145 return -1; 146} 147 148 149int tls_get_cipher(void *tls_ctx, struct tls_connection *conn, 150 char *buf, size_t buflen) 151{ 152 return -1; 153} 154 155 156int tls_connection_enable_workaround(void *tls_ctx, 157 struct tls_connection *conn) 158{ 159 return -1; 160} 161 162 163int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn, 164 int ext_type, const u8 *data, 165 size_t data_len) 166{ 167 return -1; 168} 169 170 171int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn) 172{ 173 return 0; 174} 175 176 177int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn) 178{ 179 return 0; 180} 181 182 183int tls_connection_get_write_alerts(void *tls_ctx, 184 struct tls_connection *conn) 185{ 186 return 0; 187} 188 189 190int tls_connection_get_keyblock_size(void *tls_ctx, 191 struct tls_connection *conn) 192{ 193 return -1; 194} 195 196 197unsigned int tls_capabilities(void *tls_ctx) 198{ 199 return 0; 200} 201