wolfssl/swig/wolfssl.i

69 lines
2.5 KiB
OpenEdge ABL
Raw Normal View History

2015-01-08 14:47:41 -07:00
/* wolfssl.i
2011-07-26 13:27:22 -07:00
*
2020-01-03 15:06:03 -08:00
* Copyright (C) 2006-2020 wolfSSL Inc.
2011-07-26 13:27:22 -07:00
*
2016-03-17 16:02:13 -06:00
* This file is part of wolfSSL.
2011-07-26 13:27:22 -07:00
*
2015-01-06 12:14:15 -07:00
* wolfSSL is free software; you can redistribute it and/or modify
2011-07-26 13:27:22 -07: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 12:14:15 -07:00
* wolfSSL is distributed in the hope that it will be useful,
2011-07-26 13:27:22 -07: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
2016-03-17 16:02:13 -06:00
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
2011-07-26 13:27:22 -07:00
*/
2011-02-05 11:14:47 -08:00
2016-03-17 16:02:13 -06:00
2015-01-08 14:47:41 -07:00
%module wolfssl
2011-02-05 11:14:47 -08:00
%{
2015-01-08 14:47:41 -07:00
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/rsa.h>
2016-01-10 10:50:02 +01:00
#include <wolfssl/wolfcrypt/pwdbased.h>
2011-02-05 11:14:47 -08:00
/* defn adds */
2015-01-08 14:47:41 -07:00
char* wolfSSL_error_string(int err);
int wolfSSL_swig_connect(WOLFSSL*, const char* server, int port);
WC_RNG* GetRng(void);
2011-02-05 11:14:47 -08:00
RsaKey* GetRsaPrivateKey(const char* file);
void FillSignStr(unsigned char*, const char*, int);
%}
WOLFSSL_METHOD* wolfTLSv1_2_client_method(void);
2015-01-08 14:47:41 -07:00
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 11:14:47 -08:00
2016-01-10 10:50:02 +01:00
int wc_PKCS12_PBKDF(unsigned char* output, const unsigned char* passwd, int pLen, const unsigned char* salt,
int sLen, int iterations, int kLen, int hashType, int purpose);
int wc_RsaSSL_Sign(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key, WC_RNG* rng);
2011-02-05 11:14:47 -08:00
2015-01-08 14:47:41 -07:00
int wc_RsaSSL_Verify(const unsigned char* in, int inLen, unsigned char* out, int outLen, RsaKey* key);
2011-02-05 11:14:47 -08:00
WC_RNG* GetRng(void);
2011-02-05 11:14:47 -08:00
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-08 14:47:41 -07:00
int wolfSSL_read(WOLFSSL*, unsigned char*, int);
2011-02-05 11:14:47 -08:00
#define SSL_FAILURE 0
#define SSL_SUCCESS 1