]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/CyaSSL/swig/cyassl.i
Commit 3 RX100 low power demos.
[freertos] / FreeRTOS-Plus / CyaSSL / swig / cyassl.i
1 /* cyassl.i
2  *
3  * Copyright (C) 2006-2011 Sawtooth Consulting Ltd.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20  */
21
22 %module cyassl
23 %{
24     #include <cyassl/ssl.h>
25     #include <cyassl/ctaocrypt/rsa.h>
26
27     /* defn adds */
28     char* CyaSSL_error_string(int err);
29     int   CyaSSL_swig_connect(CYASSL*, const char* server, int port);
30     RNG*  GetRng(void);
31     RsaKey* GetRsaPrivateKey(const char* file);
32     void    FillSignStr(unsigned char*, const char*, int);
33 %}
34
35
36 CYASSL_METHOD* CyaTLSv1_client_method(void);
37 CYASSL_CTX*    CyaSSL_CTX_new(CYASSL_METHOD*);
38 int            CyaSSL_CTX_load_verify_locations(CYASSL_CTX*, const char*, const char*);
39 CYASSL*        CyaSSL_new(CYASSL_CTX*);
40 int            CyaSSL_get_error(CYASSL*, int);
41 int            CyaSSL_write(CYASSL*, const char*, int);
42 int            CyaSSL_Debugging_ON(void);
43 int            CyaSSL_Init(void);
44 char*          CyaSSL_error_string(int);
45 int            CyaSSL_swig_connect(CYASSL*, const char* server, int port);
46
47 int         RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, RNG* rng);
48
49 int         RsaSSL_Verify(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key);
50
51 RNG* GetRng(void);
52 RsaKey* GetRsaPrivateKey(const char* file);
53 void    FillSignStr(unsigned char*, const char*, int);
54
55 %include carrays.i
56 %include cdata.i
57 %array_class(unsigned char, byteArray);
58 int         CyaSSL_read(CYASSL*, unsigned char*, int);
59
60
61 #define    SSL_FAILURE      0
62 #define    SSL_SUCCESS      1
63