tls_none.c 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. #include "includes.h"
  15. #include "common.h"
  16. #include "tls.h"
  17. void * tls_init(const struct tls_config *conf)
  18. {
  19. return (void *) 1;
  20. }
  21. void tls_deinit(void *ssl_ctx)
  22. {
  23. }
  24. int tls_get_errors(void *tls_ctx)
  25. {
  26. return 0;
  27. }
  28. struct tls_connection * tls_connection_init(void *tls_ctx)
  29. {
  30. return NULL;
  31. }
  32. void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
  33. {
  34. }
  35. int tls_connection_established(void *tls_ctx, struct tls_connection *conn)
  36. {
  37. return -1;
  38. }
  39. int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
  40. {
  41. return -1;
  42. }
  43. int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
  44. const struct tls_connection_params *params)
  45. {
  46. return -1;
  47. }
  48. int tls_global_set_params(void *tls_ctx,
  49. const struct tls_connection_params *params)
  50. {
  51. return -1;
  52. }
  53. int tls_global_set_verify(void *tls_ctx, int check_crl)
  54. {
  55. return -1;
  56. }
  57. int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
  58. int verify_peer)
  59. {
  60. return -1;
  61. }
  62. int tls_connection_set_ia(void *tls_ctx, struct tls_connection *conn,
  63. int tls_ia)
  64. {
  65. return -1;
  66. }
  67. int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn,
  68. struct tls_keys *keys)
  69. {
  70. return -1;
  71. }
  72. int tls_connection_prf(void *tls_ctx, struct tls_connection *conn,
  73. const char *label, int server_random_first,
  74. u8 *out, size_t out_len)
  75. {
  76. return -1;
  77. }
  78. struct wpabuf * tls_connection_handshake(void *tls_ctx,
  79. struct tls_connection *conn,
  80. const struct wpabuf *in_data,
  81. struct wpabuf **appl_data)
  82. {
  83. return NULL;
  84. }
  85. struct wpabuf * tls_connection_server_handshake(void *tls_ctx,
  86. struct tls_connection *conn,
  87. const struct wpabuf *in_data,
  88. struct wpabuf **appl_data)
  89. {
  90. return NULL;
  91. }
  92. struct wpabuf * tls_connection_encrypt(void *tls_ctx,
  93. struct tls_connection *conn,
  94. const struct wpabuf *in_data)
  95. {
  96. return NULL;
  97. }
  98. struct wpabuf * tls_connection_decrypt(void *tls_ctx,
  99. struct tls_connection *conn,
  100. const struct wpabuf *in_data)
  101. {
  102. return NULL;
  103. }
  104. int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
  105. {
  106. return 0;
  107. }
  108. int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
  109. u8 *ciphers)
  110. {
  111. return -1;
  112. }
  113. int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
  114. char *buf, size_t buflen)
  115. {
  116. return -1;
  117. }
  118. int tls_connection_enable_workaround(void *tls_ctx,
  119. struct tls_connection *conn)
  120. {
  121. return -1;
  122. }
  123. int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn,
  124. int ext_type, const u8 *data,
  125. size_t data_len)
  126. {
  127. return -1;
  128. }
  129. int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
  130. {
  131. return 0;
  132. }
  133. int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
  134. {
  135. return 0;
  136. }
  137. int tls_connection_get_write_alerts(void *tls_ctx,
  138. struct tls_connection *conn)
  139. {
  140. return 0;
  141. }
  142. int tls_connection_get_keyblock_size(void *tls_ctx,
  143. struct tls_connection *conn)
  144. {
  145. return -1;
  146. }
  147. unsigned int tls_capabilities(void *tls_ctx)
  148. {
  149. return 0;
  150. }
  151. struct wpabuf * tls_connection_ia_send_phase_finished(
  152. void *tls_ctx, struct tls_connection *conn, int final)
  153. {
  154. return NULL;
  155. }
  156. int tls_connection_ia_final_phase_finished(void *tls_ctx,
  157. struct tls_connection *conn)
  158. {
  159. return -1;
  160. }
  161. int tls_connection_ia_permute_inner_secret(void *tls_ctx,
  162. struct tls_connection *conn,
  163. const u8 *key, size_t key_len)
  164. {
  165. return -1;
  166. }