wolfssl.i 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* wolfssl.i
  2. *
  3. * Copyright (C) 2006-2015 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL. (formerly known as CyaSSL)
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  20. */
  21. %module wolfssl
  22. %{
  23. #include <wolfssl/ssl.h>
  24. #include <wolfssl/wolfcrypt/rsa.h>
  25. /* defn adds */
  26. char* wolfSSL_error_string(int err);
  27. int wolfSSL_swig_connect(WOLFSSL*, const char* server, int port);
  28. RNG* GetRng(void);
  29. RsaKey* GetRsaPrivateKey(const char* file);
  30. void FillSignStr(unsigned char*, const char*, int);
  31. %}
  32. WOLFSSL_METHOD* wolfTLSv1_2_client_method(void);
  33. WOLFSSL_CTX* wolfSSL_CTX_new(WOLFSSL_METHOD*);
  34. int wolfSSL_CTX_load_verify_locations(WOLFSSL_CTX*, const char*, const char*);
  35. WOLFSSL* wolfSSL_new(WOLFSSL_CTX*);
  36. int wolfSSL_get_error(WOLFSSL*, int);
  37. int wolfSSL_write(WOLFSSL*, const char*, int);
  38. int wolfSSL_Debugging_ON(void);
  39. int wolfSSL_Init(void);
  40. char* wolfSSL_error_string(int);
  41. int wolfSSL_swig_connect(WOLFSSL*, const char* server, int port);
  42. int wc_RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, RNG* rng);
  43. int wc_RsaSSL_Verify(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key);
  44. RNG* GetRng(void);
  45. RsaKey* GetRsaPrivateKey(const char* file);
  46. void FillSignStr(unsigned char*, const char*, int);
  47. %include carrays.i
  48. %include cdata.i
  49. %array_class(unsigned char, byteArray);
  50. int wolfSSL_read(WOLFSSL*, unsigned char*, int);
  51. #define SSL_FAILURE 0
  52. #define SSL_SUCCESS 1