cyassl.i 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* cyassl.i
  2. *
  3. * Copyright (C) 2006-2014 wolfSSL Inc.
  4. *
  5. * This file is part of CyaSSL.
  6. *
  7. * CyaSSL 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. * CyaSSL 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 cyassl
  22. %{
  23. #include <cyassl/ssl.h>
  24. #include <cyassl/ctaocrypt/rsa.h>
  25. /* defn adds */
  26. char* CyaSSL_error_string(int err);
  27. int CyaSSL_swig_connect(CYASSL*, 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. CYASSL_METHOD* CyaTLSv1_client_method(void);
  33. CYASSL_CTX* CyaSSL_CTX_new(CYASSL_METHOD*);
  34. int CyaSSL_CTX_load_verify_locations(CYASSL_CTX*, const char*, const char*);
  35. CYASSL* CyaSSL_new(CYASSL_CTX*);
  36. int CyaSSL_get_error(CYASSL*, int);
  37. int CyaSSL_write(CYASSL*, const char*, int);
  38. int CyaSSL_Debugging_ON(void);
  39. int CyaSSL_Init(void);
  40. char* CyaSSL_error_string(int);
  41. int CyaSSL_swig_connect(CYASSL*, const char* server, int port);
  42. int RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, RNG* rng);
  43. int 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 CyaSSL_read(CYASSL*, unsigned char*, int);
  51. #define SSL_FAILURE 0
  52. #define SSL_SUCCESS 1