wolfssl/swig/wolfssl.i

64 lines
2.2 KiB
OpenEdge ABL
Raw Normal View History

2015-01-09 00:47:41 +03:00
/* wolfssl.i
2011-07-27 00:27:22 +04:00
*
2015-01-08 19:39:04 +03:00
* Copyright (C) 2006-2015 wolfSSL Inc.
2011-07-27 00:27:22 +04:00
*
2015-01-06 22:14:15 +03:00
* This file is part of wolfSSL. (formerly known as CyaSSL)
2011-07-27 00:27:22 +04:00
*
2015-01-06 22:14:15 +03:00
* wolfSSL is free software; you can redistribute it and/or modify
2011-07-27 00:27:22 +04:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
2015-01-06 22:14:15 +03:00
* wolfSSL is distributed in the hope that it will be useful,
2011-07-27 00:27:22 +04:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
2014-04-12 01:58:58 +04:00
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
2011-07-27 00:27:22 +04:00
*/
2011-02-05 22:14:47 +03:00
2015-01-09 00:47:41 +03:00
%module wolfssl
2011-02-05 22:14:47 +03:00
%{
2015-01-09 00:47:41 +03:00
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/rsa.h>
2011-02-05 22:14:47 +03:00
/* defn adds */
2015-01-09 00:47:41 +03:00
char* wolfSSL_error_string(int err);
int wolfSSL_swig_connect(WOLFSSL*, const char* server, int port);
2011-02-05 22:14:47 +03:00
RNG* GetRng(void);
RsaKey* GetRsaPrivateKey(const char* file);
void FillSignStr(unsigned char*, const char*, int);
%}
2015-01-09 00:47:41 +03:00
WOLFSSL_METHOD* wolfTLSv1_client_method(void);
WOLFSSL_CTX* wolfSSL_CTX_new(WOLFSSL_METHOD*);
int wolfSSL_CTX_load_verify_locations(WOLFSSL_CTX*, const char*, const char*);
WOLFSSL* wolfSSL_new(WOLFSSL_CTX*);
int wolfSSL_get_error(WOLFSSL*, int);
int wolfSSL_write(WOLFSSL*, const char*, int);
int wolfSSL_Debugging_ON(void);
int wolfSSL_Init(void);
char* wolfSSL_error_string(int);
int wolfSSL_swig_connect(WOLFSSL*, const char* server, int port);
2011-02-05 22:14:47 +03:00
2015-01-09 00:47:41 +03:00
int wc_RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, RNG* rng);
2011-02-05 22:14:47 +03:00
2015-01-09 00:47:41 +03:00
int wc_RsaSSL_Verify(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key);
2011-02-05 22:14:47 +03:00
RNG* GetRng(void);
RsaKey* GetRsaPrivateKey(const char* file);
void FillSignStr(unsigned char*, const char*, int);
%include carrays.i
%include cdata.i
%array_class(unsigned char, byteArray);
2015-01-09 00:47:41 +03:00
int wolfSSL_read(WOLFSSL*, unsigned char*, int);
2011-02-05 22:14:47 +03:00
#define SSL_FAILURE 0
#define SSL_SUCCESS 1