Home | History | Annotate | Download | only in crypto
      1 /*
      2  * WPA Supplicant / SSL/TLS interface functions for no TLS case
      3  * Copyright (c) 2004, Jouni Malinen <j (at) 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 
     20 void * tls_init(const struct tls_config *conf)
     21 {
     22 	return (void *) 1;
     23 }
     24 
     25 void tls_deinit(void *ssl_ctx)
     26 {
     27 }
     28 
     29 
     30 #ifdef EAP_TLS_NONE
     31 
     32 int tls_get_errors(void *tls_ctx)
     33 {
     34 	return 0;
     35 }
     36 
     37 
     38 struct tls_connection * tls_connection_init(void *tls_ctx)
     39 {
     40 	return NULL;
     41 }
     42 
     43 
     44 void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
     45 {
     46 }
     47 
     48 
     49 int tls_connection_established(void *tls_ctx, struct tls_connection *conn)
     50 {
     51 	return -1;
     52 }
     53 
     54 
     55 int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
     56 {
     57 	return -1;
     58 }
     59 
     60 
     61 int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
     62 			      const struct tls_connection_params *params)
     63 {
     64 	return -1;
     65 }
     66 
     67 
     68 int tls_global_set_params(void *tls_ctx,
     69 			  const struct tls_connection_params *params)
     70 {
     71 	return -1;
     72 }
     73 
     74 
     75 int tls_global_set_verify(void *tls_ctx, int check_crl)
     76 {
     77 	return -1;
     78 }
     79 
     80 
     81 int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
     82 			      int verify_peer)
     83 {
     84 	return -1;
     85 }
     86 
     87 
     88 int tls_connection_set_ia(void *tls_ctx, struct tls_connection *conn,
     89 			  int tls_ia)
     90 {
     91 	return -1;
     92 }
     93 
     94 
     95 int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn,
     96 			    struct tls_keys *keys)
     97 {
     98 	return -1;
     99 }
    100 
    101 
    102 int tls_connection_prf(void *tls_ctx, struct tls_connection *conn,
    103 		       const char *label, int server_random_first,
    104 		       u8 *out, size_t out_len)
    105 {
    106 	return -1;
    107 }
    108 
    109 
    110 u8 * tls_connection_handshake(void *tls_ctx, struct tls_connection *conn,
    111 			      const u8 *in_data, size_t in_len,
    112 			      size_t *out_len, u8 **appl_data,
    113 			      size_t *appl_data_len)
    114 {
    115 	return NULL;
    116 }
    117 
    118 
    119 u8 * tls_connection_server_handshake(void *tls_ctx,
    120 				     struct tls_connection *conn,
    121 				     const u8 *in_data, size_t in_len,
    122 				     size_t *out_len)
    123 {
    124 	return NULL;
    125 }
    126 
    127 
    128 int tls_connection_encrypt(void *tls_ctx, struct tls_connection *conn,
    129 			   const u8 *in_data, size_t in_len,
    130 			   u8 *out_data, size_t out_len)
    131 {
    132 	return -1;
    133 }
    134 
    135 
    136 int tls_connection_decrypt(void *tls_ctx, struct tls_connection *conn,
    137 			   const u8 *in_data, size_t in_len,
    138 			   u8 *out_data, size_t out_len)
    139 {
    140 	return -1;
    141 }
    142 
    143 
    144 int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
    145 {
    146 	return 0;
    147 }
    148 
    149 
    150 int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
    151 				   u8 *ciphers)
    152 {
    153 	return -1;
    154 }
    155 
    156 
    157 int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
    158 		   char *buf, size_t buflen)
    159 {
    160 	return -1;
    161 }
    162 
    163 
    164 int tls_connection_enable_workaround(void *tls_ctx,
    165 				     struct tls_connection *conn)
    166 {
    167 	return -1;
    168 }
    169 
    170 
    171 int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn,
    172 				    int ext_type, const u8 *data,
    173 				    size_t data_len)
    174 {
    175 	return -1;
    176 }
    177 
    178 
    179 int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
    180 {
    181 	return 0;
    182 }
    183 
    184 
    185 int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
    186 {
    187 	return 0;
    188 }
    189 
    190 
    191 int tls_connection_get_write_alerts(void *tls_ctx,
    192 				    struct tls_connection *conn)
    193 {
    194 	return 0;
    195 }
    196 
    197 
    198 int tls_connection_get_keyblock_size(void *tls_ctx,
    199 				     struct tls_connection *conn)
    200 {
    201 	return -1;
    202 }
    203 
    204 
    205 unsigned int tls_capabilities(void *tls_ctx)
    206 {
    207 	return 0;
    208 }
    209 
    210 
    211 int tls_connection_ia_send_phase_finished(void *tls_ctx,
    212 					  struct tls_connection *conn,
    213 					  int final,
    214 					  u8 *out_data, size_t out_len)
    215 {
    216 	return -1;
    217 }
    218 
    219 
    220 int tls_connection_ia_final_phase_finished(void *tls_ctx,
    221 					   struct tls_connection *conn)
    222 {
    223 	return -1;
    224 }
    225 
    226 
    227 int tls_connection_ia_permute_inner_secret(void *tls_ctx,
    228 					   struct tls_connection *conn,
    229 					   const u8 *key, size_t key_len)
    230 {
    231 	return -1;
    232 }
    233 
    234 #endif /* EAP_TLS_NONE */
    235