From 3cbab82d7cc31c4c489c2054c3b4b62a633fee71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Mon, 14 Jun 2021 21:56:53 +0200 Subject: Add generated files --- src/M2Crypto/m2crypto.py | 110 +- src/SWIG/_m2crypto_wrap.c | 28417 +++++++++++++++++++++----------------------- 2 files changed, 13640 insertions(+), 14887 deletions(-) diff --git a/src/M2Crypto/m2crypto.py b/src/M2Crypto/m2crypto.py index 1323547..9cad6f4 100644 --- a/src/M2Crypto/m2crypto.py +++ b/src/M2Crypto/m2crypto.py @@ -1,64 +1,84 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 4.0.2 +# Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. -from sys import version_info as _swig_python_version_info -if _swig_python_version_info < (2, 7, 0): - raise RuntimeError("Python 2.7 or later required") -# Pull in all the attributes from the low-level C/C++ module -if __package__ or "." in __name__: - from ._m2crypto import * -else: - from _m2crypto import * +from sys import version_info +if version_info >= (2,6,0): + def swig_import_helper(): + from os.path import dirname + import imp + fp = None + try: + fp, pathname, description = imp.find_module('_m2crypto', [dirname(__file__)]) + except ImportError: + import _m2crypto + return _m2crypto + if fp is not None: + try: + _mod = imp.load_module('_m2crypto', fp, pathname, description) + finally: + fp.close() + return _mod + _m2crypto = swig_import_helper() + del swig_import_helper +else: + import _m2crypto +del version_info +from _m2crypto import * try: - import builtins as __builtin__ -except ImportError: - import __builtin__ + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "thisown"): return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + if (not static): + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) + +def _swig_getattr(self,class_type,name): + if (name == "thisown"): return self.this.own() + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError(name) def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -def _swig_setattr_nondynamic_instance_variable(set): - def set_instance_attr(self, name, value): - if name == "thisown": - self.this.own(value) - elif name == "this": - set(self, name, value) - elif hasattr(self, name) and isinstance(getattr(type(self), name), property): - set(self, name, value) - else: - raise AttributeError("You cannot add instance attributes to %s" % self) - return set_instance_attr - - -def _swig_setattr_nondynamic_class_variable(set): - def set_class_attr(cls, name, value): - if hasattr(cls, name) and not isinstance(getattr(cls, name), property): - set(cls, name, value) +try: + _object = object + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self,name,value): + if (name == "thisown"): return self.this.own(value) + if hasattr(self,name) or (name == "this"): + set(self,name,value) else: - raise AttributeError("You cannot add class attributes to %s" % cls) - return set_class_attr - + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr -def _swig_add_metaclass(metaclass): - """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" - def wrapper(cls): - return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) - return wrapper -class _SwigNonDynamicMeta(type): - """Meta class to enforce nondynamic attributes (no new attributes) for a class""" - __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) diff --git a/src/SWIG/_m2crypto_wrap.c b/src/SWIG/_m2crypto_wrap.c index 2bbaafc..aba9eb6 100644 --- a/src/SWIG/_m2crypto_wrap.c +++ b/src/SWIG/_m2crypto_wrap.c @@ -1,18 +1,14 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.10 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ - -#ifndef SWIGPYTHON #define SWIGPYTHON -#endif - #define SWIG_PYTHON_THREADS #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN @@ -48,28 +44,28 @@ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -84,11 +80,9 @@ #endif /* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY # endif #endif @@ -114,7 +108,7 @@ # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -127,34 +121,10 @@ # define _SCL_SECURE_NO_DEPRECATE #endif -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - -#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) -/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ -# include -#endif -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG 1 -#else -# include -#endif +/* Python.h has to appear first */ +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -180,7 +150,7 @@ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. - + But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ @@ -201,22 +171,21 @@ /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 -#define SWIG_POINTER_NO_NULL 0x4 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { @@ -249,23 +218,23 @@ } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be @@ -279,17 +248,17 @@ int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -320,11 +289,11 @@ # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) @@ -371,7 +340,7 @@ typedef struct swig_module_info { void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -444,7 +413,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { return 0; } -/* +/* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * @@ -479,7 +448,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -523,7 +492,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -531,14 +500,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -547,31 +516,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { - size_t l = 0; - size_t r = iter->size - 1; + register size_t l = 0; + register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { - int compare = strcmp(name, iname); - if (compare == 0) { + register int compare = strcmp(name, iname); + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -596,14 +565,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -614,7 +583,7 @@ SWIG_TypeQueryModule(swig_module_info *start, of the str field (the human readable name) */ swig_module_info *iter = start; do { - size_t i = 0; + register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; @@ -622,56 +591,56 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; - const unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; for (; u != eu; ++u) { - unsigned char uu = *u; + register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; + register char d = *(c++); + register unsigned char uu; if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); + uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a'-10)) << 4); - else + uu = ((d - ('a'-10)) << 4); + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); + uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(d - ('a'-10)); - else + uu |= (d - ('a'-10)); + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -731,18 +700,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 @@ -786,31 +755,25 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { -#if PY_VERSION_HEX >= 0x03030000 - return (char *)PyUnicode_AsUTF8(str); -#elif PY_VERSION_HEX >= 0x03000000 - char *newstr = 0; +#if PY_VERSION_HEX >= 0x03000000 + char *cstr; + char *newstr; + Py_ssize_t len; str = PyUnicode_AsUTF8String(str); - if (str) { - char *cstr; - Py_ssize_t len; - if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) { - newstr = (char *) malloc(len+1); - if (newstr) - memcpy(newstr, cstr, len+1); - } - Py_XDECREF(str); - } + PyBytes_AsStringAndSize(str, &cstr, &len); + newstr = (char *) malloc(len+1); + memcpy(newstr, cstr, len+1); + Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } -#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000 -# define SWIG_Python_str_DelForPy3(x) -#else +#if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#else +# define SWIG_Python_str_DelForPy3(x) #endif @@ -824,19 +787,152 @@ SWIG_Python_str_FromChar(const char *c) #endif } +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif -// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user -// interface files check for it. +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +typedef inquiry lenfunc; +typedef intargfunc ssizeargfunc; +typedef intintargfunc ssizessizeargfunc; +typedef intobjargproc ssizeobjargproc; +typedef intintobjargproc ssizessizeobjargproc; +typedef getreadbufferproc readbufferproc; +typedef getwritebufferproc writebufferproc; +typedef getsegcountproc segcountproc; +typedef getcharbufferproc charbufferproc; +static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) +{ + long result = 0; + PyObject *i = PyNumber_Int(x); + if (i) { + result = PyInt_AsLong(i); + Py_DECREF(i); + } + return result; +} +#endif + +#if PY_VERSION_HEX < 0x02050000 +#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) +#endif + +#if PY_VERSION_HEX < 0x02040000 +#define Py_VISIT(op) \ + do { \ + if (op) { \ + int vret = visit((op), arg); \ + if (vret) \ + return vret; \ + } \ + } while (0) +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef struct { + PyTypeObject type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *name, *slots; +} PyHeapTypeObject; +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef destructor freefunc; +#endif + +#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ + (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ + (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +#endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#define Py_hash_t long #endif /* ----------------------------------------------------------------------------- @@ -894,17 +990,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *value = 0; PyObject *traceback = 0; - if (PyErr_Occurred()) - PyErr_Fetch(&type, &value, &traceback); + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { + char *tmp; PyObject *old_str = PyObject_Str(value); - const char *tmp = SWIG_Python_str_AsChar(old_str); PyErr_Clear(); Py_XINCREF(type); - if (tmp) - PyErr_Format(type, "%s %s", tmp, mesg); - else - PyErr_Format(type, "%s", mesg); + + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); @@ -913,37 +1006,6 @@ SWIG_Python_AddErrorMsg(const char* mesg) } } -SWIGRUNTIME int -SWIG_Python_TypeErrorOccurred(PyObject *obj) -{ - PyObject *error; - if (obj) - return 0; - error = PyErr_Occurred(); - return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); -} - -SWIGRUNTIME void -SWIG_Python_RaiseOrModifyTypeError(const char *message) -{ - if (SWIG_Python_TypeErrorOccurred(NULL)) { - /* Use existing TypeError to preserve stacktrace and enhance with given message */ - PyObject *newvalue; - PyObject *type = NULL, *value = NULL, *traceback = NULL; - PyErr_Fetch(&type, &value, &traceback); -#if PY_VERSION_HEX >= 0x03000000 - newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); -#else - newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); -#endif - Py_XDECREF(value); - PyErr_Restore(type, newvalue, traceback); - } else { - /* Raise TypeError using given message */ - PyErr_SetString(PyExc_TypeError, message); - } -} - #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS @@ -951,7 +1013,9 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# define SWIG_PYTHON_USE_GIL +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS @@ -1028,13 +1092,30 @@ extern "C" { /* Constant information structure */ typedef struct swig_const_info { int type; - const char *name; + char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX >= 0x03000000 +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) +{ + return PyInstanceMethod_New(func); +} +#else +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) +{ + return NULL; +} +#endif + #ifdef __cplusplus } #endif @@ -1049,14 +1130,6 @@ typedef struct swig_const_info { * * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ -# error "This version of SWIG only supports Python >= 2.7" -#endif - -#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 -# error "This version of SWIG only supports Python 3 >= 3.2" -#endif - /* Common SWIG API */ /* for raw pointers */ @@ -1140,7 +1213,11 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else PyDict_SetItemString(d, name, obj); +#endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); @@ -1150,7 +1227,11 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else PyDict_SetItemString(d, name, obj); +#endif Py_DECREF(obj); } @@ -1160,6 +1241,7 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { @@ -1175,11 +1257,34 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { Py_DECREF(obj); } return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif } /* Unpack the argument tuple */ -SWIGINTERN Py_ssize_t +SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { @@ -1193,7 +1298,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { - Py_ssize_t i; + register int i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; @@ -1203,7 +1308,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { - Py_ssize_t l = PyTuple_GET_SIZE(args); + register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); @@ -1213,7 +1318,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { - Py_ssize_t i; + register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } @@ -1225,21 +1330,12 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi } } -SWIGINTERN int -SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { - int no_kwargs = 1; - if (kwargs) { - assert(PyDict_Check(kwargs)); - if (PyDict_Size(kwargs) > 0) { - PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); - no_kwargs = 0; - } - } - return no_kwargs; -} - /* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif /* Helper for static pointer initialization for both C and C++ code, for example @@ -1268,6 +1364,35 @@ SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { extern "C" { #endif +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + /* The python void return value */ SWIGRUNTIMEINLINE PyObject * @@ -1294,10 +1419,7 @@ SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - int fail = data ? data->implicitconv : 0; - if (fail) - PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); - return fail; + return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * @@ -1324,7 +1446,11 @@ SwigPyClientData_New(PyObject* obj) data->newargs = obj; Py_INCREF(obj); } else { - data->newraw = PyObject_GetAttrString(data->klass, "__new__"); +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); @@ -1335,7 +1461,7 @@ SwigPyClientData_New(PyObject* obj) Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; @@ -1344,7 +1470,11 @@ SwigPyClientData_New(PyObject* obj) int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif } else { data->delargs = 0; } @@ -1374,23 +1504,6 @@ typedef struct { #endif } SwigPyObject; - -#ifdef SWIGPYTHON_BUILTIN - -SWIGRUNTIME PyObject * -SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *)v; - - if (!sobj->dict) - sobj->dict = PyDict_New(); - - Py_INCREF(sobj->dict); - return sobj->dict; -} - -#endif - SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { @@ -1432,12 +1545,20 @@ SwigPyObject_hex(SwigPyObject *v) } SWIGRUNTIME PyObject * +#ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { +# ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +# endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); @@ -1450,12 +1571,32 @@ SwigPyObject_repr(SwigPyObject *v) return repr; } -/* We need a version taking two PyObject* parameters so it's a valid - * PyCFunction to use in swigobject_methods[]. */ +SWIGRUNTIME int +SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char *str; +#ifdef METH_NOARGS + PyObject *repr = SwigPyObject_repr(v); +#else + PyObject *repr = SwigPyObject_repr(v, NULL); +#endif + if (repr) { + str = SWIG_Python_str_AsChar(repr); + fputs(str, fp); + SWIG_Python_str_DelForPy3(str); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + SWIGRUNTIME PyObject * -SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +SwigPyObject_str(SwigPyObject *v) { - return SwigPyObject_repr((SwigPyObject*)v); + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int @@ -1529,32 +1670,16 @@ SwigPyObject_dealloc(PyObject *v) if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; - - /* PyObject_CallFunction() has the potential to silently drop - the active exception. In cases of unnamed temporary - variable or where we just finished iterating over a generator - StopIteration will be active right now, and this needs to - remain true upon return from SwigPyObject_dealloc. So save - and restore. */ - - PyObject *type = NULL, *value = NULL, *traceback = NULL; - PyErr_Fetch(&type, &value, &traceback); - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); } - if (!res) - PyErr_WriteUnraisable(destroy); - - PyErr_Restore(type, value, traceback); - Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) @@ -1572,8 +1697,12 @@ SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif if (!SwigPyObject_Check(next)) { - PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } sobj->next = next; @@ -1582,7 +1711,11 @@ SwigPyObject_append(PyObject* v, PyObject* next) } SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { @@ -1594,7 +1727,11 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) } SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; @@ -1602,7 +1739,11 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) } SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; @@ -1613,32 +1754,70 @@ SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { - return NULL; - } else { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#elif (PY_VERSION_HEX < 0x02050000) + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#else + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) +#endif + { + return NULL; } - return obj; - } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } } +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else static PyMethodDef swigobject_methods[] = { - {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, - {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, - {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, - {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, - {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, - {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { @@ -1679,12 +1858,14 @@ SwigPyObject_TypeOnce(void) { (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif -#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ -#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ +#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#else +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -1692,21 +1873,26 @@ SwigPyObject_TypeOnce(void) { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "SwigPyObject", /* tp_name */ + (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ + (printfunc)SwigPyObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else (getattrfunc)0, /* tp_getattr */ +#endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif @@ -1716,7 +1902,7 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ + (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ @@ -1726,6 +1912,7 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ @@ -1746,29 +1933,25 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ #endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ #endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpyobject_type.ob_type = &PyType_Type; +#else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; +#endif } return &swigpyobject_type; } @@ -1797,6 +1980,20 @@ typedef struct { size_t size; } SwigPyPacked; +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { @@ -1825,7 +2022,7 @@ SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); @@ -1859,17 +2056,18 @@ SwigPyPacked_TypeOnce(void) { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "SwigPyPacked", /* tp_name */ + (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - 0, /* tp_print */ + (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 @@ -1893,6 +2091,7 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ @@ -1913,29 +2112,25 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ #endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ #endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpypacked_type.ob_type = &PyType_Type; +#else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; +#endif } return &swigpypacked_type; } @@ -1976,14 +2171,20 @@ SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) * pointers/data manipulation * ----------------------------------------------------------------------------- */ -static PyObject *Swig_This_global = NULL; +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { - if (Swig_This_global == NULL) - Swig_This_global = SWIG_Python_str_FromChar("this"); - return Swig_This_global; + if (swig_this == NULL) + swig_this = _SWIG_This(); + return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ @@ -2015,7 +2216,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) obj = 0; -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { @@ -2078,14 +2279,13 @@ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; if (!obj) return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { + if (obj == Py_None) { if (ptr) *ptr = 0; - return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; + return SWIG_OK; } res = SWIG_ERROR; @@ -2131,7 +2331,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } res = SWIG_OK; } else { - if (implicit_conv) { + if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; @@ -2165,13 +2365,6 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } } } return res; @@ -2185,28 +2378,31 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; - swig_cast_info *tc; - + /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) + if (!desc) return SWIG_ERROR; - tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } } else { - return SWIG_ERROR; + *ptr = vptr; } return SWIG_OK; } } -/* Convert a packed pointer value */ +/* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { @@ -2234,6 +2430,7 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { +#if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { @@ -2250,30 +2447,16 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) } } #else - if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); - inst = 0; - } + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 - PyObject *empty_args = PyTuple_New(0); - if (empty_args) { - PyObject *empty_kwargs = PyDict_New(); - if (empty_kwargs) { - inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); - if (inst) { - if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); - inst = 0; - } else { - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } - } - } - Py_DECREF(empty_args); + inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + if (inst) { + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } #else PyObject *dict = PyDict_New(); @@ -2285,23 +2468,59 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) #endif } return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst = 0; + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif } -SWIGRUNTIME int +SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - return PyDict_SetItem(dict, SWIG_This(), swig_this); - } + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } #endif - return PyObject_SetAttr(inst, SWIG_This(), swig_this); + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); } @@ -2315,8 +2534,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { - if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) - return NULL; + SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } @@ -2345,21 +2563,18 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif return (PyObject*) newobj; } return SWIG_Py_Void(); @@ -2399,7 +2614,12 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else +# ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); +# else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); +# endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; @@ -2409,10 +2629,50 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { return (swig_module_info *) type_pointer; } +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + SWIGRUNTIME void +#ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) +#else +SWIG_Python_DestroyModule(void *vptr) +#endif { +#ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); +#else + swig_module_info *swig_module = (swig_module_info *) vptr; +#endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { @@ -2423,24 +2683,33 @@ SWIG_Python_DestroyModule(PyObject *obj) } } Py_DECREF(SWIG_This()); - Swig_This_global = NULL; + swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif +#ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { - PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#else + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } +#endif } /* The python cached type query */ @@ -2458,12 +2727,20 @@ SWIG_Python_TypeQuery(const char *type) PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { +#ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); +#else + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); +#endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { +#ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); +#else + obj = PyCObject_FromVoidPtr(descriptor, NULL); +#endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } @@ -2488,15 +2765,14 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { + char *tmp; PyObject *old_str = PyObject_Str(value); - const char *tmp = SWIG_Python_str_AsChar(old_str); - const char *errmesg = tmp ? tmp : "Invalid error message"; Py_XINCREF(type); PyErr_Clear(); if (infront) { - PyErr_Format(type, "%s %s", mesg, errmesg); + PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { - PyErr_Format(type, "%s %s", errmesg, mesg); + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); @@ -2589,7 +2865,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyObject *descr; PyObject *encoded_name; descrsetfunc f; - int res = -1; + int res; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { @@ -2612,6 +2888,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { goto done; } + res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) @@ -2622,8 +2899,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); - if (!encoded_name) - return -1; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); @@ -2642,34 +2917,209 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { } #endif -#ifdef __cplusplus -extern "C" { -#endif +#define SWIGPY_UNARYFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a) { \ + return wrapper(a, NULL); \ +} -SWIGINTERN Py_hash_t -SwigPyObject_hash(PyObject *obj) { - SwigPyObject *sobj = (SwigPyObject *)obj; - void *ptr = sobj->ptr; - return (Py_hash_t)ptr; +#define SWIGPY_DESTRUCTOR_CLOSURE(wrapper) \ +SWIGINTERN void \ +wrapper##_closure(PyObject *a) { \ + SwigPyObject *sobj; \ + sobj = (SwigPyObject *)a; \ + if (sobj->own) { \ + PyObject *o = wrapper(a, NULL); \ + Py_XDECREF(o); \ + } \ + PyObject_Del(a); \ } -SWIGINTERN Py_hash_t -SWIG_PyNumber_AsPyHash(PyObject *obj) { - Py_hash_t result = -1; -#if PY_VERSION_HEX < 0x03020000 - if (PyInt_Check(obj)) - result = PyInt_AsLong(obj); - else if (PyLong_Check(obj)) - result = PyLong_AsLong(obj); -#else - if (PyNumber_Check(obj)) - result = PyNumber_AsSsize_t(obj, NULL); -#endif - else - PyErr_Format(PyExc_TypeError, "Wrong type for hash function"); - return PyErr_Occurred() ? -1 : result; +#define SWIGPY_INQUIRY_CLOSURE(wrapper) \ +SWIGINTERN int \ +wrapper##_closure(PyObject *a) { \ + PyObject *pyresult; \ + int result; \ + pyresult = wrapper(a, NULL); \ + result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; \ + Py_XDECREF(pyresult); \ + return result; \ +} + +#define SWIGPY_BINARYFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a, PyObject *b) { \ + PyObject *tuple, *result; \ + tuple = PyTuple_New(1); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, b); \ + Py_XINCREF(b); \ + result = wrapper(a, tuple); \ + Py_DECREF(tuple); \ + return result; \ +} + +typedef ternaryfunc ternarycallfunc; + +#define SWIGPY_TERNARYFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \ + PyObject *tuple, *result; \ + tuple = PyTuple_New(2); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, b); \ + PyTuple_SET_ITEM(tuple, 1, c); \ + Py_XINCREF(b); \ + Py_XINCREF(c); \ + result = wrapper(a, tuple); \ + Py_DECREF(tuple); \ + return result; \ +} + +#define SWIGPY_TERNARYCALLFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *callable_object, PyObject *args, PyObject *) { \ + return wrapper(callable_object, args); \ +} + +#define SWIGPY_LENFUNC_CLOSURE(wrapper) \ +SWIGINTERN Py_ssize_t \ +wrapper##_closure(PyObject *a) { \ + PyObject *resultobj; \ + Py_ssize_t result; \ + resultobj = wrapper(a, NULL); \ + result = PyNumber_AsSsize_t(resultobj, NULL); \ + Py_DECREF(resultobj); \ + return result; \ +} + +#define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \ + PyObject *tuple, *result; \ + tuple = PyTuple_New(2); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \ + PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); \ + result = wrapper(a, tuple); \ + Py_DECREF(tuple); \ + return result; \ +} + +#define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper) \ +SWIGINTERN int \ +wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \ + PyObject *tuple, *resultobj; \ + int result; \ + tuple = PyTuple_New(d ? 3 : 2); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \ + PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); \ + if (d) { \ + PyTuple_SET_ITEM(tuple, 2, d); \ + Py_INCREF(d); \ + } \ + resultobj = wrapper(a, tuple); \ + result = resultobj ? 0 : -1; \ + Py_DECREF(tuple); \ + Py_XDECREF(resultobj); \ + return result; \ +} + +#define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a, Py_ssize_t b) { \ + PyObject *tuple, *result; \ + tuple = PyTuple_New(1); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \ + result = wrapper(a, tuple); \ + Py_DECREF(tuple); \ + return result; \ +} + +#define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a, Py_ssize_t b) { \ + PyObject *arg, *result; \ + arg = _PyLong_FromSsize_t(b); \ + result = wrapper(a, arg); \ + Py_DECREF(arg); \ + return result; \ +} + +#define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper) \ +SWIGINTERN int \ +wrapper##_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \ + PyObject *tuple, *resultobj; \ + int result; \ + tuple = PyTuple_New(2); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \ + PyTuple_SET_ITEM(tuple, 1, c); \ + Py_XINCREF(c); \ + resultobj = wrapper(a, tuple); \ + result = resultobj ? 0 : -1; \ + Py_XDECREF(resultobj); \ + Py_DECREF(tuple); \ + return result; \ +} + +#define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper) \ +SWIGINTERN int \ +wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \ + PyObject *tuple, *resultobj; \ + int result; \ + tuple = PyTuple_New(c ? 2 : 1); \ + assert(tuple); \ + PyTuple_SET_ITEM(tuple, 0, b); \ + Py_XINCREF(b); \ + if (c) { \ + PyTuple_SET_ITEM(tuple, 1, c); \ + Py_XINCREF(c); \ + } \ + resultobj = wrapper(a, tuple); \ + result = resultobj ? 0 : -1; \ + Py_XDECREF(resultobj); \ + Py_DECREF(tuple); \ + return result; \ +} + +#define SWIGPY_REPRFUNC_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a) { \ + return wrapper(a, NULL); \ +} + +#define SWIGPY_HASHFUNC_CLOSURE(wrapper) \ +SWIGINTERN long \ +wrapper##_closure(PyObject *a) { \ + PyObject *pyresult; \ + long result; \ + pyresult = wrapper(a, NULL); \ + if (!pyresult || !PyLong_Check(pyresult)) \ + return -1; \ + result = PyLong_AsLong(pyresult); \ + Py_DECREF(pyresult); \ + return result; \ +} + +#define SWIGPY_ITERNEXT_CLOSURE(wrapper) \ +SWIGINTERN PyObject * \ +wrapper##_closure(PyObject *a) { \ + PyObject *result; \ + result = wrapper(a, NULL); \ + if (result && result == Py_None) { \ + Py_DECREF(result); \ + result = NULL; \ + } \ + return result; \ } +#ifdef __cplusplus +extern "C" { +#endif + SWIGINTERN int SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) { PyErr_Format(PyExc_TypeError, "Cannot create new instances of type '%.300s'", self->ob_type->tp_name); @@ -2677,10 +3127,11 @@ SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject * } SWIGINTERN void -SwigPyBuiltin_BadDealloc(PyObject *obj) { - SwigPyObject *sobj = (SwigPyObject *)obj; +SwigPyBuiltin_BadDealloc(PyObject *pyobj) { + SwigPyObject *sobj; + sobj = (SwigPyObject *)pyobj; if (sobj->own) { - PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", obj->ob_type->tp_name); + PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", pyobj->ob_type->tp_name); } } @@ -2733,8 +3184,8 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); + Py_XINCREF(val); result = (*getset->set)(obj, tuple); Py_DECREF(tuple); Py_XDECREF(result); @@ -2761,7 +3212,7 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { - PyObject_GC_UnTrack(descr); + _PyObject_GC_UNTRACK(descr); Py_XDECREF(PyDescr_TYPE(descr)); Py_XDECREF(PyDescr_NAME(descr)); PyObject_GC_Del(descr); @@ -2810,13 +3261,9 @@ SwigPyStaticVar_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *value) } SWIGINTERN int -SwigPyObjectType_setattro(PyObject *typeobject, PyObject *name, PyObject *value) { +SwigPyObjectType_setattro(PyTypeObject *type, PyObject *name, PyObject *value) { PyObject *attribute; - PyTypeObject *type; descrsetfunc local_set; - - assert(PyType_Check(typeobject)); - type = (PyTypeObject *)typeobject; attribute = _PyType_Lookup(type, name); if (attribute != NULL) { /* Implement descriptor functionality, if any */ @@ -2845,15 +3292,16 @@ SwigPyStaticVar_Type(void) { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(&PyType_Type) - 0, /* ob_size */ + 0, #endif - "swig_static_var_getset_descriptor", /* tp_name */ - sizeof(PyGetSetDescrObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "swig_static_var_getset_descriptor", + sizeof(PyGetSetDescrObject), + 0, (destructor)SwigPyStaticVar_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ @@ -2895,116 +3343,26 @@ SwigPyStaticVar_Type(void) { 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ +#if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ #endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; staticvar_type = tmp; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + staticvar_type.ob_type = &PyType_Type; +#else if (PyType_Ready(&staticvar_type) < 0) return NULL; - } - return &staticvar_type; -} - -SWIGINTERN PyTypeObject* -SwigPyObjectType(void) { - static char swigpyobjecttype_doc[] = "Metaclass for SWIG wrapped types"; - static PyTypeObject swigpyobjecttype_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(&PyType_Type) - 0, /* ob_size */ -#endif - "SwigPyObjectType", /* tp_name */ - PyType_Type.tp_basicsize, /* tp_basicsize */ - 0, /* tp_itemsize */ - 0, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_compare */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - SwigPyObjectType_setattro, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */ - swigpyobjecttype_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ #endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ -#endif - }; - swigpyobjecttype_type = tmp; - type_init = 1; - swigpyobjecttype_type.tp_base = &PyType_Type; - if (PyType_Ready(&swigpyobjecttype_type) < 0) - return NULL; } - return &swigpyobjecttype_type; + return &staticvar_type; } SWIGINTERN PyGetSetDescrObject * @@ -3026,10 +3384,10 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { SWIGINTERN void SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { - Py_ssize_t base_count = 0; + int base_count = 0; PyTypeObject **b; PyObject *tuple; - Py_ssize_t i; + int i; if (!bases[0]) { bases[0] = SwigPyObject_type(); @@ -3041,8 +3399,8 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); + Py_INCREF((PyObject *)bases[i]); } type->tp_bases = tuple; } @@ -3065,360 +3423,20 @@ SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype) #endif } - -/* Start of callback function macros for use in PyTypeObject */ - -typedef PyObject *(*SwigPyWrapperFunction)(PyObject *, PyObject *); - -#define SWIGPY_UNARYFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_unaryfunc_closure(PyObject *a) { \ - return SwigPyBuiltin_unaryfunc_closure(wrapper, a); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - return wrapper(a, NULL); +#ifdef __cplusplus } +#endif -#define SWIGPY_DESTRUCTOR_CLOSURE(wrapper) \ -SWIGINTERN void \ -wrapper##_destructor_closure(PyObject *a) { \ - SwigPyBuiltin_destructor_closure(wrapper, #wrapper, a); \ -} -SWIGINTERN void -SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { - SwigPyObject *sobj; - sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); - if (sobj->own) { - PyObject *o; - PyObject *type = 0, *value = 0, *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - o = wrapper(a, NULL); - if (!o) { - PyObject *deallocname = PyString_FromString(wrappername); - PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); - } - PyErr_Restore(type, value, traceback); - Py_XDECREF(o); - } - if (PyType_IS_GC(a->ob_type)) { - PyObject_GC_Del(a); - } else { - PyObject_Del(a); - } -} -#define SWIGPY_INQUIRY_CLOSURE(wrapper) \ -SWIGINTERN int \ -wrapper##_inquiry_closure(PyObject *a) { \ - return SwigPyBuiltin_inquiry_closure(wrapper, a); \ -} -SWIGINTERN int -SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - PyObject *pyresult; - int result; - pyresult = wrapper(a, NULL); - result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); - return result; -} -#define SWIGPY_GETITERFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_getiterfunc_closure(PyObject *a) { \ - return SwigPyBuiltin_getiterfunc_closure(wrapper, a); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - return wrapper(a, NULL); -} -#define SWIGPY_BINARYFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_binaryfunc_closure(PyObject *a, PyObject *b) { \ - return SwigPyBuiltin_binaryfunc_closure(wrapper, a, b); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) { - PyObject *tuple, *result; - tuple = PyTuple_New(1); - assert(tuple); - Py_INCREF(b); - PyTuple_SET_ITEM(tuple, 0, b); - result = wrapper(a, tuple); - Py_DECREF(tuple); - return result; -} +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) -typedef ternaryfunc ternarycallfunc; +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else -#define SWIGPY_TERNARYFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_ternaryfunc_closure(PyObject *a, PyObject *b, PyObject *c) { \ - return SwigPyBuiltin_ternaryfunc_closure(wrapper, a, b, c); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) { - PyObject *tuple, *result; - tuple = PyTuple_New(2); - assert(tuple); - Py_INCREF(b); - PyTuple_SET_ITEM(tuple, 0, b); - Py_INCREF(c); - PyTuple_SET_ITEM(tuple, 1, c); - result = wrapper(a, tuple); - Py_DECREF(tuple); - return result; -} -#define SWIGPY_TERNARYCALLFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_ternarycallfunc_closure(PyObject *a, PyObject *b, PyObject *c) { \ - return SwigPyBuiltin_ternarycallfunc_closure(wrapper, a, b, c); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) { - (void) c; - return wrapper(a, b); -} -#define SWIGPY_LENFUNC_CLOSURE(wrapper) \ -SWIGINTERN Py_ssize_t \ -wrapper##_lenfunc_closure(PyObject *a) { \ - return SwigPyBuiltin_lenfunc_closure(wrapper, a); \ -} -SWIGINTERN Py_ssize_t -SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - PyObject *resultobj; - Py_ssize_t result; - resultobj = wrapper(a, NULL); - result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); - return result; -} - -#define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_ssizessizeargfunc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \ - return SwigPyBuiltin_ssizessizeargfunc_closure(wrapper, a, b, c); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c) { - PyObject *tuple, *result; - tuple = PyTuple_New(2); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); - PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); - result = wrapper(a, tuple); - Py_DECREF(tuple); - return result; -} - -#define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper) \ -SWIGINTERN int \ -wrapper##_ssizessizeobjargproc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \ - return SwigPyBuiltin_ssizessizeobjargproc_closure(wrapper, a, b, c, d); \ -} -SWIGINTERN int -SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { - PyObject *tuple, *resultobj; - int result; - tuple = PyTuple_New(d ? 3 : 2); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); - PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); - if (d) { - Py_INCREF(d); - PyTuple_SET_ITEM(tuple, 2, d); - } - resultobj = wrapper(a, tuple); - result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); - return result; -} - -#define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) { \ - return SwigPyBuiltin_funpack_ssizeargfunc_closure(wrapper, a, b); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) { - PyObject *tuple, *result; - tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); - result = wrapper(a, tuple); - Py_DECREF(tuple); - return result; -} - -#define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) { \ - return SwigPyBuiltin_ssizeargfunc_closure(wrapper, a, b); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) { - PyObject *arg, *result; - arg = _PyLong_FromSsize_t(b); - result = wrapper(a, arg); - Py_DECREF(arg); - return result; -} - -#define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper) \ -SWIGINTERN int \ -wrapper##_ssizeobjargproc_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \ - return SwigPyBuiltin_ssizeobjargproc_closure(wrapper, a, b, c); \ -} -SWIGINTERN int -SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, PyObject *c) { - PyObject *tuple, *resultobj; - int result; - tuple = PyTuple_New(2); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); - Py_INCREF(c); - PyTuple_SET_ITEM(tuple, 1, c); - resultobj = wrapper(a, tuple); - result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); - return result; -} - -#define SWIGPY_OBJOBJPROC_CLOSURE(wrapper) \ -SWIGINTERN int \ -wrapper##_objobjproc_closure(PyObject *a, PyObject *b) { \ - return SwigPyBuiltin_objobjproc_closure(wrapper, a, b); \ -} -SWIGINTERN int -SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) { - int result; - PyObject *pyresult; - PyObject *tuple; - tuple = PyTuple_New(1); - assert(tuple); - Py_INCREF(b); - PyTuple_SET_ITEM(tuple, 0, b); - pyresult = wrapper(a, tuple); - result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); - return result; -} - -#define SWIGPY_FUNPACK_OBJOBJPROC_CLOSURE(wrapper) \ -SWIGINTERN int \ -wrapper##_objobjproc_closure(PyObject *a, PyObject *b) { \ - return SwigPyBuiltin_funpack_objobjproc_closure(wrapper, a, b); \ -} -SWIGINTERN int -SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) { - int result; - PyObject *pyresult; - pyresult = wrapper(a, b); - result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - return result; -} - -#define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper) \ -SWIGINTERN int \ -wrapper##_objobjargproc_closure(PyObject *a, PyObject *b, PyObject *c) { \ - return SwigPyBuiltin_objobjargproc_closure(wrapper, a, b, c); \ -} -SWIGINTERN int -SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) { - PyObject *tuple, *resultobj; - int result; - tuple = PyTuple_New(c ? 2 : 1); - assert(tuple); - Py_INCREF(b); - PyTuple_SET_ITEM(tuple, 0, b); - if (c) { - Py_INCREF(c); - PyTuple_SET_ITEM(tuple, 1, c); - } - resultobj = wrapper(a, tuple); - result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); - return result; -} - -#define SWIGPY_REPRFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_reprfunc_closure(PyObject *a) { \ - return SwigPyBuiltin_reprfunc_closure(wrapper, a); \ -} -SWIGINTERN PyObject * -SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - return wrapper(a, NULL); -} - -#define SWIGPY_HASHFUNC_CLOSURE(wrapper) \ -SWIGINTERN Py_hash_t \ -wrapper##_hashfunc_closure(PyObject *a) { \ - return SwigPyBuiltin_hashfunc_closure(wrapper, a); \ -} -SWIGINTERN Py_hash_t -SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - PyObject *pyresult; - Py_hash_t result; - pyresult = wrapper(a, NULL); - if (!pyresult) - return -1; - result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); - return result; -} - -#define SWIGPY_ITERNEXTFUNC_CLOSURE(wrapper) \ -SWIGINTERN PyObject * \ -wrapper##_iternextfunc_closure(PyObject *a) { \ - return SwigPyBuiltin_iternextfunc_closure(wrapper, a);\ -} -SWIGINTERN PyObject * -SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { - return wrapper(a, NULL); -} - -/* End of callback function macros for use in PyTypeObject */ - -#ifdef __cplusplus -} -#endif - - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Method creation and docstring support functions */ - -SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); -SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); -SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); - -#ifdef __cplusplus -} -#endif - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ @@ -3464,59 +3482,44 @@ SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyO #define SWIGTYPE_p_X509_REQ swig_types[38] #define SWIGTYPE_p_X509_STORE swig_types[39] #define SWIGTYPE_p_X509_STORE_CTX swig_types[40] -#define SWIGTYPE_p___INTMAX_TYPE__ swig_types[41] -#define SWIGTYPE_p___INT_FAST16_TYPE__ swig_types[42] -#define SWIGTYPE_p___INT_FAST32_TYPE__ swig_types[43] -#define SWIGTYPE_p___INT_FAST64_TYPE__ swig_types[44] -#define SWIGTYPE_p___INT_FAST8_TYPE__ swig_types[45] -#define SWIGTYPE_p___INT_LEAST16_TYPE__ swig_types[46] -#define SWIGTYPE_p___INT_LEAST32_TYPE__ swig_types[47] -#define SWIGTYPE_p___INT_LEAST64_TYPE__ swig_types[48] -#define SWIGTYPE_p___INT_LEAST8_TYPE__ swig_types[49] -#define SWIGTYPE_p___UINTMAX_TYPE__ swig_types[50] -#define SWIGTYPE_p___UINT_FAST16_TYPE__ swig_types[51] -#define SWIGTYPE_p___UINT_FAST32_TYPE__ swig_types[52] -#define SWIGTYPE_p___UINT_FAST64_TYPE__ swig_types[53] -#define SWIGTYPE_p___UINT_FAST8_TYPE__ swig_types[54] -#define SWIGTYPE_p___UINT_LEAST16_TYPE__ swig_types[55] -#define SWIGTYPE_p___UINT_LEAST32_TYPE__ swig_types[56] -#define SWIGTYPE_p___UINT_LEAST64_TYPE__ swig_types[57] -#define SWIGTYPE_p___UINT_LEAST8_TYPE__ swig_types[58] -#define SWIGTYPE_p__cbd_t swig_types[59] -#define SWIGTYPE_p_char swig_types[60] -#define SWIGTYPE_p_f_int_p_X509_STORE_CTX__int swig_types[61] -#define SWIGTYPE_p_f_p_char__void swig_types[62] -#define SWIGTYPE_p_f_p_q_const__char__p_char swig_types[63] -#define SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int swig_types[64] -#define SWIGTYPE_p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int swig_types[65] -#define SWIGTYPE_p_f_p_q_const__void__p_void swig_types[66] -#define SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int swig_types[67] -#define SWIGTYPE_p_f_p_void__void swig_types[68] -#define SWIGTYPE_p_p_ASN1_OBJECT swig_types[69] -#define SWIGTYPE_p_p_EVP_PKEY_CTX swig_types[70] -#define SWIGTYPE_p_p_X509_NAME_ENTRY swig_types[71] -#define SWIGTYPE_p_p_unsigned_char swig_types[72] -#define SWIGTYPE_p_pyfd_struct swig_types[73] -#define SWIGTYPE_p_stack_st swig_types[74] -#define SWIGTYPE_p_stack_st_OPENSSL_BLOCK swig_types[75] -#define SWIGTYPE_p_stack_st_OPENSSL_CSTRING swig_types[76] -#define SWIGTYPE_p_stack_st_OPENSSL_STRING swig_types[77] -#define SWIGTYPE_p_stack_st_SSL_CIPHER swig_types[78] -#define SWIGTYPE_p_stack_st_X509 swig_types[79] -#define SWIGTYPE_p_stack_st_X509_EXTENSION swig_types[80] -#define SWIGTYPE_p_unsigned_char swig_types[81] -#define SWIGTYPE_p_void swig_types[82] -static swig_type_info *swig_types[84]; -static swig_module_info swig_module = {swig_types, 83, 0, 0, 0, 0}; +#define SWIGTYPE_p__cbd_t swig_types[41] +#define SWIGTYPE_p_char swig_types[42] +#define SWIGTYPE_p_f_int_p_X509_STORE_CTX__int swig_types[43] +#define SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int swig_types[44] +#define SWIGTYPE_p_f_p_void__p_void swig_types[45] +#define SWIGTYPE_p_f_p_void__void swig_types[46] +#define SWIGTYPE_p_p_ASN1_OBJECT swig_types[47] +#define SWIGTYPE_p_p_EVP_PKEY_CTX swig_types[48] +#define SWIGTYPE_p_p_X509_NAME_ENTRY swig_types[49] +#define SWIGTYPE_p_p_char swig_types[50] +#define SWIGTYPE_p_p_unsigned_char swig_types[51] +#define SWIGTYPE_p_pyfd_struct swig_types[52] +#define SWIGTYPE_p_stack_st swig_types[53] +#define SWIGTYPE_p_stack_st_OPENSSL_BLOCK swig_types[54] +#define SWIGTYPE_p_stack_st_OPENSSL_STRING swig_types[55] +#define SWIGTYPE_p_stack_st_SSL_CIPHER swig_types[56] +#define SWIGTYPE_p_stack_st_X509 swig_types[57] +#define SWIGTYPE_p_stack_st_X509_EXTENSION swig_types[58] +#define SWIGTYPE_p_unsigned_char swig_types[59] +#define SWIGTYPE_p_void swig_types[60] +static swig_type_info *swig_types[62]; +static swig_module_info swig_module = {swig_types, 61, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ -#ifdef SWIG_TypeQuery -# undef SWIG_TypeQuery +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodern' option" +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodernargs' option" #endif -#define SWIG_TypeQuery SWIG_Python_TypeQuery /*----------------------------------------------- @(target):= _m2crypto.so @@ -3530,7 +3533,7 @@ static swig_module_info swig_module = {swig_types, 83, 0, 0, 0, 0}; #endif #define SWIG_name "_m2crypto" -#define SWIGVERSION 0x040002 +#define SWIGVERSION 0x020010 #define SWIG_VERSION SWIGVERSION @@ -3538,9 +3541,6 @@ static swig_module_info swig_module = {swig_types, 83, 0, 0, 0, 0}; #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) -#include - - int SWIG_AsVal_wchar_t(PyObject *p, wchar_t *c) { return SWIG_OK; } PyObject *SWIG_From_wchar_t(wchar_t c) { return SWIG_Py_Void(); } @@ -3574,7 +3574,7 @@ static PyObject *ssl_set_tmp_rsa_cb_func; static PyObject *x509_store_verify_cb_func; - #define SWIG_From_long PyInt_FromLong + #define SWIG_From_long PyLong_FromLong SWIGINTERN swig_type_info* @@ -3600,13 +3600,9 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); -#else - return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); -#endif + return PyUnicode_FromStringAndSize(carray, (int)(size)); #else - return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); + return PyString_FromStringAndSize(carray, (int)(size)); #endif } } else { @@ -3622,13 +3618,6 @@ SWIG_FromCharPtr(const char *cptr) } -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) @@ -3646,11 +3635,9 @@ SWIG_AsVal_double (PyObject *obj, double *val) if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; -#if PY_VERSION_HEX < 0x03000000 } else if (PyInt_Check(obj)) { - if (val) *val = (double) PyInt_AsLong(obj); + if (val) *val = PyInt_AsLong(obj); return SWIG_OK; -#endif } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { @@ -3724,20 +3711,16 @@ SWIG_CanCastAsInteger(double *d, double min, double max) { SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { -#if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; - } else -#endif - if (PyLong_Check(obj)) { + } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); - return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE @@ -3780,118 +3763,13 @@ SWIG_AsVal_int (PyObject * obj, int *val) } -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) { -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; - int ret = SWIG_OK; -#if PY_VERSION_HEX>=0x03000000 -#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (!obj) - return SWIG_TypeError; - if (alloc) - *alloc = SWIG_NEWOBJ; -#endif - if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#else - if (PyString_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#endif - if (cptr) { - if (alloc) { - if (*alloc == SWIG_NEWOBJ) { - *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - *alloc = SWIG_NEWOBJ; - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - *cptr = PyBytes_AsString(obj); -#else - assert(0); /* Should never reach here with Unicode strings in Python 3 */ -#endif -#else - *cptr = SWIG_Python_str_AsChar(obj); - if (!*cptr) - ret = SWIG_TypeError; -#endif - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return ret; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (!obj) - return SWIG_TypeError; - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; + return PyInt_FromLong((long) value); } - - - #include #include @@ -4556,7 +4434,6 @@ static int m2_PyObject_AsReadBuffer(PyObject * obj, const void **buffer, Py_ssize_t * buffer_len) { - int ret = 0; Py_ssize_t len = 0; Py_buffer view; @@ -4566,8 +4443,8 @@ m2_PyObject_AsReadBuffer(PyObject * obj, const void **buffer, len = view.len; } } else { - if ((ret = PyObject_AsReadBuffer(obj, buffer, &len)) != 0) - return ret; + PyErr_SetString(PyExc_TypeError, "expected a readable buffer object"); + return -1; } if (len > INT_MAX) { m2_PyBuffer_Release(obj, &view); @@ -4600,11 +4477,8 @@ static int m2_PyObject_GetBufferInt(PyObject *obj, Py_buffer *view, int flags) if (PyObject_CheckBuffer(obj)) ret = PyObject_GetBuffer(obj, view, flags); else { - const void *buf; - - ret = PyObject_AsReadBuffer(obj, &buf, &view->len); - if (ret == 0) - view->buf = (void *)buf; + PyErr_SetString(PyExc_TypeError, "expected a readable buffer object"); + return -1; } if (ret) return ret; @@ -5061,7 +4935,7 @@ BIGNUM *hex_to_bn(PyObject *value) { } } else { - if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1) + if (m2_PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1) return NULL; } @@ -5093,7 +4967,7 @@ BIGNUM *dec_to_bn(PyObject *value) { } } else { - if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1) + if (m2_PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1) return NULL; } @@ -5117,7 +4991,7 @@ SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); + PyLong_FromUnsignedLong(value) : PyLong_FromLong((long)(value)); } @@ -5142,7 +5016,18 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) return SWIG_OK; } else { PyErr_Clear(); - return SWIG_OverflowError; +#if PY_VERSION_HEX >= 0x03000000 + { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (v < 0) { + return SWIG_OverflowError; + } + } else { + PyErr_Clear(); + } + } +#endif } } #ifdef SWIG_PYTHON_CAST_MODE @@ -5328,59 +5213,138 @@ int bio_reset(BIO *bio) { } -int bio_flush(BIO *bio) { - return (int)BIO_flush(bio); -} - -int bio_seek(BIO *bio, int offset) { - return (int)BIO_seek(bio, offset); -} - -int bio_tell(BIO* bio) { - return BIO_tell(bio); -} - -void bio_set_flags(BIO *bio, int flags) { - BIO_set_flags(bio, flags); -} - -int bio_get_flags(BIO *bio) { - return BIO_get_flags(bio); -} - -/* - * sets the cipher of BIO @param b to c using key @param key and IV @iv. - * @param enc should be set to 1 for encryption and zero to decryption. - * - */ -PyObject *bio_set_cipher(BIO *b, EVP_CIPHER *c, PyObject *key, PyObject *iv, int op) { - const void *kbuf, *ibuf; - Py_ssize_t klen, ilen; - - if ((PyObject_AsReadBuffer(key, &kbuf, &klen) == -1) - || (PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1)) - return NULL; - - BIO_set_cipher(b, (const EVP_CIPHER *)c, - (unsigned char *)kbuf, (unsigned char *)ibuf, op); - Py_RETURN_NONE; -} - -int bio_set_mem_eof_return(BIO *b, int v) { - return (int)BIO_set_mem_eof_return(b, v); -} - -int bio_get_fd(BIO *bio) { - return BIO_get_fd(bio, NULL); -} - - -int bio_do_handshake(BIO *bio) { - return BIO_do_handshake(bio); -} - -/* macro */ -int bio_make_bio_pair(BIO* b1, BIO* b2) { +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 + if (PyUnicode_Check(obj)) +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; +#if PY_VERSION_HEX>=0x03000000 + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + PyBytes_AsStringAndSize(obj, &cstr, &len); + if(alloc) *alloc = SWIG_NEWOBJ; +#else + PyString_AsStringAndSize(obj, &cstr, &len); +#endif + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. + + The default behavior is just to return the pointer value, + so, be careful. + */ +#if defined(SWIG_PYTHON_SAFE_CSTRINGS) + if (*alloc != SWIG_OLDOBJ) +#else + if (*alloc == SWIG_NEWOBJ) +#endif + { + *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); + *alloc = SWIG_NEWOBJ; + } + else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { + #if PY_VERSION_HEX>=0x03000000 + assert(0); /* Should never reach here in Python 3 */ + #endif + *cptr = SWIG_Python_str_AsChar(obj); + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 + Py_XDECREF(obj); +#endif + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + +int bio_flush(BIO *bio) { + return (int)BIO_flush(bio); +} + +int bio_seek(BIO *bio, int offset) { + return (int)BIO_seek(bio, offset); +} + +int bio_tell(BIO* bio) { + return BIO_tell(bio); +} + +void bio_set_flags(BIO *bio, int flags) { + BIO_set_flags(bio, flags); +} + +int bio_get_flags(BIO *bio) { + return BIO_get_flags(bio); +} + +/* + * sets the cipher of BIO @param b to c using key @param key and IV @iv. + * @param enc should be set to 1 for encryption and zero to decryption. + * + */ +PyObject *bio_set_cipher(BIO *b, EVP_CIPHER *c, PyObject *key, PyObject *iv, int op) { + const void *kbuf, *ibuf; + Py_ssize_t klen, ilen; + + if ((m2_PyObject_AsReadBuffer(key, &kbuf, &klen) == -1) + || (m2_PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1)) + return NULL; + + BIO_set_cipher(b, (const EVP_CIPHER *)c, + (unsigned char *)kbuf, (unsigned char *)ibuf, op); + Py_RETURN_NONE; +} + +int bio_set_mem_eof_return(BIO *b, int v) { + return (int)BIO_set_mem_eof_return(b, v); +} + +int bio_get_fd(BIO *bio) { + return BIO_get_fd(bio, NULL); +} + + +int bio_do_handshake(BIO *bio) { + return BIO_do_handshake(bio); +} + +/* macro */ +int bio_make_bio_pair(BIO* b1, BIO* b2) { return BIO_make_bio_pair(b1, b2); } @@ -5651,69 +5615,12 @@ BIO* BIO_new_pyfd(int fd, int close_flag) { } -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); - } - res = SWIG_TypeError; - } -#endif - return res; -} -#endif - - SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); - } -#endif + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); return res; } @@ -6762,7 +6669,7 @@ PyObject *rc4_update(RC4_KEY *key, PyObject *in) { Py_ssize_t len; void *out; - if (PyObject_AsReadBuffer(in, &buf, &len) == -1) + if (m2_PyObject_AsReadBuffer(in, &buf, &len) == -1) return NULL; if (!(out = PyMem_Malloc(len))) { @@ -9156,7 +9063,7 @@ PyObject *util_hex_to_string(PyObject *blob) { char *ret; Py_ssize_t len; - if (PyObject_AsReadBuffer(blob, &buf, &len) == -1) + if (m2_PyObject_AsReadBuffer(blob, &buf, &len) == -1) return NULL; ret = hex_to_string((unsigned char *)buf, len); @@ -9178,7 +9085,7 @@ PyObject *util_string_to_hex(PyObject *blob) { Py_ssize_t len0; long len; - if (PyObject_AsReadBuffer(blob, &buf, &len0) == -1) + if (m2_PyObject_AsReadBuffer(blob, &buf, &len0) == -1) return NULL; len = len0; @@ -9551,7 +9458,7 @@ EC_KEY* ec_key_from_pubkey_der(PyObject *pubkey) { const unsigned char *tempBuf; EC_KEY *keypair; - if (PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1) + if (m2_PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1) { return NULL; } @@ -9571,7 +9478,7 @@ EC_KEY* ec_key_from_pubkey_params(int nid, PyObject *pubkey) { const unsigned char *tempBuf; EC_KEY *keypair; - if (PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1) + if (m2_PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1) { return NULL; } @@ -9754,182 +9661,146 @@ PyObject *obj_obj2txt(const ASN1_OBJECT *obj, int no_name) #ifdef __cplusplus extern "C" { #endif -SWIGINTERN PyObject *_wrap_OPENSSL_sk_num(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_num" "', argument " "1"" of type '" "OPENSSL_STACK const *""'"); - } - arg1 = (OPENSSL_STACK *)(argp1); - result = (int)OPENSSL_sk_num((struct stack_st const *)arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_OPENSSL_sk_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_num_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - void *result = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"_STACK_num_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_value" "', argument " "1"" of type '" "OPENSSL_STACK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_num_set" "', argument " "1"" of type '" "struct stack_st *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (struct stack_st *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPENSSL_sk_value" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_STACK_num_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - result = (void *)OPENSSL_sk_value((struct stack_st const *)arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + if (arg1) (arg1)->num = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_num_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - int arg2 ; - void *arg3 = (void *) 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - PyObject *swig_obj[3] ; - void *result = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_set" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); - } - arg1 = (OPENSSL_STACK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPENSSL_sk_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - res3 = SWIG_ConvertPtr(swig_obj[2],SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OPENSSL_sk_set" "', argument " "3"" of type '" "void const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_num_get" "', argument " "1"" of type '" "struct stack_st *""'"); } - result = (void *)OPENSSL_sk_set(arg1,arg2,(void const *)arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + arg1 = (struct stack_st *)(argp1); + result = (int) ((arg1)->num); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_data_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_sk_compfunc arg1 = (OPENSSL_sk_compfunc) 0 ; - PyObject *swig_obj[1] ; - OPENSSL_STACK *result = 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; + char **arg2 = (char **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "OPENSSL_sk_new" "', argument " "1"" of type '" "OPENSSL_sk_compfunc""'"); - } + if(!PyArg_UnpackTuple(args,(char *)"_STACK_data_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_data_set" "', argument " "1"" of type '" "struct stack_st *""'"); } - result = (OPENSSL_STACK *)OPENSSL_sk_new(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + arg1 = (struct stack_st *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_STACK_data_set" "', argument " "2"" of type '" "char **""'"); + } + arg2 = (char **)(argp2); + if (arg1) (arg1)->data = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_new_null(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_data_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *result = 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char **result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_new_null", 0, 0, 0)) SWIG_fail; - result = (OPENSSL_STACK *)OPENSSL_sk_new_null(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_data_get" "', argument " "1"" of type '" "struct stack_st *""'"); + } + arg1 = (struct stack_st *)(argp1); + result = (char **) ((arg1)->data); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_new_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_sorted_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_sk_compfunc arg1 = (OPENSSL_sk_compfunc) 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - OPENSSL_STACK *result = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_new_reserve", 2, 2, swig_obj)) SWIG_fail; - { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "OPENSSL_sk_new_reserve" "', argument " "1"" of type '" "OPENSSL_sk_compfunc""'"); - } + if(!PyArg_UnpackTuple(args,(char *)"_STACK_sorted_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_sorted_set" "', argument " "1"" of type '" "struct stack_st *""'"); } - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (struct stack_st *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPENSSL_sk_new_reserve" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_STACK_sorted_set" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - result = (OPENSSL_STACK *)OPENSSL_sk_new_reserve(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + if (arg1) (arg1)->sorted = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_sorted_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - int arg2 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; int result; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_reserve" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_sorted_get" "', argument " "1"" of type '" "struct stack_st *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPENSSL_sk_reserve" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (int)OPENSSL_sk_reserve(arg1,arg2); + arg1 = (struct stack_st *)(argp1); + result = (int) ((arg1)->sorted); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: @@ -9937,21 +9808,28 @@ fail: } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_num_alloc_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"_STACK_num_alloc_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_free" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_num_alloc_set" "', argument " "1"" of type '" "struct stack_st *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - OPENSSL_sk_free(arg1); + arg1 = (struct stack_st *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_STACK_num_alloc_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (arg1) (arg1)->num_alloc = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -9959,157 +9837,151 @@ fail: } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_pop_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_num_alloc_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + int result; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_pop_free", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_pop_free" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); - } - arg1 = (OPENSSL_STACK *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "OPENSSL_sk_pop_free" "', argument " "2"" of type '" "void (*)(void *)""'"); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_num_alloc_get" "', argument " "1"" of type '" "struct stack_st *""'"); } - OPENSSL_sk_pop_free(arg1,arg2); - resultobj = SWIG_Py_Void(); + arg1 = (struct stack_st *)(argp1); + result = (int) ((arg1)->num_alloc); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_deep_copy(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_comp_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - OPENSSL_sk_copyfunc arg2 = (OPENSSL_sk_copyfunc) 0 ; - OPENSSL_sk_freefunc arg3 = (OPENSSL_sk_freefunc) 0 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; + int (*arg2)(void const *,void const *) = (int (*)(void const *,void const *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - OPENSSL_STACK *result = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_deep_copy", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"_STACK_comp_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_deep_copy" "', argument " "1"" of type '" "OPENSSL_STACK const *""'"); - } - arg1 = (OPENSSL_STACK *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__void__p_void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "OPENSSL_sk_deep_copy" "', argument " "2"" of type '" "OPENSSL_sk_copyfunc""'"); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_comp_set" "', argument " "1"" of type '" "struct stack_st *""'"); } + arg1 = (struct stack_st *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[2], (void**)(&arg3), SWIGTYPE_p_f_p_void__void); + int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "OPENSSL_sk_deep_copy" "', argument " "3"" of type '" "OPENSSL_sk_freefunc""'"); + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "_STACK_comp_set" "', argument " "2"" of type '" "int (*)(void const *,void const *)""'"); } } - result = (OPENSSL_STACK *)OPENSSL_sk_deep_copy((struct stack_st const *)arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + if (arg1) (arg1)->comp = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_insert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__STACK_comp_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; + struct stack_st *arg1 = (struct stack_st *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + int (*result)(void const *,void const *) = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_insert", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_insert" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); - } - arg1 = (OPENSSL_STACK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPENSSL_sk_insert" "', argument " "2"" of type '" "void const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_STACK_comp_get" "', argument " "1"" of type '" "struct stack_st *""'"); } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OPENSSL_sk_insert" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (int)OPENSSL_sk_insert(arg1,(void const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); + arg1 = (struct stack_st *)(argp1); + result = (int (*)(void const *,void const *)) ((arg1)->comp); + resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_delete(PyObject *self, PyObject *args) { +SWIGINTERN int _wrap_new__STACK(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - int arg2 ; + struct stack_st *result = 0 ; + + result = (struct stack_st *)calloc(1, sizeof(struct stack_st)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, SWIG_BUILTIN_INIT | 0 ); + return resultobj == Py_None ? -1 : 0; +fail: + return -1; +} + + +SWIGINTERN PyObject *_wrap_delete__STACK(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + struct stack_st *arg1 = (struct stack_st *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - void *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_delete", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_delete" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete__STACK" "', argument " "1"" of type '" "struct stack_st *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPENSSL_sk_delete" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (void *)OPENSSL_sk_delete(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + arg1 = (struct stack_st *)(argp1); + free((char *) arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_delete_ptr(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_num(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void *arg2 = (void *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_delete_ptr", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_num",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_delete_ptr" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_num" "', argument " "1"" of type '" "_STACK const *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPENSSL_sk_delete_ptr" "', argument " "2"" of type '" "void const *""'"); + arg1 = (_STACK *)(argp1); + result = (int)sk_num((struct stack_st const *)arg1); + resultobj = SWIG_From_int((int)(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_value(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + _STACK *arg1 = (_STACK *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + void *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"sk_value",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_value" "', argument " "1"" of type '" "_STACK const *""'"); } - result = (void *)OPENSSL_sk_delete_ptr(arg1,(void const *)arg2); + arg1 = (_STACK *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_value" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (void *)sk_value((struct stack_st const *)arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: @@ -10117,111 +9989,196 @@ fail: } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_find(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void *arg2 = (void *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + int arg2 ; + void *arg3 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; - int result; + int val2 ; + int ecode2 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + void *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_set",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_find" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_set" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPENSSL_sk_find" "', argument " "2"" of type '" "void const *""'"); + arg1 = (_STACK *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sk_set" "', argument " "3"" of type '" "void *""'"); } - result = (int)OPENSSL_sk_find(arg1,(void const *)arg2); - resultobj = SWIG_From_int((int)(result)); + result = (void *)sk_set(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_find_ex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void *arg2 = (void *) 0 ; + int (*arg1)(void const *,void const *) = (int (*)(void const *,void const *)) 0 ; + PyObject * obj0 = 0 ; + _STACK *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"sk_new",1,1,&obj0)) SWIG_fail; + { + int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_new" "', argument " "1"" of type '" "int (*)(void const *,void const *)""'"); + } + } + result = (_STACK *)sk_new(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_new_null(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + _STACK *result = 0 ; + + result = (_STACK *)sk_new_null(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + _STACK *arg1 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_find_ex", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_find_ex" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_free" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPENSSL_sk_find_ex" "', argument " "2"" of type '" "void const *""'"); + arg1 = (_STACK *)(argp1); + sk_free(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_pop_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + _STACK *arg1 = (_STACK *) 0 ; + void (*arg2)(void *) = (void (*)(void *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"sk_pop_free",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_pop_free" "', argument " "1"" of type '" "_STACK *""'"); } - result = (int)OPENSSL_sk_find_ex(arg1,(void const *)arg2); - resultobj = SWIG_From_int((int)(result)); + arg1 = (_STACK *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_pop_free" "', argument " "2"" of type '" "void (*)(void *)""'"); + } + } + sk_pop_free(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_deep_copy(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - void *arg2 = (void *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *(*arg2)(void *) = (void *(*)(void *)) 0 ; + void (*arg3)(void *) = (void (*)(void *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + _STACK *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_deep_copy",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_push" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_deep_copy" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPENSSL_sk_push" "', argument " "2"" of type '" "void const *""'"); + arg1 = (_STACK *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__p_void); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_deep_copy" "', argument " "2"" of type '" "void *(*)(void *)""'"); + } } - result = (int)OPENSSL_sk_push(arg1,(void const *)arg2); - resultobj = SWIG_From_int((int)(result)); + { + int res = SWIG_ConvertFunctionPtr(obj2, (void**)(&arg3), SWIGTYPE_p_f_p_void__void); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_deep_copy" "', argument " "3"" of type '" "void (*)(void *)""'"); + } + } + result = (_STACK *)sk_deep_copy(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_unshift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_insert(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; void *arg2 = (void *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_unshift", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_insert",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_unshift" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_insert" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); + arg1 = (_STACK *)(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPENSSL_sk_unshift" "', argument " "2"" of type '" "void const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_insert" "', argument " "2"" of type '" "void *""'"); } - result = (int)OPENSSL_sk_unshift(arg1,(void const *)arg2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sk_insert" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + result = (int)sk_insert(arg1,arg2,arg3); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: @@ -10229,22 +10186,30 @@ fail: } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_shift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_delete(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; void *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_delete",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_shift" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_delete" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - result = (void *)OPENSSL_sk_shift(arg1); + arg1 = (_STACK *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_delete" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (void *)sk_delete(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: @@ -10252,22 +10217,28 @@ fail: } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_delete_ptr(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; void *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_delete_ptr",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_pop" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_delete_ptr" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - result = (void *)OPENSSL_sk_pop(arg1); + arg1 = (_STACK *)(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_delete_ptr" "', argument " "2"" of type '" "void *""'"); + } + result = (void *)sk_delete_ptr(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: @@ -10275,265 +10246,275 @@ fail: } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_zero(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_find(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_find",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_zero" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_find" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - OPENSSL_sk_zero(arg1); - resultobj = SWIG_Py_Void(); + arg1 = (_STACK *)(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_find" "', argument " "2"" of type '" "void *""'"); + } + result = (int)sk_find(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_set_cmp_func(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_find_ex(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; - OPENSSL_sk_compfunc arg2 = (OPENSSL_sk_compfunc) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - OPENSSL_sk_compfunc result; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "OPENSSL_sk_set_cmp_func", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_find_ex",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_set_cmp_func" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_find_ex" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "OPENSSL_sk_set_cmp_func" "', argument " "2"" of type '" "OPENSSL_sk_compfunc""'"); - } + arg1 = (_STACK *)(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_find_ex" "', argument " "2"" of type '" "void *""'"); } - result = (OPENSSL_sk_compfunc)OPENSSL_sk_set_cmp_func(arg1,arg2); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); + result = (int)sk_find_ex(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_dup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_push(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - OPENSSL_STACK *result = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_push",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_dup" "', argument " "1"" of type '" "OPENSSL_STACK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_push" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - result = (OPENSSL_STACK *)OPENSSL_sk_dup((struct stack_st const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); + arg1 = (_STACK *)(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_push" "', argument " "2"" of type '" "void *""'"); + } + result = (int)sk_push(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_sort(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_unshift(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_unshift",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_sort" "', argument " "1"" of type '" "OPENSSL_STACK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_unshift" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - OPENSSL_sk_sort(arg1); - resultobj = SWIG_Py_Void(); + arg1 = (_STACK *)(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_unshift" "', argument " "2"" of type '" "void *""'"); + } + result = (int)sk_unshift(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_OPENSSL_sk_is_sorted(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_shift(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - OPENSSL_STACK *arg1 = (OPENSSL_STACK *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + void *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_shift",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPENSSL_sk_is_sorted" "', argument " "1"" of type '" "OPENSSL_STACK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_shift" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (OPENSSL_STACK *)(argp1); - result = (int)OPENSSL_sk_is_sorted((struct stack_st const *)arg1); - resultobj = SWIG_From_int((int)(result)); + arg1 = (_STACK *)(argp1); + result = (void *)sk_shift(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_num(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_pop(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; + _STACK *arg1 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + void *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_pop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_num" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_pop" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - result = (int)sk_OPENSSL_STRING_num((struct stack_st_OPENSSL_STRING const *)arg1); - resultobj = SWIG_From_int((int)(result)); + arg1 = (_STACK *)(argp1); + result = (void *)sk_pop(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_zero(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - int arg2 ; + _STACK *arg1 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_zero",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_value" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_zero" "', argument " "1"" of type '" "_STACK *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_STRING_value" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (char *)sk_OPENSSL_STRING_value((struct stack_st_OPENSSL_STRING const *)arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); + arg1 = (_STACK *)(argp1); + sk_zero(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_set_cmp_func(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - sk_OPENSSL_STRING_compfunc arg1 = (sk_OPENSSL_STRING_compfunc) 0 ; - PyObject *swig_obj[1] ; - struct stack_st_OPENSSL_STRING *result = 0 ; + _STACK *arg1 = (_STACK *) 0 ; + int (*arg2)(void const *,void const *) = (int (*)(void const *,void const *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int (*result)(void const *,void const *) = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if(!PyArg_UnpackTuple(args,(char *)"sk_set_cmp_func",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_set_cmp_func" "', argument " "1"" of type '" "_STACK *""'"); + } + arg1 = (_STACK *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); + int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_STRING_new" "', argument " "1"" of type '" "sk_OPENSSL_STRING_compfunc""'"); + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_set_cmp_func" "', argument " "2"" of type '" "int (*)(void const *,void const *)""'"); } } - result = (struct stack_st_OPENSSL_STRING *)sk_OPENSSL_STRING_new(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + result = (int (*)(void const *,void const *))sk_set_cmp_func(arg1,arg2); + resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__void_p_q_const__void__int); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_new_null(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_dup(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *result = 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + _STACK *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_new_null", 0, 0, 0)) SWIG_fail; - result = (struct stack_st_OPENSSL_STRING *)sk_OPENSSL_STRING_new_null(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_dup",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_dup" "', argument " "1"" of type '" "_STACK *""'"); + } + arg1 = (_STACK *)(argp1); + result = (_STACK *)sk_dup(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_new_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_sort(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - sk_OPENSSL_STRING_compfunc arg1 = (sk_OPENSSL_STRING_compfunc) 0 ; - int arg2 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - struct stack_st_OPENSSL_STRING *result = 0 ; + _STACK *arg1 = (_STACK *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_new_reserve", 2, 2, swig_obj)) SWIG_fail; - { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_STRING_new_reserve" "', argument " "1"" of type '" "sk_OPENSSL_STRING_compfunc""'"); - } + if(!PyArg_UnpackTuple(args,(char *)"sk_sort",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_sort" "', argument " "1"" of type '" "_STACK *""'"); } - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_STRING_new_reserve" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (struct stack_st_OPENSSL_STRING *)sk_OPENSSL_STRING_new_reserve(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + arg1 = (_STACK *)(argp1); + sk_sort(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_is_sorted(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - int arg2 ; + _STACK *arg1 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_is_sorted",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_reserve" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_is_sorted" "', argument " "1"" of type '" "_STACK const *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_STRING_reserve" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (int)sk_OPENSSL_STRING_reserve(arg1,arg2); + arg1 = (_STACK *)(argp1); + result = (int)sk_is_sorted((struct stack_st const *)arg1); resultobj = SWIG_From_int((int)(result)); return resultobj; fail: @@ -10541,21 +10522,28 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_stack_st_OPENSSL_STRING_stack_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; + _STACK *arg2 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"stack_st_OPENSSL_STRING_stack_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_free" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stack_st_OPENSSL_STRING_stack_set" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); } arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - sk_OPENSSL_STRING_free(arg1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_stack_st, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "stack_st_OPENSSL_STRING_stack_set" "', argument " "2"" of type '" "_STACK *""'"); + } + arg2 = (_STACK *)(argp2); + if (arg1) (arg1)->stack = *arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10563,224 +10551,152 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_zero(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_stack_st_OPENSSL_STRING_stack_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + _STACK *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_zero" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stack_st_OPENSSL_STRING_stack_get" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); } arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - sk_OPENSSL_STRING_zero(arg1); - resultobj = SWIG_Py_Void(); + result = (_STACK *)& ((arg1)->stack); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_delete(PyObject *self, PyObject *args) { +SWIGINTERN int _wrap_new_stack_st_OPENSSL_STRING(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + struct stack_st_OPENSSL_STRING *result = 0 ; + + result = (struct stack_st_OPENSSL_STRING *)calloc(1, sizeof(struct stack_st_OPENSSL_STRING)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_STRING, SWIG_BUILTIN_INIT | 0 ); + return resultobj == Py_None ? -1 : 0; +fail: + return -1; +} + + +SWIGINTERN PyObject *_wrap_delete_stack_st_OPENSSL_STRING(PyObject *self, PyObject *args) { PyObject *resultobj = 0; struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_delete", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_delete" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_stack_st_OPENSSL_STRING" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); } arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_STRING_delete" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (char *)sk_OPENSSL_STRING_delete(arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); + free((char *) arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_delete_ptr(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_stack_st_OPENSSL_BLOCK_stack_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - char *arg2 = (char *) 0 ; + struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + _STACK *arg2 = (_STACK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_delete_ptr", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"stack_st_OPENSSL_BLOCK_stack_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_delete_ptr" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stack_st_OPENSSL_BLOCK_stack_set" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_stack_st, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_STRING_delete_ptr" "', argument " "2"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "stack_st_OPENSSL_BLOCK_stack_set" "', argument " "2"" of type '" "_STACK *""'"); } - arg2 = (char *)(buf2); - result = (char *)sk_OPENSSL_STRING_delete_ptr(arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + arg2 = (_STACK *)(argp2); + if (arg1) (arg1)->stack = *arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_stack_st_OPENSSL_BLOCK_stack_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - char *arg2 = (char *) 0 ; + struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + _STACK *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_push" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_STRING_push" "', argument " "2"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stack_st_OPENSSL_BLOCK_stack_get" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_STRING_push(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); + result = (_STACK *)& ((arg1)->stack); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_unshift(PyObject *self, PyObject *args) { +SWIGINTERN int _wrap_new_stack_st_OPENSSL_BLOCK(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + struct stack_st_OPENSSL_BLOCK *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_unshift", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_unshift" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_STRING_unshift" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_STRING_unshift(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; + result = (struct stack_st_OPENSSL_BLOCK *)calloc(1, sizeof(struct stack_st_OPENSSL_BLOCK)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_BLOCK, SWIG_BUILTIN_INIT | 0 ); + return resultobj == Py_None ? -1 : 0; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; + return -1; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_stack_st_OPENSSL_BLOCK(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; + struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_pop" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_stack_st_OPENSSL_BLOCK" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - result = (char *)sk_OPENSSL_STRING_pop(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); + free((char *) arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_shift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_threading_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_shift" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - result = (char *)sk_OPENSSL_STRING_shift(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + threading_init(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_pop_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_threading_cleanup(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - sk_OPENSSL_STRING_freefunc arg2 = (sk_OPENSSL_STRING_freefunc) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_pop_free", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_pop_free" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_char__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_STRING_pop_free" "', argument " "2"" of type '" "sk_OPENSSL_STRING_freefunc""'"); - } - } - sk_OPENSSL_STRING_pop_free(arg1,arg2); + threading_cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10788,1334 +10704,1056 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_insert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_lib_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_insert", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_insert" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_STRING_insert" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sk_OPENSSL_STRING_insert" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (int)sk_OPENSSL_STRING_insert(arg1,arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + lib_init(); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bn_to_mpi(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; + BIGNUM *arg1 = (BIGNUM *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject *swig_obj[3] ; - char *result = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bn_to_mpi",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIGNUM, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_set" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_STRING_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sk_OPENSSL_STRING_set" "', argument " "3"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bn_to_mpi" "', argument " "1"" of type '" "BIGNUM const *""'"); } - arg3 = (char *)(buf3); - result = (char *)sk_OPENSSL_STRING_set(arg1,arg2,arg3); - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + arg1 = (BIGNUM *)(argp1); + result = (PyObject *)bn_to_mpi((BIGNUM const *)arg1); + resultobj = result; return resultobj; fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_find(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_mpi_to_bn(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + BIGNUM *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_find" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_STRING_find" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_STRING_find(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if(!PyArg_UnpackTuple(args,(char *)"mpi_to_bn",1,1,&obj0)) SWIG_fail; + arg1 = obj0; + result = (BIGNUM *)mpi_to_bn(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_find_ex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bn_to_bin(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - char *arg2 = (char *) 0 ; + BIGNUM *arg1 = (BIGNUM *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_find_ex", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bn_to_bin",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIGNUM, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_find_ex" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_STRING_find_ex" "', argument " "2"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bn_to_bin" "', argument " "1"" of type '" "BIGNUM *""'"); } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_STRING_find_ex(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + arg1 = (BIGNUM *)(argp1); + result = (PyObject *)bn_to_bin(arg1); + resultobj = result; return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_sort(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bin_to_bn(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + BIGNUM *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_sort" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - sk_OPENSSL_STRING_sort(arg1); - resultobj = SWIG_Py_Void(); + if(!PyArg_UnpackTuple(args,(char *)"bin_to_bn",1,1,&obj0)) SWIG_fail; + arg1 = obj0; + result = (BIGNUM *)bin_to_bn(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_is_sorted(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bn_to_hex(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; + BIGNUM *arg1 = (BIGNUM *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bn_to_hex",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIGNUM, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_is_sorted" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bn_to_hex" "', argument " "1"" of type '" "BIGNUM *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - result = (int)sk_OPENSSL_STRING_is_sorted((struct stack_st_OPENSSL_STRING const *)arg1); - resultobj = SWIG_From_int((int)(result)); + arg1 = (BIGNUM *)(argp1); + result = (PyObject *)bn_to_hex(arg1); + resultobj = result; return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_dup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hex_to_bn(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - struct stack_st_OPENSSL_STRING *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + BIGNUM *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_dup" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING const *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - result = (struct stack_st_OPENSSL_STRING *)sk_OPENSSL_STRING_dup((struct stack_st_OPENSSL_STRING const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"hex_to_bn",1,1,&obj0)) SWIG_fail; + arg1 = obj0; + result = (BIGNUM *)hex_to_bn(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_deep_copy(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dec_to_bn(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - sk_OPENSSL_STRING_copyfunc arg2 = (sk_OPENSSL_STRING_copyfunc) 0 ; - sk_OPENSSL_STRING_freefunc arg3 = (sk_OPENSSL_STRING_freefunc) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[3] ; - struct stack_st_OPENSSL_STRING *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + BIGNUM *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_deep_copy", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_deep_copy" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING const *""'"); - } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__char__p_char); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_STRING_deep_copy" "', argument " "2"" of type '" "sk_OPENSSL_STRING_copyfunc""'"); - } - } - { - int res = SWIG_ConvertFunctionPtr(swig_obj[2], (void**)(&arg3), SWIGTYPE_p_f_p_char__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_STRING_deep_copy" "', argument " "3"" of type '" "sk_OPENSSL_STRING_freefunc""'"); - } - } - result = (struct stack_st_OPENSSL_STRING *)sk_OPENSSL_STRING_deep_copy((struct stack_st_OPENSSL_STRING const *)arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dec_to_bn",1,1,&obj0)) SWIG_fail; + arg1 = obj0; + result = (BIGNUM *)dec_to_bn(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_STRING_set_cmp_func(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_err_print_errors(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_STRING *arg1 = (struct stack_st_OPENSSL_STRING *) 0 ; - sk_OPENSSL_STRING_compfunc arg2 = (sk_OPENSSL_STRING_compfunc) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - sk_OPENSSL_STRING_compfunc result; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_STRING_set_cmp_func", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"err_print_errors",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_STRING_set_cmp_func" "', argument " "1"" of type '" "struct stack_st_OPENSSL_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "err_print_errors" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_STRING *)(argp1); + arg1 = (BIO *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_STRING_set_cmp_func" "', argument " "2"" of type '" "sk_OPENSSL_STRING_compfunc""'"); - } + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + ERR_print_errors(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; } - result = (sk_OPENSSL_STRING_compfunc)sk_OPENSSL_STRING_set_cmp_func(arg1,arg2); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_num(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_err_get_error(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + unsigned long result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_num" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING const *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - result = (int)sk_OPENSSL_CSTRING_num((struct stack_st_OPENSSL_CSTRING const *)arg1); - resultobj = SWIG_From_int((int)(result)); + result = (unsigned long)ERR_get_error(); + resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_err_peek_error(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; + unsigned long result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_value" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING const *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_CSTRING_value" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (char *)sk_OPENSSL_CSTRING_value((struct stack_st_OPENSSL_CSTRING const *)arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); + result = (unsigned long)ERR_peek_error(); + resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_err_lib_error_string(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - sk_OPENSSL_CSTRING_compfunc arg1 = (sk_OPENSSL_CSTRING_compfunc) 0 ; - PyObject *swig_obj[1] ; - struct stack_st_OPENSSL_CSTRING *result = 0 ; + unsigned long arg1 ; + unsigned long val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_CSTRING_new" "', argument " "1"" of type '" "sk_OPENSSL_CSTRING_compfunc""'"); - } - } - result = (struct stack_st_OPENSSL_CSTRING *)sk_OPENSSL_CSTRING_new(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"err_lib_error_string",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "err_lib_error_string" "', argument " "1"" of type '" "unsigned long""'"); + } + arg1 = (unsigned long)(val1); + result = (char *)ERR_lib_error_string(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_new_null(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_err_func_error_string(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *result = 0 ; + unsigned long arg1 ; + unsigned long val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_new_null", 0, 0, 0)) SWIG_fail; - result = (struct stack_st_OPENSSL_CSTRING *)sk_OPENSSL_CSTRING_new_null(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"err_func_error_string",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "err_func_error_string" "', argument " "1"" of type '" "unsigned long""'"); + } + arg1 = (unsigned long)(val1); + result = (char *)ERR_func_error_string(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_new_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_err_reason_error_string(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - sk_OPENSSL_CSTRING_compfunc arg1 = (sk_OPENSSL_CSTRING_compfunc) 0 ; - int arg2 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - struct stack_st_OPENSSL_CSTRING *result = 0 ; + unsigned long arg1 ; + unsigned long val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_new_reserve", 2, 2, swig_obj)) SWIG_fail; - { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_CSTRING_new_reserve" "', argument " "1"" of type '" "sk_OPENSSL_CSTRING_compfunc""'"); - } - } - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_CSTRING_new_reserve" "', argument " "2"" of type '" "int""'"); + if(!PyArg_UnpackTuple(args,(char *)"err_reason_error_string",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "err_reason_error_string" "', argument " "1"" of type '" "unsigned long""'"); } - arg2 = (int)(val2); - result = (struct stack_st_OPENSSL_CSTRING *)sk_OPENSSL_CSTRING_new_reserve(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + arg1 = (unsigned long)(val1); + result = (char *)ERR_reason_error_string(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_s_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + BIO_METHOD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_reserve" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_CSTRING_reserve" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (int)sk_OPENSSL_CSTRING_reserve(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); + result = (BIO_METHOD *)BIO_s_bio(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_s_mem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + BIO_METHOD *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_free" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - sk_OPENSSL_CSTRING_free(arg1); - resultobj = SWIG_Py_Void(); + result = (BIO_METHOD *)BIO_s_mem(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_zero(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_s_socket(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + BIO_METHOD *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_zero" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - sk_OPENSSL_CSTRING_zero(arg1); - resultobj = SWIG_Py_Void(); + result = (BIO_METHOD *)BIO_s_socket(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_delete(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_f_ssl(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; + BIO_METHOD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_delete", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_delete" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_CSTRING_delete" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (char *)sk_OPENSSL_CSTRING_delete(arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); + result = (BIO_METHOD *)BIO_f_ssl(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_delete_ptr(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_f_buffer(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; + BIO_METHOD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_delete_ptr", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_delete_ptr" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_CSTRING_delete_ptr" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (char *)sk_OPENSSL_CSTRING_delete_ptr(arg1,(char const *)arg2); - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (BIO_METHOD *)BIO_f_buffer(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_f_cipher(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + BIO_METHOD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_push" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_CSTRING_push" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_CSTRING_push(arg1,(char const *)arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (BIO_METHOD *)BIO_f_cipher(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_unshift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - char *arg2 = (char *) 0 ; + BIO_METHOD *arg1 = (BIO_METHOD *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_unshift", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_new",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO_METHOD, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_unshift" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_new" "', argument " "1"" of type '" "BIO_METHOD *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_CSTRING_unshift" "', argument " "2"" of type '" "char const *""'"); + arg1 = (BIO_METHOD *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_CSTRING_unshift(arg1,(char const *)arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (BIO *)BIO_new(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_new_socket(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + int arg1 ; + int arg2 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + BIO *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_pop" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - result = (char *)sk_OPENSSL_CSTRING_pop(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + if(!PyArg_UnpackTuple(args,(char *)"bio_new_socket",2,2,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bio_new_socket" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_socket" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (BIO *)BIO_new_socket(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_shift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_free_all(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_free_all",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_shift" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_free_all" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - result = (char *)sk_OPENSSL_CSTRING_shift(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + BIO_free_all(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_pop_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_dup_chain(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - sk_OPENSSL_CSTRING_freefunc arg2 = (sk_OPENSSL_CSTRING_freefunc) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_pop_free", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_dup_chain",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_pop_free" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_dup_chain" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); + arg1 = (BIO *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_char__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_CSTRING_pop_free" "', argument " "2"" of type '" "sk_OPENSSL_CSTRING_freefunc""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - sk_OPENSSL_CSTRING_pop_free(arg1,arg2); - resultobj = SWIG_Py_Void(); + result = (BIO *)BIO_dup_chain(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_insert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_push(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; + BIO *arg1 = (BIO *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_insert", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_push",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_insert" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_push" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_CSTRING_insert" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_push" "', argument " "2"" of type '" "BIO *""'"); } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sk_OPENSSL_CSTRING_insert" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (int)sk_OPENSSL_CSTRING_insert(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + arg2 = (BIO *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (BIO *)BIO_push(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_pop(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject *swig_obj[3] ; - char *result = 0 ; + PyObject * obj0 = 0 ; + BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_pop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_set" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_pop" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_CSTRING_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sk_OPENSSL_CSTRING_set" "', argument " "3"" of type '" "char const *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - arg3 = (char *)(buf3); - result = (char *)sk_OPENSSL_CSTRING_set(arg1,arg2,(char const *)arg3); - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + result = (BIO *)BIO_pop(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_find(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_eof(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - char *arg2 = (char *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_eof",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_find" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_eof" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_CSTRING_find" "', argument " "2"" of type '" "char const *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)BIO_eof(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_CSTRING_find(arg1,(char const *)arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_find_ex(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_find_ex", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_find_ex" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_CSTRING_find_ex" "', argument " "2"" of type '" "char const *""'"); +SWIGINTERN int Swig_var__bio_err_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_bio_err""' of type '""PyObject *""'"); + } + _bio_err = (PyObject *)(argp); } - arg2 = (char *)(buf2); - result = (int)sk_OPENSSL_CSTRING_find_ex(arg1,(char const *)arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; + return 0; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_sort(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; +SWIGINTERN PyObject *Swig_var__bio_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_sort" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - sk_OPENSSL_CSTRING_sort(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_bio_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_is_sorted(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_is_sorted" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING const *""'"); - } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - result = (int)sk_OPENSSL_CSTRING_is_sorted((struct stack_st_OPENSSL_CSTRING const *)arg1); - resultobj = SWIG_From_int((int)(result)); + pyfd_init(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_dup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - struct stack_st_OPENSSL_CSTRING *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_dup" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING const *""'"); + if(!PyArg_UnpackTuple(args,(char *)"bio_init",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - result = (struct stack_st_OPENSSL_CSTRING *)sk_OPENSSL_CSTRING_dup((struct stack_st_OPENSSL_CSTRING const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + bio_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_deep_copy(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - sk_OPENSSL_CSTRING_copyfunc arg2 = (sk_OPENSSL_CSTRING_copyfunc) 0 ; - sk_OPENSSL_CSTRING_freefunc arg3 = (sk_OPENSSL_CSTRING_freefunc) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - struct stack_st_OPENSSL_CSTRING *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_deep_copy", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_deep_copy" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_free" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); + arg1 = (BIO *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__char__p_char); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_CSTRING_deep_copy" "', argument " "2"" of type '" "sk_OPENSSL_CSTRING_copyfunc""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)bio_free(arg1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[2], (void**)(&arg3), SWIGTYPE_p_f_p_char__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_CSTRING_deep_copy" "', argument " "3"" of type '" "sk_OPENSSL_CSTRING_freefunc""'"); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (struct stack_st_OPENSSL_CSTRING *)sk_OPENSSL_CSTRING_deep_copy((struct stack_st_OPENSSL_CSTRING const *)arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_CSTRING_set_cmp_func(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_new_file(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_CSTRING *arg1 = (struct stack_st_OPENSSL_CSTRING *) 0 ; - sk_OPENSSL_CSTRING_compfunc arg2 = (sk_OPENSSL_CSTRING_compfunc) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - sk_OPENSSL_CSTRING_compfunc result; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_CSTRING_set_cmp_func", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_CSTRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_new_file",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_CSTRING_set_cmp_func" "', argument " "1"" of type '" "struct stack_st_OPENSSL_CSTRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_new_file" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (struct stack_st_OPENSSL_CSTRING *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_CSTRING_set_cmp_func" "', argument " "2"" of type '" "sk_OPENSSL_CSTRING_compfunc""'"); - } + arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_new_file" "', argument " "2"" of type '" "char const *""'"); } - result = (sk_OPENSSL_CSTRING_compfunc)sk_OPENSSL_CSTRING_set_cmp_func(arg1,arg2); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int); + arg2 = (char *)(buf2); + result = (BIO *)bio_new_file((char const *)arg1,(char const *)arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_num(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_new_pyfile(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject *arg1 = (PyObject *) 0 ; + int arg2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + BIO *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_num" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK const *""'"); + if(!PyArg_UnpackTuple(args,(char *)"bio_new_pyfile",2,2,&obj0,&obj1)) SWIG_fail; + { + arg1=obj0; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - result = (int)sk_OPENSSL_BLOCK_num((struct stack_st_OPENSSL_BLOCK const *)arg1); - resultobj = SWIG_From_int((int)(result)); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_pyfile" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (BIO *)bio_new_pyfile(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_read(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_read",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_value" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_read" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_BLOCK_value" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_read" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - result = (void *)sk_OPENSSL_BLOCK_value((struct stack_st_OPENSSL_BLOCK const *)arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - sk_OPENSSL_BLOCK_compfunc arg1 = (sk_OPENSSL_BLOCK_compfunc) 0 ; - PyObject *swig_obj[1] ; - struct stack_st_OPENSSL_BLOCK *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_BLOCK_new" "', argument " "1"" of type '" "sk_OPENSSL_BLOCK_compfunc""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (struct stack_st_OPENSSL_BLOCK *)sk_OPENSSL_BLOCK_new(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_new_null(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_new_null", 0, 0, 0)) SWIG_fail; - result = (struct stack_st_OPENSSL_BLOCK *)sk_OPENSSL_BLOCK_new_null(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_new_reserve(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - sk_OPENSSL_BLOCK_compfunc arg1 = (sk_OPENSSL_BLOCK_compfunc) 0 ; - int arg2 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - struct stack_st_OPENSSL_BLOCK *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_new_reserve", 2, 2, swig_obj)) SWIG_fail; + result = (PyObject *)bio_read(arg1,arg2); { - int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_BLOCK_new_reserve" "', argument " "1"" of type '" "sk_OPENSSL_BLOCK_compfunc""'"); - } + resultobj=result; } - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_BLOCK_new_reserve" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (struct stack_st_OPENSSL_BLOCK *)sk_OPENSSL_BLOCK_new_reserve(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_reserve(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_gets(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_reserve", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_gets",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_reserve" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_gets" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_BLOCK_reserve" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_gets" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - result = (int)sk_OPENSSL_BLOCK_reserve(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)bio_gets(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_write(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_write",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_free" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_write" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_write(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - sk_OPENSSL_BLOCK_free(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_zero(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_ctrl_pending(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_ctrl_pending",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_zero" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_ctrl_pending" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_ctrl_pending(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - sk_OPENSSL_BLOCK_zero(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_delete(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_ctrl_wpending(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - int arg2 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_delete", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_ctrl_wpending",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_delete" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_ctrl_wpending" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_ctrl_wpending(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_BLOCK_delete" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (void *)sk_OPENSSL_BLOCK_delete(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_delete_ptr(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_ctrl_get_write_guarantee(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *arg2 = (void *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_delete_ptr", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_ctrl_get_write_guarantee",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_delete_ptr" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_ctrl_get_write_guarantee" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_BLOCK_delete_ptr" "', argument " "2"" of type '" "void *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_ctrl_get_write_guarantee(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (void *)sk_OPENSSL_BLOCK_delete_ptr(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_reset(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *arg2 = (void *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_reset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_push" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_reset" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_BLOCK_push" "', argument " "2"" of type '" "void *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_reset(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (int)sk_OPENSSL_BLOCK_push(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_unshift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_flush(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *arg2 = (void *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_unshift", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_flush",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_unshift" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_flush" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_BLOCK_unshift" "', argument " "2"" of type '" "void *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)bio_flush(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (int)sk_OPENSSL_BLOCK_unshift(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_seek(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - void *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_seek",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_pop" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_seek" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_seek" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_seek(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - result = (void *)sk_OPENSSL_BLOCK_pop(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_shift(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_tell(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_tell",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_shift" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_tell" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_tell(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - result = (void *)sk_OPENSSL_BLOCK_shift(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_pop_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_set_flags(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - sk_OPENSSL_BLOCK_freefunc arg2 = (sk_OPENSSL_BLOCK_freefunc) 0 ; + BIO *arg1 = (BIO *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_pop_free", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_set_flags",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_pop_free" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_flags" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_set_flags" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_BLOCK_pop_free" "', argument " "2"" of type '" "sk_OPENSSL_BLOCK_freefunc""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - sk_OPENSSL_BLOCK_pop_free(arg1,arg2); + bio_set_flags(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -12123,296 +11761,422 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_insert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_get_flags(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_insert", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_get_flags",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_insert" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_get_flags" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_BLOCK_insert" "', argument " "2"" of type '" "void *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_get_flags(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sk_OPENSSL_BLOCK_insert" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (int)sk_OPENSSL_BLOCK_insert(arg1,arg2,arg3); - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_set_cipher(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - int arg2 ; - void *arg3 = (void *) 0 ; + BIO *arg1 = (BIO *) 0 ; + EVP_CIPHER *arg2 = (EVP_CIPHER *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - PyObject *swig_obj[3] ; - void *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_set", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_set_cipher",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_set" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_cipher" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_OPENSSL_BLOCK_set" "', argument " "2"" of type '" "int""'"); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_set_cipher" "', argument " "2"" of type '" "EVP_CIPHER *""'"); + } + arg2 = (EVP_CIPHER *)(argp2); + { + arg3=obj2; + } + { + arg4=obj3; + } + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "bio_set_cipher" "', argument " "5"" of type '" "int""'"); } - arg2 = (int)(val2); - res3 = SWIG_ConvertPtr(swig_obj[2],SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sk_OPENSSL_BLOCK_set" "', argument " "3"" of type '" "void *""'"); + arg5 = (int)(val5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)bio_set_cipher(arg1,arg2,arg3,arg4,arg5); + { + resultobj=result; } - result = (void *)sk_OPENSSL_BLOCK_set(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_find(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_set_mem_eof_return(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *arg2 = (void *) 0 ; + BIO *arg1 = (BIO *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_find", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_set_mem_eof_return",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_find" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_mem_eof_return" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_BLOCK_find" "', argument " "2"" of type '" "void *""'"); + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_set_mem_eof_return" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_set_mem_eof_return(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (int)sk_OPENSSL_BLOCK_find(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_find_ex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_get_fd(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - void *arg2 = (void *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_find_ex", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_get_fd",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_find_ex" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_get_fd" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_OPENSSL_BLOCK_find_ex" "', argument " "2"" of type '" "void *""'"); + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_get_fd(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (int)sk_OPENSSL_BLOCK_find_ex(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_sort(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_do_handshake(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_do_handshake",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_sort" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_do_handshake" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)bio_do_handshake(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - sk_OPENSSL_BLOCK_sort(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_is_sorted(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_make_bio_pair(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_make_bio_pair",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_is_sorted" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_make_bio_pair" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_make_bio_pair" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_make_bio_pair(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - result = (int)sk_OPENSSL_BLOCK_is_sorted((struct stack_st_OPENSSL_BLOCK const *)arg1); - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_dup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_set_write_buf_size(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; + BIO *arg1 = (BIO *) 0 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - struct stack_st_OPENSSL_BLOCK *result = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_set_write_buf_size",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_dup" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_write_buf_size" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_set_write_buf_size" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_set_write_buf_size(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); - result = (struct stack_st_OPENSSL_BLOCK *)sk_OPENSSL_BLOCK_dup((struct stack_st_OPENSSL_BLOCK const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_deep_copy(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_should_retry(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - sk_OPENSSL_BLOCK_copyfunc arg2 = (sk_OPENSSL_BLOCK_copyfunc) 0 ; - sk_OPENSSL_BLOCK_freefunc arg3 = (sk_OPENSSL_BLOCK_freefunc) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - struct stack_st_OPENSSL_BLOCK *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_deep_copy", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_should_retry",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_deep_copy" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_should_retry" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); + arg1 = (BIO *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__void__p_void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_BLOCK_deep_copy" "', argument " "2"" of type '" "sk_OPENSSL_BLOCK_copyfunc""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)bio_should_retry(arg1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[2], (void**)(&arg3), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_BLOCK_deep_copy" "', argument " "3"" of type '" "sk_OPENSSL_BLOCK_freefunc""'"); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (struct stack_st_OPENSSL_BLOCK *)sk_OPENSSL_BLOCK_deep_copy((struct stack_st_OPENSSL_BLOCK const *)arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_OPENSSL_BLOCK_set_cmp_func(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_should_read(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_OPENSSL_BLOCK *arg1 = (struct stack_st_OPENSSL_BLOCK *) 0 ; - sk_OPENSSL_BLOCK_compfunc arg2 = (sk_OPENSSL_BLOCK_compfunc) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - sk_OPENSSL_BLOCK_compfunc result; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sk_OPENSSL_BLOCK_set_cmp_func", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_OPENSSL_BLOCK, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_should_read",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_OPENSSL_BLOCK_set_cmp_func" "', argument " "1"" of type '" "struct stack_st_OPENSSL_BLOCK *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_should_read" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_OPENSSL_BLOCK *)(argp1); + arg1 = (BIO *)(argp1); { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sk_OPENSSL_BLOCK_set_cmp_func" "', argument " "2"" of type '" "sk_OPENSSL_BLOCK_compfunc""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (sk_OPENSSL_BLOCK_compfunc)sk_OPENSSL_BLOCK_set_cmp_func(arg1,arg2); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int); + result = (int)bio_should_read(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_threading_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_should_write(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + BIO *arg1 = (BIO *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "threading_init", 0, 0, 0)) SWIG_fail; - threading_init(); - resultobj = SWIG_Py_Void(); + if(!PyArg_UnpackTuple(args,(char *)"bio_should_write",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_should_write" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)bio_should_write(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_threading_cleanup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BIO_meth_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + int arg1 ; + char *arg2 = (char *) 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + BIO_METHOD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "threading_cleanup", 0, 0, 0)) SWIG_fail; - threading_cleanup(); - resultobj = SWIG_Py_Void(); + if(!PyArg_UnpackTuple(args,(char *)"BIO_meth_new",2,2,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "BIO_meth_new" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BIO_meth_new" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (BIO_METHOD *)BIO_meth_new(arg1,(char const *)arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_lib_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BIO_meth_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + BIO_METHOD *arg1 = (BIO_METHOD *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "lib_init", 0, 0, 0)) SWIG_fail; - lib_init(); + if(!PyArg_UnpackTuple(args,(char *)"BIO_meth_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO_METHOD, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BIO_meth_free" "', argument " "1"" of type '" "BIO_METHOD *""'"); + } + arg1 = (BIO_METHOD *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + BIO_meth_free(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -12420,371 +12184,422 @@ fail: } -SWIGINTERN PyObject *_wrap_bn_to_mpi(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BIO_PYFD_CTX_fd_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIGNUM *arg1 = (BIGNUM *) 0 ; + struct pyfd_struct *arg1 = (struct pyfd_struct *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIGNUM, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"BIO_PYFD_CTX_fd_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pyfd_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bn_to_mpi" "', argument " "1"" of type '" "BIGNUM const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BIO_PYFD_CTX_fd_set" "', argument " "1"" of type '" "struct pyfd_struct *""'"); } - arg1 = (BIGNUM *)(argp1); - result = (PyObject *)bn_to_mpi((BIGNUM const *)arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_mpi_to_bn(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - BIGNUM *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - arg1 = swig_obj[0]; - result = (BIGNUM *)mpi_to_bn(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); + arg1 = (struct pyfd_struct *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BIO_PYFD_CTX_fd_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (arg1) (arg1)->fd = arg2; + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bn_to_bin(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BIO_PYFD_CTX_fd_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIGNUM *arg1 = (BIGNUM *) 0 ; + struct pyfd_struct *arg1 = (struct pyfd_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIGNUM, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pyfd_struct, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bn_to_bin" "', argument " "1"" of type '" "BIGNUM *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BIO_PYFD_CTX_fd_get" "', argument " "1"" of type '" "struct pyfd_struct *""'"); + } + arg1 = (struct pyfd_struct *)(argp1); + result = (int) ((arg1)->fd); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (BIGNUM *)(argp1); - result = (PyObject *)bn_to_bin(arg1); - resultobj = result; return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bin_to_bn(PyObject *self, PyObject *args) { +SWIGINTERN int _wrap_new_BIO_PYFD_CTX(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - BIGNUM *result = 0 ; + struct pyfd_struct *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - arg1 = swig_obj[0]; - result = (BIGNUM *)bin_to_bn(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); - return resultobj; + result = (struct pyfd_struct *)calloc(1, sizeof(struct pyfd_struct)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pyfd_struct, SWIG_BUILTIN_INIT | 0 ); + return resultobj == Py_None ? -1 : 0; fail: - return NULL; + return -1; } -SWIGINTERN PyObject *_wrap_bn_to_hex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_BIO_PYFD_CTX(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIGNUM *arg1 = (BIGNUM *) 0 ; + struct pyfd_struct *arg1 = (struct pyfd_struct *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIGNUM, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pyfd_struct, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bn_to_hex" "', argument " "1"" of type '" "BIGNUM *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BIO_PYFD_CTX" "', argument " "1"" of type '" "struct pyfd_struct *""'"); } - arg1 = (BIGNUM *)(argp1); - result = (PyObject *)bn_to_hex(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hex_to_bn(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - BIGNUM *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - arg1 = swig_obj[0]; - result = (BIGNUM *)hex_to_bn(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); + arg1 = (struct pyfd_struct *)(argp1); + free((char *) arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dec_to_bn(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - BIGNUM *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - arg1 = swig_obj[0]; - result = (BIGNUM *)dec_to_bn(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); - return resultobj; +SWIGINTERN int Swig_var_methods_fdp_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_BIO_METHOD, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""methods_fdp""' of type '""BIO_METHOD *""'"); + } + methods_fdp = (BIO_METHOD *)(argp); + } + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_err_print_errors(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *Swig_var_methods_fdp_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(methods_fdp), SWIGTYPE_p_BIO_METHOD, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_pyfd_write(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_write",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "err_print_errors" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_write" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_write" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_write" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ERR_print_errors(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - resultobj = SWIG_Py_Void(); + result = (int)pyfd_write(arg1,(char const *)arg2,arg3); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_err_get_error(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_read(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - unsigned long result; + BIO *arg1 = (BIO *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "err_get_error", 0, 0, 0)) SWIG_fail; - result = (unsigned long)ERR_get_error(); - resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_read",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_read" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_read" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_read" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pyfd_read(arg1,arg2,arg3); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_err_peek_error(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_puts(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - unsigned long result; + BIO *arg1 = (BIO *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "err_peek_error", 0, 0, 0)) SWIG_fail; - result = (unsigned long)ERR_peek_error(); - resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_puts",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_puts" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_puts" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pyfd_puts(arg1,(char const *)arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_err_lib_error_string(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_gets(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - unsigned long arg1 ; - unsigned long val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + BIO *arg1 = (BIO *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_unsigned_SS_long(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "err_lib_error_string" "', argument " "1"" of type '" "unsigned long""'"); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_gets",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_gets" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_gets" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_gets" "', argument " "3"" of type '" "int""'"); } - arg1 = (unsigned long)(val1); - result = (char *)ERR_lib_error_string(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + arg3 = (int)(val3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pyfd_gets(arg1,arg2,arg3); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_err_func_error_string(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - unsigned long arg1 ; - unsigned long val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + BIO *arg1 = (BIO *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_unsigned_SS_long(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "err_func_error_string" "', argument " "1"" of type '" "unsigned long""'"); - } - arg1 = (unsigned long)(val1); - result = (char *)ERR_func_error_string(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_new",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_new" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pyfd_new(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_err_reason_error_string(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - unsigned long arg1 ; - unsigned long val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + BIO *arg1 = (BIO *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_unsigned_SS_long(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "err_reason_error_string" "', argument " "1"" of type '" "unsigned long""'"); - } - arg1 = (unsigned long)(val1); - result = (char *)ERR_reason_error_string(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_free" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pyfd_free(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_s_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pyfd_ctrl(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO_METHOD *result = 0 ; + BIO *arg1 = (BIO *) 0 ; + int arg2 ; + long arg3 ; + void *arg4 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + long val3 ; + int ecode3 = 0 ; + int res4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "bio_s_bio", 0, 0, 0)) SWIG_fail; - result = (BIO_METHOD *)BIO_s_bio(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bio_s_mem(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "bio_s_mem", 0, 0, 0)) SWIG_fail; - result = (BIO_METHOD *)BIO_s_mem(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bio_s_socket(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "bio_s_socket", 0, 0, 0)) SWIG_fail; - result = (BIO_METHOD *)BIO_s_socket(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bio_f_ssl(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "bio_f_ssl", 0, 0, 0)) SWIG_fail; - result = (BIO_METHOD *)BIO_f_ssl(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bio_f_buffer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "bio_f_buffer", 0, 0, 0)) SWIG_fail; - result = (BIO_METHOD *)BIO_f_buffer(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bio_f_cipher(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "bio_f_cipher", 0, 0, 0)) SWIG_fail; - result = (BIO_METHOD *)BIO_f_cipher(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_bio_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO_METHOD *arg1 = (BIO_METHOD *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - BIO *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO_METHOD, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pyfd_ctrl",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_new" "', argument " "1"" of type '" "BIO_METHOD *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_ctrl" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pyfd_ctrl" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_long(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_ctrl" "', argument " "3"" of type '" "long""'"); + } + arg3 = (long)(val3); + res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pyfd_ctrl" "', argument " "4"" of type '" "void *""'"); } - arg1 = (BIO_METHOD *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (BIO *)BIO_new(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + result = (long)pyfd_ctrl(arg1,arg2,arg3,arg4); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_new_socket(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_new_pyfd(PyObject *self, PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; @@ -12792,21 +12607,22 @@ SWIGINTERN PyObject *_wrap_bio_new_socket(PyObject *self, PyObject *args) { int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_new_socket", 2, 2, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if(!PyArg_UnpackTuple(args,(char *)"bio_new_pyfd",2,2,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bio_new_socket" "', argument " "1"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bio_new_pyfd" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_socket" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_pyfd" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - result = (BIO *)BIO_new_socket(arg1,arg2); + result = (BIO *)BIO_new_pyfd(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: @@ -12814,212 +12630,201 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_free_all(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bn_rand(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + int arg1 ; + int arg2 ; + int arg3 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_free_all" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } + if(!PyArg_UnpackTuple(args,(char *)"bn_rand",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bn_rand" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bn_rand" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bn_rand" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + result = (PyObject *)bn_rand(arg1,arg2,arg3); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - BIO_free_all(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; + resultobj=result; } - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_dup_chain(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bn_rand_range(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - BIO *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_dup_chain" "', argument " "1"" of type '" "BIO *""'"); + if(!PyArg_UnpackTuple(args,(char *)"bn_rand_range",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; } - arg1 = (BIO *)(argp1); + result = (PyObject *)bn_rand_range(arg1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=result; } - result = (BIO *)BIO_dup_chain(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_file_name__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - BIO *arg2 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - BIO *result = 0 ; + char *arg1 = (char *) 0 ; + size_t arg2 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rand_file_name",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_push" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_push" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_file_name" "', argument " "1"" of type '" "char *""'"); } - result = (BIO *)BIO_push(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + arg1 = (char *)(buf1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_file_name" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = (size_t)(val2); + result = (char *)RAND_file_name(arg1,arg2); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_bio_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_load_file(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - BIO *result = 0 ; + char *arg1 = (char *) 0 ; + long arg2 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rand_load_file",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_pop" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_load_file" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (char *)(buf1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_load_file" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); + result = (int)RAND_load_file((char const *)arg1,arg2); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (BIO *)BIO_pop(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_bio_eof(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_save_file(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rand_save_file",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_eof" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_save_file" "', argument " "1"" of type '" "char const *""'"); } - result = (int)BIO_eof(arg1); + arg1 = (char *)(buf1); + result = (int)RAND_write_file((char const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN int Swig_var__bio_err_set(PyObject *_val) { +SWIGINTERN PyObject *_wrap_rand_poll(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + int result; + + result = (int)RAND_poll(); { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_bio_err""' of type '""PyObject *""'"); - } - _bio_err = (PyObject *)(argp); + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - return 0; + return resultobj; fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__bio_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_bio_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; + return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_status(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + int result; - if (!SWIG_Python_UnpackTuple(args, "pyfd_init", 0, 0, 0)) SWIG_fail; - pyfd_init(); - resultobj = SWIG_Py_Void(); + result = (int)RAND_status(); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_cleanup(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - bio_init(arg1); + RAND_cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -13027,127 +12832,59 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_free(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_free" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); +SWIGINTERN int Swig_var__rand_err_set(PyObject *_val) { { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_rand_err""' of type '""PyObject *""'"); } + _rand_err = (PyObject *)(argp); } - result = (int)bio_free(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_bio_new_file(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - BIO *result = 0 ; +SWIGINTERN PyObject *Swig_var__rand_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; - if (!SWIG_Python_UnpackTuple(args, "bio_new_file", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_new_file" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_new_file" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (BIO *)bio_new_file((char const *)arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_rand_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; } -SWIGINTERN PyObject *_wrap_bio_new_pyfile(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - int arg2 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - BIO *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_new_pyfile", 2, 2, swig_obj)) SWIG_fail; + if(!PyArg_UnpackTuple(args,(char *)"rand_init",1,1,&obj0)) SWIG_fail; { - arg1=swig_obj[0]; + arg1=obj0; } - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_pyfile" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (BIO *)bio_new_pyfile(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + rand_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_read(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_seed(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_read", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_read" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_read" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + if(!PyArg_UnpackTuple(args,(char *)"rand_seed",1,1,&obj0)) SWIG_fail; { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg1=obj0; } - result = (PyObject *)bio_read(arg1,arg2); + result = (PyObject *)rand_seed(arg1); { resultobj=result; } @@ -13157,34 +12894,26 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_gets(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_add(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; + PyObject *arg1 = (PyObject *) 0 ; + double arg2 ; + double val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_gets", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_gets" "', argument " "1"" of type '" "BIO *""'"); + if(!PyArg_UnpackTuple(args,(char *)"rand_add",2,2,&obj0,&obj1)) SWIG_fail; + { + arg1=obj0; } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_gets" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_add" "', argument " "2"" of type '" "double""'"); } - arg2 = (int)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)bio_gets(arg1,arg2); + arg2 = (double)(val2); + result = (PyObject *)rand_add(arg1,arg2); { resultobj=result; } @@ -13194,33 +12923,23 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_write(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_bytes(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_write", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_write" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - arg2=swig_obj[1]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_write(arg1,arg2); + if(!PyArg_UnpackTuple(args,(char *)"rand_bytes",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rand_bytes" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (PyObject *)rand_bytes(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -13228,30 +12947,23 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_ctrl_pending(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_pseudo_bytes(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_ctrl_pending" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_ctrl_pending(arg1); + if(!PyArg_UnpackTuple(args,(char *)"rand_pseudo_bytes",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rand_pseudo_bytes" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (PyObject *)rand_pseudo_bytes(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -13259,30 +12971,13 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_ctrl_wpending(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_file_name__SWIG_1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_ctrl_wpending" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_ctrl_wpending(arg1); + result = (PyObject *)rand_file_name(); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -13290,58 +12985,87 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_ctrl_get_write_guarantee(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; +SWIGINTERN PyObject *_wrap_rand_file_name(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_ctrl_get_write_guarantee" "', argument " "1"" of type '" "BIO *""'"); + if (!PyTuple_Check(args)) SWIG_fail; + argc = args ? (int)PyObject_Length(args) : 0; + for (ii = 0; (ii < 2) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + if (argc == 0) { + return _wrap_rand_file_name__SWIG_1(self, args); } - result = (int)bio_ctrl_get_write_guarantee(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (argc == 2) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_rand_file_name__SWIG_0(self, args); + } + } } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'rand_file_name'.\n" + " Possible C/C++ prototypes are:\n" + " RAND_file_name(char *,size_t)\n" + " rand_file_name()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_rand_screen(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + + rand_screen(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_reset(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rand_win32_event(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + unsigned int arg1 ; + int arg2 ; + long arg3 ; + unsigned int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + long val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_reset" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_reset(arg1); + if(!PyArg_UnpackTuple(args,(char *)"rand_win32_event",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rand_win32_event" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = (unsigned int)(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_win32_event" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_long(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rand_win32_event" "', argument " "3"" of type '" "long""'"); + } + arg3 = (long)(val3); + result = (int)rand_win32_event(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -13352,165 +13076,124 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_flush(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_md5(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_MD *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_flush" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)bio_flush(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_MD *)EVP_md5(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_seek(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sha1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + EVP_MD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_seek", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_seek" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_seek" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_seek(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_MD *)EVP_sha1(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_tell(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ripemd160(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_MD *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_tell" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_tell(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_MD *)EVP_ripemd160(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_set_flags(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sha224(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + EVP_MD *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_set_flags", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_flags" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_set_flags" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - bio_set_flags(arg1,arg2); - resultobj = SWIG_Py_Void(); + result = (EVP_MD *)EVP_sha224(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_get_flags(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sha256(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + EVP_MD *result = 0 ; + + result = (EVP_MD *)EVP_sha256(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sha384(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_MD *result = 0 ; + + result = (EVP_MD *)EVP_sha384(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sha512(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_MD *result = 0 ; + + result = (EVP_MD *)EVP_sha512(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_digest_init(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_MD *arg2 = (EVP_MD *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_init",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_get_flags" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (EVP_MD_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_init" "', argument " "2"" of type '" "EVP_MD const *""'"); + } + arg2 = (EVP_MD *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)bio_get_flags(arg1); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_DigestInit(arg1,(EVP_MD const *)arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -13521,1135 +13204,482 @@ fail: } -SWIGINTERN PyObject *_wrap_bio_set_cipher(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - EVP_CIPHER *arg2 = (EVP_CIPHER *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_set_cipher", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_cipher" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_set_cipher" "', argument " "2"" of type '" "EVP_CIPHER *""'"); - } - arg2 = (EVP_CIPHER *)(argp2); - { - arg3=swig_obj[2]; - } - { - arg4=swig_obj[3]; - } - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "bio_set_cipher" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)bio_set_cipher(arg1,arg2,arg3,arg4,arg5); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_des_ecb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_set_mem_eof_return(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_set_mem_eof_return", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_mem_eof_return" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_set_mem_eof_return" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_set_mem_eof_return(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_get_fd(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede3_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_get_fd" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_get_fd(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede3(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_do_handshake(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_do_handshake" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)bio_do_handshake(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_make_bio_pair(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - BIO *arg2 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_make_bio_pair", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_make_bio_pair" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_make_bio_pair" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_make_bio_pair(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_set_write_buf_size(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede3_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_set_write_buf_size", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_write_buf_size" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_set_write_buf_size" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_set_write_buf_size(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede3_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_should_retry(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_should_retry" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_should_retry(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_should_read(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_should_read" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_should_read(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_should_write(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede3_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_should_write" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_should_write(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede3_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_BIO_PYFD_CTX_fd_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct pyfd_struct *arg1 = (struct pyfd_struct *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pyfd_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BIO_PYFD_CTX_fd_set" "', argument " "1"" of type '" "struct pyfd_struct *""'"); - } - arg1 = (struct pyfd_struct *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BIO_PYFD_CTX_fd_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - if (arg1) (arg1)->fd = arg2; - resultobj = SWIG_Py_Void(); + result = (EVP_CIPHER *)EVP_des_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_BIO_PYFD_CTX_fd_get(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_des_ede_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct pyfd_struct *arg1 = (struct pyfd_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "BIO_PYFD_CTX_fd_get", 0, 0, 0)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pyfd_struct, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BIO_PYFD_CTX_fd_get" "', argument " "1"" of type '" "struct pyfd_struct *""'"); - } - arg1 = (struct pyfd_struct *)(argp1); - result = (int) ((arg1)->fd); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_des_ede_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN int _wrap_new_BIO_PYFD_CTX(PyObject *self, PyObject *args, PyObject *kwargs) { +SWIGINTERN PyObject *_wrap_des_ede3_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct pyfd_struct *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_BIO_PYFD_CTX")) SWIG_fail; - if (!SWIG_Python_UnpackTuple(args, "new_BIO_PYFD_CTX", 0, 0, 0)) SWIG_fail; - result = (struct pyfd_struct *)calloc(1, sizeof(struct pyfd_struct)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pyfd_struct, SWIG_BUILTIN_INIT | 0 ); - return resultobj == Py_None ? -1 : 0; + result = (EVP_CIPHER *)EVP_des_ede3_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + return resultobj; fail: - return -1; + return NULL; } -SWIGINTERN PyObject *_wrap_delete_BIO_PYFD_CTX(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bf_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct pyfd_struct *arg1 = (struct pyfd_struct *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "delete_BIO_PYFD_CTX", 0, 0, 0)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pyfd_struct, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BIO_PYFD_CTX" "', argument " "1"" of type '" "struct pyfd_struct *""'"); - } - arg1 = (struct pyfd_struct *)(argp1); - free((char *) arg1); - resultobj = SWIG_Py_Void(); + result = (EVP_CIPHER *)EVP_bf_ecb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_BIO_PYFD_CTX) /* defines _wrap_delete_BIO_PYFD_CTX_destructor_closure */ - -SWIGINTERN int Swig_var_methods_fdp_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_BIO_METHOD, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""methods_fdp""' of type '""BIO_METHOD *""'"); - } - methods_fdp = (BIO_METHOD *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var_methods_fdp_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; +SWIGINTERN PyObject *_wrap_bf_cbc(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_CIPHER *result = 0 ; - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(methods_fdp), SWIGTYPE_p_BIO_METHOD, 0 ); - return pyobj; + result = (EVP_CIPHER *)EVP_bf_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + return resultobj; +fail: + return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_write(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bf_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pyfd_write", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_write" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_write" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_write" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)pyfd_write(arg1,(char const *)arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (EVP_CIPHER *)EVP_bf_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_read(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bf_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pyfd_read", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_read" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_read" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_read" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)pyfd_read(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (EVP_CIPHER *)EVP_bf_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_puts(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cast5_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pyfd_puts", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_puts" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_puts" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)pyfd_puts(arg1,(char const *)arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (EVP_CIPHER *)EVP_cast5_ecb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_gets(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cast5_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pyfd_gets", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_gets" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pyfd_gets" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_gets" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)pyfd_gets(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (EVP_CIPHER *)EVP_cast5_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cast5_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_new" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)pyfd_new(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_cast5_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cast5_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_free" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)pyfd_free(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_cast5_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pyfd_ctrl(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc4(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - int arg2 ; - long arg3 ; - void *arg4 = (void *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - long val3 ; - int ecode3 = 0 ; - int res4 ; - PyObject *swig_obj[4] ; - long result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pyfd_ctrl", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pyfd_ctrl" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pyfd_ctrl" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_long(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pyfd_ctrl" "', argument " "3"" of type '" "long""'"); - } - arg3 = (long)(val3); - res4 = SWIG_ConvertPtr(swig_obj[3],SWIG_as_voidptrptr(&arg4), 0, 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pyfd_ctrl" "', argument " "4"" of type '" "void *""'"); - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (long)pyfd_ctrl(arg1,arg2,arg3,arg4); - resultobj = SWIG_From_long((long)(result)); + result = (EVP_CIPHER *)EVP_rc4(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_new_pyfd(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc2_40_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - int arg2 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - BIO *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_new_pyfd", 2, 2, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bio_new_pyfd" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_pyfd" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (BIO *)BIO_new_pyfd(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + result = (EVP_CIPHER *)EVP_rc2_40_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bn_rand(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_128_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - int arg2 ; - int arg3 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bn_rand", 3, 3, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bn_rand" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bn_rand" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bn_rand" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (PyObject *)bn_rand(arg1,arg2,arg3); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_aes_128_ecb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bn_rand_range(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_128_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - result = (PyObject *)bn_rand_range(arg1); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_aes_128_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_file_name__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_aes_128_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - size_t arg2 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - char *result = 0 ; + EVP_CIPHER *result = 0 ; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_file_name" "', argument " "1"" of type '" "char *""'"); - } - arg1 = (char *)(buf1); - ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_file_name" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - result = (char *)RAND_file_name(arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + result = (EVP_CIPHER *)EVP_aes_128_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_rand_load_file(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_128_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - long arg2 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rand_load_file", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_load_file" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_load_file" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); - result = (int)RAND_load_file((char const *)arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + result = (EVP_CIPHER *)EVP_aes_128_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_rand_save_file(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_128_ctr(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject *swig_obj[1] ; - int result; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_save_file" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - result = (int)RAND_write_file((char const *)arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + result = (EVP_CIPHER *)EVP_aes_128_ctr(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_rand_poll(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_192_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rand_poll", 0, 0, 0)) SWIG_fail; - result = (int)RAND_poll(); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_aes_192_ecb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_status(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_192_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int result; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rand_status", 0, 0, 0)) SWIG_fail; - result = (int)RAND_status(); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_CIPHER *)EVP_aes_192_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_cleanup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_192_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rand_cleanup", 0, 0, 0)) SWIG_fail; - RAND_cleanup(); - resultobj = SWIG_Py_Void(); + result = (EVP_CIPHER *)EVP_aes_192_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN int Swig_var__rand_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_rand_err""' of type '""PyObject *""'"); - } - _rand_err = (PyObject *)(argp); - } - return 0; +SWIGINTERN PyObject *_wrap_aes_192_ofb(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_CIPHER *result = 0 ; + + result = (EVP_CIPHER *)EVP_aes_192_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + return resultobj; fail: - return 1; + return NULL; } -SWIGINTERN PyObject *Swig_var__rand_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; +SWIGINTERN PyObject *_wrap_aes_192_ctr(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_CIPHER *result = 0 ; - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_rand_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; + result = (EVP_CIPHER *)EVP_aes_192_ctr(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + return resultobj; +fail: + return NULL; } -SWIGINTERN PyObject *_wrap_rand_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_256_ecb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - rand_init(arg1); - resultobj = SWIG_Py_Void(); + result = (EVP_CIPHER *)EVP_aes_256_ecb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_seed(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_256_cbc(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - result = (PyObject *)rand_seed(arg1); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_aes_256_cbc(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_add(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_256_cfb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - double arg2 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rand_add", 2, 2, swig_obj)) SWIG_fail; - { - arg1=swig_obj[0]; - } - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_add" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - result = (PyObject *)rand_add(arg1,arg2); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_aes_256_cfb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_bytes(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_256_ofb(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rand_bytes" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (PyObject *)rand_bytes(arg1); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_aes_256_ofb(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_pseudo_bytes(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_256_ctr(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + EVP_CIPHER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rand_pseudo_bytes" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (PyObject *)rand_pseudo_bytes(arg1); - { - resultobj=result; - } + result = (EVP_CIPHER *)EVP_aes_256_ctr(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rand_file_name__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { +SWIGINTERN PyObject *_wrap_cipher_set_padding(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *result = 0 ; + EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; - result = (PyObject *)rand_file_name(); + if(!PyArg_UnpackTuple(args,(char *)"cipher_set_padding",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_set_padding" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + } + arg1 = (EVP_CIPHER_CTX *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cipher_set_padding" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { - resultobj=result; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_CIPHER_CTX_set_padding(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -14657,46 +13687,25 @@ fail: } -SWIGINTERN PyObject *_wrap_rand_file_name(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; +SWIGINTERN PyObject *_wrap_pkey_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!(argc = SWIG_Python_UnpackTuple(args, "rand_file_name", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 0) { - return _wrap_rand_file_name__SWIG_1(self, argc, argv); + if(!PyArg_UnpackTuple(args,(char *)"pkey_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_free" "', argument " "1"" of type '" "EVP_PKEY *""'"); } - if (argc == 2) { - int _v; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_rand_file_name__SWIG_0(self, argc, argv); - } + arg1 = (EVP_PKEY *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'rand_file_name'.\n" - " Possible C/C++ prototypes are:\n" - " RAND_file_name(char *,size_t)\n" - " rand_file_name()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_rand_screen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - - if (!SWIG_Python_UnpackTuple(args, "rand_screen", 0, 0, 0)) SWIG_fail; - rand_screen(); + EVP_PKEY_free(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -14704,171 +13713,370 @@ fail: } -SWIGINTERN PyObject *_wrap_rand_win32_event(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_assign(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - unsigned int arg1 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; int arg2 ; - long arg3 ; - unsigned int val1 ; - int ecode1 = 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; int val2 ; int ecode2 = 0 ; - long val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "rand_win32_event", 3, 3, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rand_win32_event" "', argument " "1"" of type '" "unsigned int""'"); - } - arg1 = (unsigned int)(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if(!PyArg_UnpackTuple(args,(char *)"pkey_assign",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_assign" "', argument " "1"" of type '" "EVP_PKEY *""'"); + } + arg1 = (EVP_PKEY *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_win32_event" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkey_assign" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - ecode3 = SWIG_AsVal_long(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rand_win32_event" "', argument " "3"" of type '" "long""'"); - } - arg3 = (long)(val3); - result = (int)rand_win32_event(arg1,arg2,arg3); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkey_assign" "', argument " "3"" of type '" "char *""'"); + } + arg3 = (char *)(buf3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_PKEY_assign(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_md5(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_MD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "md5", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_md5(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sha1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_MD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "sha1", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_sha1(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ripemd160(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_assign_ec(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD *result = 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + EC_KEY *arg2 = (EC_KEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ripemd160", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_ripemd160(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_assign_ec",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_assign_ec" "', argument " "1"" of type '" "EVP_PKEY *""'"); + } + arg1 = (EVP_PKEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_assign_ec" "', argument " "2"" of type '" "EC_KEY *""'"); + } + arg2 = (EC_KEY *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_PKEY_assign_EC_KEY(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sha224(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_set1_rsa(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD *result = 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + RSA *arg2 = (RSA *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sha224", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_sha224(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_set1_rsa",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_set1_rsa" "', argument " "1"" of type '" "EVP_PKEY *""'"); + } + arg1 = (EVP_PKEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_set1_rsa" "', argument " "2"" of type '" "RSA *""'"); + } + arg2 = (RSA *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_PKEY_set1_RSA(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sha256(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sign_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_MD *arg2 = (EVP_MD *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sha256", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_sha256(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sign_init",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sign_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sign_init" "', argument " "2"" of type '" "EVP_MD const *""'"); + } + arg2 = (EVP_MD *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_SignInit(arg1,(EVP_MD const *)arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sha384(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_verify_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_MD *arg2 = (EVP_MD *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sha384", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_sha384(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"verify_init",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "verify_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "verify_init" "', argument " "2"" of type '" "EVP_MD const *""'"); + } + arg2 = (EVP_MD *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_VerifyInit(arg1,(EVP_MD const *)arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sha512(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_sign_init__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_PKEY_CTX **arg2 = (EVP_PKEY_CTX **) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; + ENGINE *arg4 = (ENGINE *) 0 ; + EVP_PKEY *arg5 = (EVP_PKEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sha512", 0, 0, 0)) SWIG_fail; - result = (EVP_MD *)EVP_sha512(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_sign_init",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_EVP_PKEY_CTX, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_sign_init" "', argument " "2"" of type '" "EVP_PKEY_CTX **""'"); + } + arg2 = (EVP_PKEY_CTX **)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "digest_sign_init" "', argument " "3"" of type '" "EVP_MD const *""'"); + } + arg3 = (EVP_MD *)(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ENGINE, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "digest_sign_init" "', argument " "4"" of type '" "ENGINE *""'"); + } + arg4 = (ENGINE *)(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "digest_sign_init" "', argument " "5"" of type '" "EVP_PKEY *""'"); + } + arg5 = (EVP_PKEY *)(argp5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_DigestSignInit(arg1,arg2,(EVP_MD const *)arg3,arg4,arg5); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_digest_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_verify_init__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_MD *arg2 = (EVP_MD *) 0 ; + EVP_PKEY_CTX **arg2 = (EVP_PKEY_CTX **) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; + ENGINE *arg4 = (ENGINE *) 0 ; + EVP_PKEY *arg5 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "digest_init", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_verify_init",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_EVP_PKEY_CTX, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_init" "', argument " "2"" of type '" "EVP_MD const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_verify_init" "', argument " "2"" of type '" "EVP_PKEY_CTX **""'"); } - arg2 = (EVP_MD *)(argp2); + arg2 = (EVP_PKEY_CTX **)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "digest_verify_init" "', argument " "3"" of type '" "EVP_MD const *""'"); + } + arg3 = (EVP_MD *)(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ENGINE, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "digest_verify_init" "', argument " "4"" of type '" "ENGINE *""'"); + } + arg4 = (ENGINE *)(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "digest_verify_init" "', argument " "5"" of type '" "EVP_PKEY *""'"); + } + arg5 = (EVP_PKEY *)(argp5); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg2) { + if (!arg3) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_DigestInit(arg1,(EVP_MD const *)arg2); + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_DigestVerifyInit(arg1,arg2,(EVP_MD const *)arg3,arg4,arg5); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -14879,515 +14087,778 @@ fail: } -SWIGINTERN PyObject *_wrap_des_ecb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_size(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "des_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ecb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_size",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_size" "', argument " "1"" of type '" "EVP_PKEY *""'"); + } + arg1 = (EVP_PKEY *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)EVP_PKEY_size(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede_ecb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "des_ede_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; +SWIGINTERN int Swig_var__evp_err_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_evp_err""' of type '""PyObject *""'"); + } + _evp_err = (PyObject *)(argp); + } + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_des_ede3_ecb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *Swig_var__evp_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_evp_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_evp_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ede3_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede3(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"evp_init",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; + } + evp_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_get1_rsa(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + RSA *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_get1_rsa",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_get1_rsa" "', argument " "1"" of type '" "EVP_PKEY *""'"); + } + arg1 = (EVP_PKEY *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (RSA *)pkey_get1_rsa(arg1); + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_RSA, 0); + else { + resultobj = NULL; + } + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs5_pbkdf2_hmac_sha1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; + int arg4 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ede_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs5_pbkdf2_hmac_sha1",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + arg1=obj0; + } + { + arg2=obj1; + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkcs5_pbkdf2_hmac_sha1" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs5_pbkdf2_hmac_sha1" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); + result = (PyObject *)pkcs5_pbkdf2_hmac_sha1(arg1,arg2,arg3,arg4); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede3_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_md_ctx_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ede3_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede3_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + result = (EVP_MD_CTX *)md_ctx_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_cfb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_md_ctx_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"md_ctx_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "md_ctx_free" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + md_ctx_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede_cfb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "des_ede_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + { + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)digest_update(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede3_cfb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ede3_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede3_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_final",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)digest_final(arg1); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ofb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hmac_ctx_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + HMAC_CTX *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + result = (HMAC_CTX *)hmac_ctx_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HMAC_CTX, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede_ofb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hmac_ctx_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ede_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"hmac_ctx_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_ctx_free" "', argument " "1"" of type '" "HMAC_CTX *""'"); + } + arg1 = (HMAC_CTX *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + hmac_ctx_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_des_ede3_ofb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hmac_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "des_ede3_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_des_ede3_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"hmac_init",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_init" "', argument " "1"" of type '" "HMAC_CTX *""'"); + } + arg1 = (HMAC_CTX *)(argp1); + { + arg2=obj1; + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hmac_init" "', argument " "3"" of type '" "EVP_MD const *""'"); + } + arg3 = (EVP_MD *)(argp3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)hmac_init(arg1,arg2,(EVP_MD const *)arg3); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bf_ecb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hmac_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bf_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_bf_ecb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"hmac_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_update" "', argument " "1"" of type '" "HMAC_CTX *""'"); + } + arg1 = (HMAC_CTX *)(argp1); + { + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)hmac_update(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bf_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hmac_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bf_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_bf_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"hmac_final",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_final" "', argument " "1"" of type '" "HMAC_CTX *""'"); + } + arg1 = (HMAC_CTX *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)hmac_final(arg1); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bf_cfb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_hmac(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bf_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_bf_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; + if(!PyArg_UnpackTuple(args,(char *)"hmac",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + { + arg1=obj0; + } + { + arg2=obj1; + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hmac" "', argument " "3"" of type '" "EVP_MD const *""'"); + } + arg3 = (EVP_MD *)(argp3); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)hmac(arg1,arg2,(EVP_MD const *)arg3); + { + resultobj=result; + } + return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bf_ofb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cipher_ctx_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_CIPHER_CTX *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bf_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_bf_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + result = (EVP_CIPHER_CTX *)cipher_ctx_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cast5_ecb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cipher_ctx_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "cast5_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_cast5_ecb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"cipher_ctx_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_ctx_free" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + } + arg1 = (EVP_CIPHER_CTX *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + cipher_ctx_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cast5_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bytes_to_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_CIPHER *arg1 = (EVP_CIPHER *) 0 ; + EVP_MD *arg2 = (EVP_MD *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; + PyObject *arg5 = (PyObject *) 0 ; + int arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "cast5_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_cast5_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bytes_to_key",6,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bytes_to_key" "', argument " "1"" of type '" "EVP_CIPHER const *""'"); + } + arg1 = (EVP_CIPHER *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bytes_to_key" "', argument " "2"" of type '" "EVP_MD *""'"); + } + arg2 = (EVP_MD *)(argp2); + { + arg3=obj2; + } + { + arg4=obj3; + } + { + arg5=obj4; + } + ecode6 = SWIG_AsVal_int(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "bytes_to_key" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)bytes_to_key((EVP_CIPHER const *)arg1,arg2,arg3,arg4,arg5,arg6); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cast5_cfb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cipher_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; + EVP_CIPHER *arg2 = (EVP_CIPHER *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; + int arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "cast5_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_cast5_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"cipher_init",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_init" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + } + arg1 = (EVP_CIPHER_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cipher_init" "', argument " "2"" of type '" "EVP_CIPHER const *""'"); + } + arg2 = (EVP_CIPHER *)(argp2); + { + arg3=obj2; + } + { + arg4=obj3; + } + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cipher_init" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)cipher_init(arg1,(EVP_CIPHER const *)arg2,arg3,arg4,arg5); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cast5_ofb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cipher_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "cast5_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_cast5_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"cipher_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_update" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + } + arg1 = (EVP_CIPHER_CTX *)(argp1); + { + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)cipher_update(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rc4(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_cipher_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rc4", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_rc4(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"cipher_final",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_final" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + } + arg1 = (EVP_CIPHER_CTX *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)cipher_final(arg1); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rc2_40_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sign_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rc2_40_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_rc2_40_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sign_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sign_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + { + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)sign_update(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_aes_128_ecb(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sign_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "aes_128_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_128_ecb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sign_final",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sign_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sign_final" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)sign_final(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_aes_128_cbc(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_verify_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "aes_128_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_128_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_128_cfb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_128_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_128_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_128_ofb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_128_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_128_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_128_ctr(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_128_ctr", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_128_ctr(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_192_ecb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_192_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_192_ecb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_192_cbc(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_192_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_192_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_192_cfb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_192_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_192_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_192_ofb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_192_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_192_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_192_ctr(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_192_ctr", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_192_ctr(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_256_ecb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_256_ecb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_256_ecb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_256_cbc(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_256_cbc", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_256_cbc(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_256_cfb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_256_cfb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_256_cfb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_256_ofb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_256_ofb", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_256_ofb(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_aes_256_ctr(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "aes_256_ctr", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER *)EVP_aes_256_ctr(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_cipher_set_padding(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "cipher_set_padding", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"verify_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_set_padding" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "verify_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + } + arg1 = (EVP_MD_CTX *)(argp1); + { + arg2=obj1; } - arg1 = (EVP_CIPHER_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cipher_set_padding" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_CIPHER_CTX_set_padding(arg1,arg2); + result = (int)verify_update(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -15398,113 +14869,189 @@ fail: } -SWIGINTERN PyObject *_wrap_pkey_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_verify_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + EVP_PKEY *arg3 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"verify_final",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_free" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "verify_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } - arg1 = (EVP_PKEY *)(argp1); + arg1 = (EVP_MD_CTX *)(argp1); + { + arg2=obj1; + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "verify_final" "', argument " "3"" of type '" "EVP_PKEY *""'"); + } + arg3 = (EVP_PKEY *)(argp3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - EVP_PKEY_free(arg1); - resultobj = SWIG_Py_Void(); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)verify_final(arg1,arg2,arg3); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkey_assign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_sign_init__SWIG_1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject *swig_obj[3] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "pkey_assign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_sign_init",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_assign" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } - arg1 = (EVP_PKEY *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkey_assign" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkey_assign" "', argument " "3"" of type '" "char *""'"); + arg1 = (EVP_MD_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_sign_init" "', argument " "2"" of type '" "EVP_PKEY *""'"); } - arg3 = (char *)(buf3); + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_PKEY_assign(arg1,arg2,arg3); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)digest_sign_init(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_pkey_assign_ec(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; - EC_KEY *arg2 = (EC_KEY *) 0 ; +SWIGINTERN PyObject *_wrap_digest_sign_init(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = args ? (int)PyObject_Length(args) : 0; + for (ii = 0; (ii < 5) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_EVP_PKEY, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_digest_sign_init__SWIG_1(self, args); + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_EVP_PKEY_CTX, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_EVP_MD, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ENGINE, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_EVP_PKEY, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_digest_sign_init__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'digest_sign_init'.\n" + " Possible C/C++ prototypes are:\n" + " EVP_DigestSignInit(EVP_MD_CTX *,EVP_PKEY_CTX **,EVP_MD const *,ENGINE *,EVP_PKEY *)\n" + " digest_sign_init(EVP_MD_CTX *,EVP_PKEY *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_digest_sign_update(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkey_assign_ec", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_sign_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_assign_ec" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } - arg1 = (EVP_PKEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EC_KEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_assign_ec" "', argument " "2"" of type '" "EC_KEY *""'"); + arg1 = (EVP_MD_CTX *)(argp1); + { + arg2=obj1; } - arg2 = (EC_KEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_PKEY_assign_EC_KEY(arg1,arg2); + result = (PyObject *)digest_sign_update(arg1,arg2); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -15512,42 +15059,28 @@ fail: } -SWIGINTERN PyObject *_wrap_pkey_set1_rsa(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_sign_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; - RSA *arg2 = (RSA *) 0 ; + EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkey_set1_rsa", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_sign_final",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_set1_rsa" "', argument " "1"" of type '" "EVP_PKEY *""'"); - } - arg1 = (EVP_PKEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_RSA, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_set1_rsa" "', argument " "2"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } - arg2 = (RSA *)(argp2); + arg1 = (EVP_MD_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)digest_sign_final(arg1); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)EVP_PKEY_set1_RSA(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -15555,28 +15088,29 @@ fail: } -SWIGINTERN PyObject *_wrap_sign_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_verify_init__SWIG_1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_MD *arg2 = (EVP_MD *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sign_init", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_verify_init",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sign_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sign_init" "', argument " "2"" of type '" "EVP_MD const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_verify_init" "', argument " "2"" of type '" "EVP_PKEY *""'"); } - arg2 = (EVP_MD *)(argp2); + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -15587,7 +15121,7 @@ SWIGINTERN PyObject *_wrap_sign_init(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_SignInit(arg1,(EVP_MD const *)arg2); + result = (int)digest_verify_init(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -15598,39 +15132,94 @@ fail: } -SWIGINTERN PyObject *_wrap_verify_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_digest_verify_init(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = args ? (int)PyObject_Length(args) : 0; + for (ii = 0; (ii < 5) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_EVP_PKEY, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_digest_verify_init__SWIG_1(self, args); + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_EVP_PKEY_CTX, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_EVP_MD, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ENGINE, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_EVP_PKEY, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_digest_verify_init__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'digest_verify_init'.\n" + " Possible C/C++ prototypes are:\n" + " EVP_DigestVerifyInit(EVP_MD_CTX *,EVP_PKEY_CTX **,EVP_MD const *,ENGINE *,EVP_PKEY *)\n" + " digest_verify_init(EVP_MD_CTX *,EVP_PKEY *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_digest_verify_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_MD *arg2 = (EVP_MD *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "verify_init", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_verify_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "verify_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "verify_init" "', argument " "2"" of type '" "EVP_MD const *""'"); - } - arg2 = (EVP_MD *)(argp2); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg2=obj1; } { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_VerifyInit(arg1,(EVP_MD const *)arg2); + result = (int)digest_verify_update(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -15641,67 +15230,31 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_sign_init__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_digest_verify_final(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_PKEY_CTX **arg2 = (EVP_PKEY_CTX **) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; - ENGINE *arg4 = (ENGINE *) 0 ; - EVP_PKEY *arg5 = (EVP_PKEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"digest_verify_final",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); } arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_EVP_PKEY_CTX, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_sign_init" "', argument " "2"" of type '" "EVP_PKEY_CTX **""'"); - } - arg2 = (EVP_PKEY_CTX **)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "digest_sign_init" "', argument " "3"" of type '" "EVP_MD const *""'"); - } - arg3 = (EVP_MD *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "digest_sign_init" "', argument " "4"" of type '" "ENGINE *""'"); - } - arg4 = (ENGINE *)(argp4); - res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "digest_sign_init" "', argument " "5"" of type '" "EVP_PKEY *""'"); - } - arg5 = (EVP_PKEY *)(argp5); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg2=obj1; } { - if (!arg5) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_DigestSignInit(arg1,arg2,(EVP_MD const *)arg3,arg4,arg5); + result = (int)digest_verify_final(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -15712,67 +15265,82 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_verify_init__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_get_digestbyname(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_PKEY_CTX **arg2 = (EVP_PKEY_CTX **) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; - ENGINE *arg4 = (ENGINE *) 0 ; - EVP_PKEY *arg5 = (EVP_PKEY *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - int result; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + EVP_MD *result = 0 ; - if ((nobjs < 5) || (nobjs > 5)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"get_digestbyname",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_digestbyname" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_EVP_PKEY_CTX, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_verify_init" "', argument " "2"" of type '" "EVP_PKEY_CTX **""'"); - } - arg2 = (EVP_PKEY_CTX **)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "digest_verify_init" "', argument " "3"" of type '" "EVP_MD const *""'"); + arg1 = (char *)(buf1); + result = (EVP_MD *)get_digestbyname((char const *)arg1); + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_MD, 0); + else { + resultobj = NULL; + } } - arg3 = (EVP_MD *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "digest_verify_init" "', argument " "4"" of type '" "ENGINE *""'"); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_pkey_write_pem_no_cipher(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + BIO *arg2 = (BIO *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"pkey_write_pem_no_cipher",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_write_pem_no_cipher" "', argument " "1"" of type '" "EVP_PKEY *""'"); } - arg4 = (ENGINE *)(argp4); - res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "digest_verify_init" "', argument " "5"" of type '" "EVP_PKEY *""'"); + arg1 = (EVP_PKEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_write_pem_no_cipher" "', argument " "2"" of type '" "BIO *""'"); } - arg5 = (EVP_PKEY *)(argp5); + arg2 = (BIO *)(argp2); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + if (!PyCallable_Check(obj2)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; } + arg3=obj2; } { - if (!arg3) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg5) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_DigestVerifyInit(arg1,arg2,(EVP_MD const *)arg3,arg4,arg5); + result = (int)pkey_write_pem_no_cipher(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -15783,27 +15351,63 @@ fail: } -SWIGINTERN PyObject *_wrap_pkey_size(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_write_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + BIO *arg2 = (BIO *) 0 ; + EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_write_pem",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_size" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_write_pem" "', argument " "1"" of type '" "EVP_PKEY *""'"); } arg1 = (EVP_PKEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_write_pem" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkey_write_pem" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + } + arg3 = (EVP_CIPHER *)(argp3); + { + if (!PyCallable_Check(obj3)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg4=obj3; + } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)EVP_PKEY_size(arg1); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pkey_write_pem(arg1,arg2,arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -15814,75 +15418,60 @@ fail: } -SWIGINTERN int Swig_var__evp_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_evp_err""' of type '""PyObject *""'"); - } - _evp_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__evp_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_evp_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_evp_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; + EVP_PKEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; + result = (EVP_PKEY *)pkey_new(); { - arg1=swig_obj[0]; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_PKEY, 0); + else { + resultobj = NULL; + } } - evp_init(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkey_get1_rsa(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_read_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + BIO *arg1 = (BIO *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - RSA *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + EVP_PKEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_read_pem",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_get1_rsa" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_read_pem" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; } - arg1 = (EVP_PKEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (RSA *)pkey_get1_rsa(arg1); + result = (EVP_PKEY *)pkey_read_pem(arg1,arg2); { PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_RSA, 0); + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_PKEY, 0); else { resultobj = NULL; } @@ -15893,110 +15482,84 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs5_pbkdf2_hmac_sha1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_read_pem_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; + BIO *arg1 = (BIO *) 0 ; PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; - int arg4 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - PyObject *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "pkcs5_pbkdf2_hmac_sha1", 4, 4, swig_obj)) SWIG_fail; - { - arg1=swig_obj[0]; - } - { - arg2=swig_obj[1]; - } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkcs5_pbkdf2_hmac_sha1" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs5_pbkdf2_hmac_sha1" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - result = (PyObject *)pkcs5_pbkdf2_hmac_sha1(arg1,arg2,arg3,arg4); - { - resultobj=result; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_md_ctx_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_MD_CTX *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "md_ctx_new", 0, 0, 0)) SWIG_fail; - result = (EVP_MD_CTX *)md_ctx_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_md_ctx_free(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + EVP_PKEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_read_pem_pubkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "md_ctx_free" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_read_pem_pubkey" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; } - arg1 = (EVP_MD_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - md_ctx_free(arg1); - resultobj = SWIG_Py_Void(); + result = (EVP_PKEY *)pkey_read_pem_pubkey(arg1,arg2); + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_PKEY, 0); + else { + resultobj = NULL; + } + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_digest_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_assign_rsa(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + RSA *arg2 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "digest_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_assign_rsa",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_assign_rsa" "', argument " "1"" of type '" "EVP_PKEY *""'"); } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (EVP_PKEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_assign_rsa" "', argument " "2"" of type '" "RSA *""'"); } + arg2 = (RSA *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)digest_update(arg1,arg2); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)pkey_assign_rsa(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -16007,27 +15570,26 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_final(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_as_der(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_as_der",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_as_der" "', argument " "1"" of type '" "EVP_PKEY *""'"); } - arg1 = (EVP_MD_CTX *)(argp1); + arg1 = (EVP_PKEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)digest_final(arg1); + result = (PyObject *)pkey_as_der(arg1); { resultobj=result; } @@ -16037,116 +15599,116 @@ fail: } -SWIGINTERN PyObject *_wrap_hmac_ctx_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - HMAC_CTX *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "hmac_ctx_new", 0, 0, 0)) SWIG_fail; - result = (HMAC_CTX *)hmac_ctx_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HMAC_CTX, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_hmac_ctx_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkey_get_modulus(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkey_get_modulus",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_ctx_free" "', argument " "1"" of type '" "HMAC_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_get_modulus" "', argument " "1"" of type '" "EVP_PKEY *""'"); } - arg1 = (HMAC_CTX *)(argp1); + arg1 = (EVP_PKEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - hmac_ctx_free(arg1); - resultobj = SWIG_Py_Void(); + result = (PyObject *)pkey_get_modulus(arg1); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_hmac_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_aes_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; + AES_KEY *result = 0 ; + + result = (AES_KEY *)aes_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AES_KEY, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AES_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + AES_KEY *arg1 = (AES_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "hmac_init", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"AES_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_init" "', argument " "1"" of type '" "HMAC_CTX *""'"); - } - arg1 = (HMAC_CTX *)(argp1); - { - arg2=swig_obj[1]; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hmac_init" "', argument " "3"" of type '" "EVP_MD const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_free" "', argument " "1"" of type '" "AES_KEY *""'"); } - arg3 = (EVP_MD *)(argp3); + arg1 = (AES_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)hmac_init(arg1,arg2,(EVP_MD const *)arg3); - { - resultobj=result; - } + AES_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_hmac_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_AES_set_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + AES_KEY *arg1 = (AES_KEY *) 0 ; PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "hmac_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"AES_set_key",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_update" "', argument " "1"" of type '" "HMAC_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_set_key" "', argument " "1"" of type '" "AES_KEY *""'"); } - arg1 = (HMAC_CTX *)(argp1); + arg1 = (AES_KEY *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AES_set_key" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AES_set_key" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)hmac_update(arg1,arg2); + result = (PyObject *)AES_set_key(arg1,arg2,arg3,arg4); { resultobj=result; } @@ -16156,27 +15718,49 @@ fail: } -SWIGINTERN PyObject *_wrap_hmac_final(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_AES_crypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - HMAC_CTX *arg1 = (HMAC_CTX *) 0 ; + AES_KEY *arg1 = (AES_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_HMAC_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"AES_crypt",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hmac_final" "', argument " "1"" of type '" "HMAC_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_crypt" "', argument " "1"" of type '" "AES_KEY const *""'"); } - arg1 = (HMAC_CTX *)(argp1); + arg1 = (AES_KEY *)(argp1); + { + arg2=obj1; + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AES_crypt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AES_crypt" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)hmac_final(arg1); + result = (PyObject *)AES_crypt((AES_KEY const *)arg1,arg2,arg3,arg4); { resultobj=result; } @@ -16186,36 +15770,29 @@ fail: } -SWIGINTERN PyObject *_wrap_hmac(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_AES_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + AES_KEY *arg1 = (AES_KEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "hmac", 3, 3, swig_obj)) SWIG_fail; - { - arg1=swig_obj[0]; - } - { - arg2=swig_obj[1]; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hmac" "', argument " "3"" of type '" "EVP_MD const *""'"); + if(!PyArg_UnpackTuple(args,(char *)"AES_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_type_check" "', argument " "1"" of type '" "AES_KEY *""'"); } - arg3 = (EVP_MD *)(argp3); + arg1 = (AES_KEY *)(argp1); { - if (!arg3) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)hmac(arg1,arg2,(EVP_MD const *)arg3); + result = (int)AES_type_check(arg1); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -16223,39 +15800,37 @@ fail: } -SWIGINTERN PyObject *_wrap_cipher_ctx_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc4_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER_CTX *result = 0 ; + RC4_KEY *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "cipher_ctx_new", 0, 0, 0)) SWIG_fail; - result = (EVP_CIPHER_CTX *)cipher_ctx_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + result = (RC4_KEY *)rc4_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RC4_KEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_cipher_ctx_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc4_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; + RC4_KEY *arg1 = (RC4_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rc4_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_ctx_free" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_free" "', argument " "1"" of type '" "RC4_KEY *""'"); } - arg1 = (EVP_CIPHER_CTX *)(argp1); + arg1 = (RC4_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - cipher_ctx_free(arg1); + rc4_free(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -16263,59 +15838,31 @@ fail: } -SWIGINTERN PyObject *_wrap_bytes_to_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc4_set_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER *arg1 = (EVP_CIPHER *) 0 ; - EVP_MD *arg2 = (EVP_MD *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; - PyObject *arg5 = (PyObject *) 0 ; - int arg6 ; + RC4_KEY *arg1 = (RC4_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val6 ; - int ecode6 = 0 ; - PyObject *swig_obj[6] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bytes_to_key", 6, 6, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rc4_set_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bytes_to_key" "', argument " "1"" of type '" "EVP_CIPHER const *""'"); - } - arg1 = (EVP_CIPHER *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bytes_to_key" "', argument " "2"" of type '" "EVP_MD *""'"); - } - arg2 = (EVP_MD *)(argp2); - { - arg3=swig_obj[2]; - } - { - arg4=swig_obj[3]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_set_key" "', argument " "1"" of type '" "RC4_KEY *""'"); } + arg1 = (RC4_KEY *)(argp1); { - arg5=swig_obj[4]; + arg2=obj1; } - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "bytes_to_key" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)bytes_to_key((EVP_CIPHER const *)arg1,arg2,arg3,arg4,arg5,arg6); + result = (PyObject *)rc4_set_key(arg1,arg2); { resultobj=result; } @@ -16325,55 +15872,31 @@ fail: } -SWIGINTERN PyObject *_wrap_cipher_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc4_update(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; - EVP_CIPHER *arg2 = (EVP_CIPHER *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; - int arg5 ; + RC4_KEY *arg1 = (RC4_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "cipher_init", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rc4_update",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_init" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); - } - arg1 = (EVP_CIPHER_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cipher_init" "', argument " "2"" of type '" "EVP_CIPHER const *""'"); - } - arg2 = (EVP_CIPHER *)(argp2); - { - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_update" "', argument " "1"" of type '" "RC4_KEY *""'"); } + arg1 = (RC4_KEY *)(argp1); { - arg4=swig_obj[3]; + arg2=obj1; } - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cipher_init" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)cipher_init(arg1,(EVP_CIPHER const *)arg2,arg3,arg4,arg5); + result = (PyObject *)rc4_update(arg1,arg2); { resultobj=result; } @@ -16383,32 +15906,29 @@ fail: } -SWIGINTERN PyObject *_wrap_cipher_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rc4_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + RC4_KEY *arg1 = (RC4_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "cipher_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rc4_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_update" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); - } - arg1 = (EVP_CIPHER_CTX *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_type_check" "', argument " "1"" of type '" "RC4_KEY *""'"); } + arg1 = (RC4_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)cipher_update(arg1,arg2); + result = (int)rc4_type_check(arg1); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -16416,135 +15936,64 @@ fail: } -SWIGINTERN PyObject *_wrap_cipher_final(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - EVP_CIPHER_CTX *arg1 = (EVP_CIPHER_CTX *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_CIPHER_CTX, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cipher_final" "', argument " "1"" of type '" "EVP_CIPHER_CTX *""'"); - } - arg1 = (EVP_CIPHER_CTX *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)cipher_final(arg1); - { - resultobj=result; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sign_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + DH *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sign_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sign_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)sign_update(arg1,arg2); - { - resultobj=result; - } + result = (DH *)DH_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DH, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sign_final(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sign_final", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sign_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sign_final" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_free" "', argument " "1"" of type '" "DH *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)sign_final(arg1,arg2); - { - resultobj=result; - } + DH_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_verify_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_size(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "verify_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_size",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "verify_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_size" "', argument " "1"" of type '" "DH const *""'"); } + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)verify_update(arg1,arg2); + result = (int)DH_size((DH const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -16555,43 +16004,26 @@ fail: } -SWIGINTERN PyObject *_wrap_verify_final(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_generate_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - EVP_PKEY *arg3 = (EVP_PKEY *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "verify_final", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_generate_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "verify_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; - } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "verify_final" "', argument " "3"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_generate_key" "', argument " "1"" of type '" "DH *""'"); } - arg3 = (EVP_PKEY *)(argp3); + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)verify_final(arg1,arg2,arg3); + result = (int)DH_generate_key(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -16602,27 +16034,29 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_sign_init__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_dhparams_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + BIO *arg1 = (BIO *) 0 ; + DH *arg2 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dhparams_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dhparams_print" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_sign_init" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dhparams_print" "', argument " "2"" of type '" "DH const *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg2 = (DH *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -16633,7 +16067,11 @@ SWIGINTERN PyObject *_wrap_digest_sign_init__SWIG_1(PyObject *self, Py_ssize_t n SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)digest_sign_init(arg1,arg2); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)DHparams_print(arg1,(DH const *)arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -16644,123 +16082,71 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_sign_init(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[6] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "digest_sign_init", 0, 5, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_EVP_PKEY, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_digest_sign_init__SWIG_1(self, argc, argv); - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_EVP_PKEY_CTX, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_EVP_MD, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ENGINE, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_EVP_PKEY, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_digest_sign_init__SWIG_0(self, argc, argv); - } - } - } - } +SWIGINTERN int Swig_var__dh_err_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_dh_err""' of type '""PyObject *""'"); } + _dh_err = (PyObject *)(argp); } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'digest_sign_init'.\n" - " Possible C/C++ prototypes are:\n" - " EVP_DigestSignInit(EVP_MD_CTX *,EVP_PKEY_CTX **,EVP_MD const *,ENGINE *,EVP_PKEY *)\n" - " digest_sign_init(EVP_MD_CTX *,EVP_PKEY *)\n"); return 0; +fail: + return 1; } -SWIGINTERN PyObject *_wrap_digest_sign_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *Swig_var__dh_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_dh_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_dh_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "digest_sign_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)digest_sign_update(arg1,arg2); + if(!PyArg_UnpackTuple(args,(char *)"dh_init",1,1,&obj0)) SWIG_fail; { - resultobj=result; + arg1=obj0; } + dh_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_digest_sign_final(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_type_check" "', argument " "1"" of type '" "DH *""'"); } - arg1 = (EVP_MD_CTX *)(argp1); + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)digest_sign_final(arg1); + result = (int)dh_type_check(arg1); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -16768,71 +16154,97 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_sign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_read_parameters(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + DH *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "digest_sign", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_read_parameters",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_sign" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_read_parameters" "', argument " "1"" of type '" "BIO *""'"); } + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)digest_sign(arg1,arg2); { - resultobj=result; + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (DH *)dh_read_parameters(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DH, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_digest_verify_init__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_dh_generate_parameters(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + int arg1 ; + int arg2 ; + PyObject *arg3 = (PyObject *) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + DH *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"dh_generate_parameters",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dh_generate_parameters" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dh_generate_parameters" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!PyCallable_Check(obj2)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg3=obj2; + } + result = (DH *)dh_generate_parameters(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DH, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_dh_check(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + PyObject * obj0 = 0 ; int result; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_init" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "digest_verify_init" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_check" "', argument " "1"" of type '" "DH *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)digest_verify_init(arg1,arg2); + result = (int)dh_check(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -16843,94 +16255,62 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_verify_init(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[6] = { - 0 - }; +SWIGINTERN PyObject *_wrap_dh_compute_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + DH *arg1 = (DH *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!(argc = SWIG_Python_UnpackTuple(args, "digest_verify_init", 0, 5, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_EVP_PKEY, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_digest_verify_init__SWIG_1(self, argc, argv); - } - } + if(!PyArg_UnpackTuple(args,(char *)"dh_compute_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_compute_key" "', argument " "1"" of type '" "DH *""'"); } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EVP_MD_CTX, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_EVP_PKEY_CTX, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_EVP_MD, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ENGINE, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_EVP_PKEY, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_digest_verify_init__SWIG_0(self, argc, argv); - } - } - } - } + arg1 = (DH *)(argp1); + { + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - + result = (PyObject *)dh_compute_key(arg1,arg2); + { + resultobj=result; + } + return resultobj; fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'digest_verify_init'.\n" - " Possible C/C++ prototypes are:\n" - " EVP_DigestVerifyInit(EVP_MD_CTX *,EVP_PKEY_CTX **,EVP_MD const *,ENGINE *,EVP_PKEY *)\n" - " digest_verify_init(EVP_MD_CTX *,EVP_PKEY *)\n"); - return 0; + return NULL; } -SWIGINTERN PyObject *_wrap_digest_verify_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_get_p(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "digest_verify_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_get_p",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_update" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_p" "', argument " "1"" of type '" "DH *""'"); } + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)digest_verify_update(arg1,arg2); + result = (PyObject *)dh_get_p(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -16938,33 +16318,28 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_verify_final(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_get_g(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "digest_verify_final", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_get_g",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify_final" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_g" "', argument " "1"" of type '" "DH *""'"); } + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)digest_verify_final(arg1,arg2); + result = (PyObject *)dh_get_g(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -16972,37 +16347,28 @@ fail: } -SWIGINTERN PyObject *_wrap_digest_verify(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_get_pub(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_MD_CTX *arg1 = (EVP_MD_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + DH *arg1 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "digest_verify", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_MD_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_get_pub",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digest_verify" "', argument " "1"" of type '" "EVP_MD_CTX *""'"); - } - arg1 = (EVP_MD_CTX *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_pub" "', argument " "1"" of type '" "DH *""'"); } + arg1 = (DH *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)digest_verify(arg1,arg2,arg3); + result = (PyObject *)dh_get_pub(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -17010,84 +16376,67 @@ fail: } -SWIGINTERN PyObject *_wrap_get_digestbyname(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_get_priv(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject *swig_obj[1] ; - EVP_MD *result = 0 ; + DH *arg1 = (DH *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); + if(!PyArg_UnpackTuple(args,(char *)"dh_get_priv",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_digestbyname" "', argument " "1"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_priv" "', argument " "1"" of type '" "DH *""'"); } - arg1 = (char *)(buf1); - result = (EVP_MD *)get_digestbyname((char const *)arg1); + arg1 = (DH *)(argp1); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_MD, 0); - else { - resultobj = NULL; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + result = (PyObject *)dh_get_priv(arg1); + { + resultobj=result; + } return resultobj; fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_pkey_write_pem_no_cipher(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dh_set_pg(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; - BIO *arg2 = (BIO *) 0 ; + DH *arg1 = (DH *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkey_write_pem_no_cipher", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dh_set_pg",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DH, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_write_pem_no_cipher" "', argument " "1"" of type '" "EVP_PKEY *""'"); - } - arg1 = (EVP_PKEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_write_pem_no_cipher" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_set_pg" "', argument " "1"" of type '" "DH *""'"); } - arg2 = (BIO *)(argp2); + arg1 = (DH *)(argp1); { - if (!PyCallable_Check(swig_obj[2])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg3=swig_obj[2]; + arg2=obj1; } { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg3=obj2; } { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)pkey_write_pem_no_cipher(arg1,arg2,arg3); + result = (PyObject *)dh_set_pg(arg1,arg2,arg3); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -17095,60 +16444,94 @@ fail: } -SWIGINTERN PyObject *_wrap_pkey_write_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_size(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; - BIO *arg2 = (BIO *) 0 ; - EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + RSA *arg1 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "pkey_write_pem", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_size",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_write_pem" "', argument " "1"" of type '" "EVP_PKEY *""'"); - } - arg1 = (EVP_PKEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_write_pem" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkey_write_pem" "', argument " "3"" of type '" "EVP_CIPHER *""'"); - } - arg3 = (EVP_CIPHER *)(argp3); - { - if (!PyCallable_Check(swig_obj[3])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg4=swig_obj[3]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_size" "', argument " "1"" of type '" "RSA const *""'"); } + arg1 = (RSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)RSA_size((RSA const *)arg1); { - if (!arg2) { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rsa_new(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + RSA *result = 0 ; + + result = (RSA *)RSA_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RSA, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rsa_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + RSA *arg1 = (RSA *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"rsa_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_free" "', argument " "1"" of type '" "RSA *""'"); + } + arg1 = (RSA *)(argp1); + { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + RSA_free(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rsa_check_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + RSA *arg1 = (RSA *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"rsa_check_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_check_key" "', argument " "1"" of type '" "RSA const *""'"); + } + arg1 = (RSA *)(argp1); { - if (!arg3) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)pkey_write_pem(arg1,arg2,arg3,arg4); + result = (int)RSA_check_key((RSA const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -17159,135 +16542,193 @@ fail: } -SWIGINTERN PyObject *_wrap_pkey_new(PyObject *self, PyObject *args) { +SWIGINTERN int Swig_var__rsa_err_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_rsa_err""' of type '""PyObject *""'"); + } + _rsa_err = (PyObject *)(argp); + } + return 0; +fail: + return 1; +} + + +SWIGINTERN PyObject *Swig_var__rsa_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_rsa_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_rsa_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkey_new", 0, 0, 0)) SWIG_fail; - result = (EVP_PKEY *)pkey_new(); + if(!PyArg_UnpackTuple(args,(char *)"rsa_init",1,1,&obj0)) SWIG_fail; { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_PKEY, 0); - else { - resultobj = NULL; - } + arg1=obj0; } + rsa_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkey_read_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_read_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - EVP_PKEY *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + RSA *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkey_read_pem", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_read_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_read_pem" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_read_key" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); { - if (!PyCallable_Check(swig_obj[1])) { + if (!PyCallable_Check(obj1)) { PyErr_SetString(PyExc_TypeError, "expected PyCallable"); return NULL; } - arg2=swig_obj[1]; + arg2=obj1; } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (EVP_PKEY *)pkey_read_pem(arg1,arg2); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_PKEY, 0); - else { - resultobj = NULL; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (RSA *)rsa_read_key(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RSA, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkey_read_pem_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_write_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + RSA *arg1 = (RSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; + EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - EVP_PKEY *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "pkey_read_pem_pubkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_write_key",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_read_pem_pubkey" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_key" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (RSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_key" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rsa_write_key" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + } + arg3 = (EVP_CIPHER *)(argp3); { - if (!PyCallable_Check(swig_obj[1])) { + if (!PyCallable_Check(obj3)) { PyErr_SetString(PyExc_TypeError, "expected PyCallable"); return NULL; } - arg2=swig_obj[1]; + arg4=obj3; } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (EVP_PKEY *)pkey_read_pem_pubkey(arg1,arg2); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_EVP_PKEY, 0); - else { - resultobj = NULL; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)rsa_write_key(arg1,arg2,arg3,arg4); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkey_assign_rsa(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_write_key_no_cipher(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; - RSA *arg2 = (RSA *) 0 ; + RSA *arg1 = (RSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "pkey_assign_rsa", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_write_key_no_cipher",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_assign_rsa" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_key_no_cipher" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (EVP_PKEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + arg1 = (RSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkey_assign_rsa" "', argument " "2"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_key_no_cipher" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + { + if (!PyCallable_Check(obj2)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg3=obj2; } - arg2 = (RSA *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -17298,7 +16739,12 @@ SWIGINTERN PyObject *_wrap_pkey_assign_rsa(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)pkey_assign_rsa(arg1,arg2); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)rsa_write_key_no_cipher(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -17309,59 +16755,78 @@ fail: } -SWIGINTERN PyObject *_wrap_pkey_as_der(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_read_pub_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + RSA *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_read_pub_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_as_der" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_read_pub_key" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (EVP_PKEY *)(argp1); + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)pkey_as_der(arg1); { - resultobj=result; + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (RSA *)rsa_read_pub_key(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RSA, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkey_get_modulus(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_write_pub_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EVP_PKEY *arg1 = (EVP_PKEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_write_pub_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkey_get_modulus" "', argument " "1"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_pub_key" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (EVP_PKEY *)(argp1); + arg1 = (RSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_pub_key" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)pkey_get_modulus(arg1); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)rsa_write_pub_key(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -17369,86 +16834,89 @@ fail: } -SWIGINTERN PyObject *_wrap_aes_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_get_e(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - AES_KEY *result = 0 ; + RSA *arg1 = (RSA *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "aes_new", 0, 0, 0)) SWIG_fail; - result = (AES_KEY *)aes_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AES_KEY, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - + if(!PyArg_UnpackTuple(args,(char *)"rsa_get_e",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_get_e" "', argument " "1"" of type '" "RSA *""'"); + } + arg1 = (RSA *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)rsa_get_e(arg1); + { + resultobj=result; + } + return resultobj; +fail: + return NULL; +} -SWIGINTERN PyObject *_wrap_AES_free(PyObject *self, PyObject *args) { + +SWIGINTERN PyObject *_wrap_rsa_get_n(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - AES_KEY *arg1 = (AES_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_get_n",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_free" "', argument " "1"" of type '" "AES_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_get_n" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (AES_KEY *)(argp1); + arg1 = (RSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - AES_free(arg1); - resultobj = SWIG_Py_Void(); + result = (PyObject *)rsa_get_n(arg1); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_AES_set_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_set_e(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - AES_KEY *arg1 = (AES_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; - int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "AES_set_key", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_set_e",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_set_key" "', argument " "1"" of type '" "AES_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_e" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (AES_KEY *)(argp1); + arg1 = (RSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AES_set_key" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AES_set_key" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)AES_set_key(arg1,arg2,arg3,arg4); + result = (PyObject *)rsa_set_e(arg1,arg2); { resultobj=result; } @@ -17458,46 +16926,31 @@ fail: } -SWIGINTERN PyObject *_wrap_AES_crypt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_set_n(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - AES_KEY *arg1 = (AES_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; - int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "AES_crypt", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_set_n",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_crypt" "', argument " "1"" of type '" "AES_KEY const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_n" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (AES_KEY *)(argp1); + arg1 = (RSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AES_crypt" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AES_crypt" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)AES_crypt((AES_KEY const *)arg1,arg2,arg3,arg4); + result = (PyObject *)rsa_set_n(arg1,arg2); { resultobj=result; } @@ -17507,30 +16960,38 @@ fail: } -SWIGINTERN PyObject *_wrap_AES_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_set_en(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - AES_KEY *arg1 = (AES_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_AES_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_set_en",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AES_type_check" "', argument " "1"" of type '" "AES_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_en" "', argument " "1"" of type '" "RSA *""'"); + } + arg1 = (RSA *)(argp1); + { + arg2=obj1; + } + { + arg3=obj2; } - arg1 = (AES_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)AES_type_check(arg1); + result = (PyObject *)rsa_set_en(arg1,arg2,arg3); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -17538,70 +16999,97 @@ fail: } -SWIGINTERN PyObject *_wrap_rc4_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_PyObject_Bin_AsBIGNUM(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RC4_KEY *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + BIGNUM *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rc4_new", 0, 0, 0)) SWIG_fail; - result = (RC4_KEY *)rc4_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RC4_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"PyObject_Bin_AsBIGNUM",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; + } + result = (BIGNUM *)PyObject_Bin_AsBIGNUM(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rc4_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_set_en_bin(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RC4_KEY *arg1 = (RC4_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_set_en_bin",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_free" "', argument " "1"" of type '" "RC4_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_en_bin" "', argument " "1"" of type '" "RSA *""'"); + } + arg1 = (RSA *)(argp1); + { + arg2=obj1; + } + { + arg3=obj2; } - arg1 = (RC4_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - rc4_free(arg1); - resultobj = SWIG_Py_Void(); + result = (PyObject *)rsa_set_en_bin(arg1,arg2,arg3); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rc4_set_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_private_encrypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RC4_KEY *arg1 = (RC4_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rc4_set_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_private_encrypt",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_set_key" "', argument " "1"" of type '" "RC4_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_private_encrypt" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (RC4_KEY *)(argp1); + arg1 = (RSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_private_encrypt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rc4_set_key(arg1,arg2); + result = (PyObject *)rsa_private_encrypt(arg1,arg2,arg3); { resultobj=result; } @@ -17611,30 +17099,40 @@ fail: } -SWIGINTERN PyObject *_wrap_rc4_update(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_public_decrypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RC4_KEY *arg1 = (RC4_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rc4_update", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_public_decrypt",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_update" "', argument " "1"" of type '" "RC4_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_public_decrypt" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (RC4_KEY *)(argp1); + arg1 = (RSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_public_decrypt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rc4_update(arg1,arg2); + result = (PyObject *)rsa_public_decrypt(arg1,arg2,arg3); { resultobj=result; } @@ -17644,30 +17142,42 @@ fail: } -SWIGINTERN PyObject *_wrap_rc4_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_public_encrypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RC4_KEY *arg1 = (RC4_KEY *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RC4_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_public_encrypt",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rc4_type_check" "', argument " "1"" of type '" "RC4_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_public_encrypt" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (RC4_KEY *)(argp1); + arg1 = (RSA *)(argp1); + { + arg2=obj1; + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_public_encrypt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)rc4_type_check(arg1); + result = (PyObject *)rsa_public_encrypt(arg1,arg2,arg3); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -17675,101 +17185,99 @@ fail: } -SWIGINTERN PyObject *_wrap_dh_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - DH *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "dh_new", 0, 0, 0)) SWIG_fail; - result = (DH *)DH_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DH, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dh_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_private_decrypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_private_decrypt",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_free" "', argument " "1"" of type '" "DH *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_private_decrypt" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (DH *)(argp1); + arg1 = (RSA *)(argp1); + { + arg2=obj1; + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_private_decrypt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - DH_free(arg1); - resultobj = SWIG_Py_Void(); + result = (PyObject *)rsa_private_decrypt(arg1,arg2,arg3); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dh_size(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_padding_add_pkcs1_pss(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_padding_add_pkcs1_pss",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_size" "', argument " "1"" of type '" "DH const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_padding_add_pkcs1_pss" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (DH *)(argp1); + arg1 = (RSA *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg2=obj1; } - result = (int)DH_size((DH const *)arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rsa_padding_add_pkcs1_pss" "', argument " "3"" of type '" "EVP_MD *""'"); } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dh_generate_key(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_generate_key" "', argument " "1"" of type '" "DH *""'"); - } - arg1 = (DH *)(argp1); + arg3 = (EVP_MD *)(argp3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rsa_padding_add_pkcs1_pss" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)DH_generate_key(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)rsa_padding_add_pkcs1_pss(arg1,arg2,arg3,arg4); + { + resultobj=result; } return resultobj; fail: @@ -17777,43 +17285,59 @@ fail: } -SWIGINTERN PyObject *_wrap_dhparams_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_verify_pkcs1_pss(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - DH *arg2 = (DH *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + EVP_MD *arg4 = (EVP_MD *) 0 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "dhparams_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_verify_pkcs1_pss",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dhparams_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_verify_pkcs1_pss" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_DH, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dhparams_print" "', argument " "2"" of type '" "DH const *""'"); + arg1 = (RSA *)(argp1); + { + arg2=obj1; } - arg2 = (DH *)(argp2); + { + arg3=obj2; + } + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rsa_verify_pkcs1_pss" "', argument " "4"" of type '" "EVP_MD *""'"); + } + arg4 = (EVP_MD *)(argp4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "rsa_verify_pkcs1_pss" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg2) { + if (!arg4) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)DHparams_print(arg1,(DH const *)arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)rsa_verify_pkcs1_pss(arg1,arg2,arg3,arg4,arg5); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -17824,73 +17348,42 @@ fail: } -SWIGINTERN int Swig_var__dh_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_dh_err""' of type '""PyObject *""'"); - } - _dh_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__dh_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_dh_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_dh_init(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - dh_init(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dh_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_sign(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_sign",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_type_check" "', argument " "1"" of type '" "DH *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_sign" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (DH *)(argp1); + arg1 = (RSA *)(argp1); + { + arg2=obj1; + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_sign" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dh_type_check(arg1); + result = (PyObject *)rsa_sign(arg1,arg2,arg3); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -17898,97 +17391,122 @@ fail: } -SWIGINTERN PyObject *_wrap_dh_read_parameters(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_verify(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + RSA *arg1 = (RSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - DH *result = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_verify",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_read_parameters" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_verify" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (RSA *)(argp1); + { + arg2=obj1; + } + { + arg3=obj2; + } + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rsa_verify" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)rsa_verify(arg1,arg2,arg3,arg4); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (DH *)dh_read_parameters(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DH, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dh_generate_parameters(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_generate_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; int arg1 ; - int arg2 ; + unsigned long arg2 ; PyObject *arg3 = (PyObject *) 0 ; int val1 ; int ecode1 = 0 ; - int val2 ; + unsigned long val2 ; int ecode2 = 0 ; - PyObject *swig_obj[3] ; - DH *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "dh_generate_parameters", 3, 3, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if(!PyArg_UnpackTuple(args,(char *)"rsa_generate_key",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dh_generate_parameters" "', argument " "1"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rsa_generate_key" "', argument " "1"" of type '" "int""'"); } arg1 = (int)(val1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dh_generate_parameters" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rsa_generate_key" "', argument " "2"" of type '" "unsigned long""'"); } - arg2 = (int)(val2); + arg2 = (unsigned long)(val2); { - if (!PyCallable_Check(swig_obj[2])) { + if (!PyCallable_Check(obj2)) { PyErr_SetString(PyExc_TypeError, "expected PyCallable"); return NULL; } - arg3=swig_obj[2]; + arg3=obj2; + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)rsa_generate_key(arg1,arg2,arg3); + { + resultobj=result; } - result = (DH *)dh_generate_parameters(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DH, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dh_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; + RSA *arg1 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_check" "', argument " "1"" of type '" "DH *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_type_check" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (DH *)(argp1); + arg1 = (RSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dh_check(arg1); + result = (int)rsa_type_check(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -17999,32 +17517,29 @@ fail: } -SWIGINTERN PyObject *_wrap_dh_compute_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_check_pub_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + RSA *arg1 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "dh_compute_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_check_pub_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_compute_key" "', argument " "1"" of type '" "DH *""'"); - } - arg1 = (DH *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_check_pub_key" "', argument " "1"" of type '" "RSA *""'"); } + arg1 = (RSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dh_compute_key(arg1,arg2); + result = (int)rsa_check_pub_key(arg1); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -18032,29 +17547,47 @@ fail: } -SWIGINTERN PyObject *_wrap_dh_get_p(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_rsa_write_key_der(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; + RSA *arg1 = (RSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"rsa_write_key_der",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_p" "', argument " "1"" of type '" "DH *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_key_der" "', argument " "1"" of type '" "RSA *""'"); } - arg1 = (DH *)(argp1); + arg1 = (RSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_key_der" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dh_get_p(arg1); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)rsa_write_key_der(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -18062,154 +17595,64 @@ fail: } -SWIGINTERN PyObject *_wrap_dh_get_g(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_g" "', argument " "1"" of type '" "DH *""'"); - } - arg1 = (DH *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)dh_get_g(arg1); - { - resultobj=result; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dh_get_pub(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_pub" "', argument " "1"" of type '" "DH *""'"); - } - arg1 = (DH *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)dh_get_pub(arg1); - { - resultobj=result; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dh_get_priv(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + DSA *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_get_priv" "', argument " "1"" of type '" "DH *""'"); - } - arg1 = (DH *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)dh_get_priv(arg1); - { - resultobj=result; - } + result = (DSA *)DSA_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DSA, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dh_set_pg(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DH *arg1 = (DH *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "dh_set_pg", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DH, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dh_set_pg" "', argument " "1"" of type '" "DH *""'"); - } - arg1 = (DH *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_free" "', argument " "1"" of type '" "DSA *""'"); } + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dh_set_pg(arg1,arg2,arg3); - { - resultobj=result; - } + DSA_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rsa_size(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_size(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_size",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_size" "', argument " "1"" of type '" "RSA const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_size" "', argument " "1"" of type '" "DSA const *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)RSA_size((RSA const *)arg1); + result = (int)DSA_size((DSA const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -18220,67 +17663,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - RSA *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "rsa_new", 0, 0, 0)) SWIG_fail; - result = (RSA *)RSA_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RSA, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rsa_free(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_free" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - RSA_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rsa_check_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_gen_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_gen_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_check_key" "', argument " "1"" of type '" "RSA const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_gen_key" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)RSA_check_key((RSA const *)arg1); + result = (int)DSA_generate_key(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -18291,14 +17693,14 @@ fail: } -SWIGINTERN int Swig_var__rsa_err_set(PyObject *_val) { +SWIGINTERN int Swig_var__dsa_err_set(PyObject *_val) { { void *argp = 0; int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_rsa_err""' of type '""PyObject *""'"); + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_dsa_err""' of type '""PyObject *""'"); } - _rsa_err = (PyObject *)(argp); + _dsa_err = (PyObject *)(argp); } return 0; fail: @@ -18306,27 +17708,26 @@ fail: } -SWIGINTERN PyObject *Swig_var__rsa_err_get(void) { +SWIGINTERN PyObject *Swig_var__dsa_err_get(void) { PyObject *pyobj = 0; PyObject *self = 0; (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_rsa_err), SWIGTYPE_p_PyObject, 0 ); + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_dsa_err), SWIGTYPE_p_PyObject, 0 ); return pyobj; } -SWIGINTERN PyObject *_wrap_rsa_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if(!PyArg_UnpackTuple(args,(char *)"dsa_init",1,1,&obj0)) SWIG_fail; { - arg1=swig_obj[0]; + arg1=obj0; } - rsa_init(arg1); + dsa_init(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -18334,83 +17735,72 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_read_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_generate_parameters(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + int arg1 ; PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - RSA *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + DSA *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_read_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_read_key" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); + if(!PyArg_UnpackTuple(args,(char *)"dsa_generate_parameters",2,2,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dsa_generate_parameters" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); { - if (!PyCallable_Check(swig_obj[1])) { + if (!PyCallable_Check(obj1)) { PyErr_SetString(PyExc_TypeError, "expected PyCallable"); return NULL; } - arg2=swig_obj[1]; + arg2=obj1; } { - if (!arg1) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (DSA *)dsa_generate_parameters(arg1,arg2); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); + else { + resultobj = NULL; } } - result = (RSA *)rsa_read_key(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RSA, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rsa_write_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_read_params(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; - EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + BIO *arg1 = (BIO *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[4] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + DSA *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_write_key", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_read_params",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_key" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_key" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rsa_write_key" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_read_params" "', argument " "1"" of type '" "BIO *""'"); } - arg3 = (EVP_CIPHER *)(argp3); + arg1 = (BIO *)(argp1); { - if (!PyCallable_Check(swig_obj[3])) { + if (!PyCallable_Check(obj1)) { PyErr_SetString(PyExc_TypeError, "expected PyCallable"); return NULL; } - arg4=swig_obj[3]; + arg2=obj1; } { if (!arg1) { @@ -18422,56 +17812,44 @@ SWIGINTERN PyObject *_wrap_rsa_write_key(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (DSA *)dsa_read_params(arg1,arg2); { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); + else { + resultobj = NULL; } } - result = (int)rsa_write_key(arg1,arg2,arg3,arg4); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rsa_write_key_no_cipher(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_read_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + BIO *arg1 = (BIO *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + DSA *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_write_key_no_cipher", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_read_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_key_no_cipher" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_key_no_cipher" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_read_key" "', argument " "1"" of type '" "BIO *""'"); } - arg2 = (BIO *)(argp2); + arg1 = (BIO *)(argp1); { - if (!PyCallable_Check(swig_obj[2])) { + if (!PyCallable_Check(obj1)) { PyErr_SetString(PyExc_TypeError, "expected PyCallable"); return NULL; } - arg3=swig_obj[2]; + arg2=obj1; } { if (!arg1) { @@ -18483,76 +17861,45 @@ SWIGINTERN PyObject *_wrap_rsa_write_key_no_cipher(PyObject *self, PyObject *arg SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (DSA *)dsa_read_key(arg1,arg2); { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); + else { + resultobj = NULL; } } - result = (int)rsa_write_key_no_cipher(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_rsa_read_pub_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_read_pub_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - RSA *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + DSA *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_read_pub_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_read_pub_key" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_read_pub_key" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; } + arg2=obj1; } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (RSA *)rsa_read_pub_key(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RSA, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rsa_write_pub_key(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "rsa_write_pub_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_pub_key" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_pub_key" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -18563,14 +17910,15 @@ SWIGINTERN PyObject *_wrap_rsa_write_pub_key(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (DSA *)dsa_read_pub_key(arg1,arg2); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)rsa_write_pub_key(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); + else { + resultobj = NULL; + } } return resultobj; fail: @@ -18578,27 +17926,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_get_e(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_get_p(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_get_p",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_get_e" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_p" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_get_e(arg1); + result = (PyObject *)dsa_get_p(arg1); { resultobj=result; } @@ -18608,27 +17955,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_get_n(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_get_q(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_get_q",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_get_n" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_q" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_get_n(arg1); + result = (PyObject *)dsa_get_q(arg1); { resultobj=result; } @@ -18638,30 +17984,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_set_e(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_get_g(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_set_e", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_get_g",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_e" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_g" "', argument " "1"" of type '" "DSA *""'"); } + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_set_e(arg1,arg2); + result = (PyObject *)dsa_get_g(arg1); { resultobj=result; } @@ -18671,30 +18013,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_set_n(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_get_pub(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_set_n", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_get_pub",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_n" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_pub" "', argument " "1"" of type '" "DSA *""'"); } + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_set_n(arg1,arg2); + result = (PyObject *)dsa_get_pub(arg1); { resultobj=result; } @@ -18704,34 +18042,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_set_en(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_get_priv(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_set_en", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_get_priv",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_en" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_priv" "', argument " "1"" of type '" "DSA *""'"); } + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_set_en(arg1,arg2,arg3); + result = (PyObject *)dsa_get_priv(arg1); { resultobj=result; } @@ -18741,53 +18071,41 @@ fail: } -SWIGINTERN PyObject *_wrap_PyObject_Bin_AsBIGNUM(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - BIGNUM *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - result = (BIGNUM *)PyObject_Bin_AsBIGNUM(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIGNUM, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rsa_set_en_bin(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_set_pqg(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_set_en_bin", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_set_pqg",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_set_en_bin" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_set_pqg" "', argument " "1"" of type '" "DSA *""'"); + } + arg1 = (DSA *)(argp1); + { + arg2=obj1; } - arg1 = (RSA *)(argp1); { - arg2=swig_obj[1]; + arg3=obj2; } { - arg3=swig_obj[2]; + arg4=obj3; } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_set_en_bin(arg1,arg2,arg3); + result = (PyObject *)dsa_set_pqg(arg1,arg2,arg3,arg4); { resultobj=result; } @@ -18797,38 +18115,31 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_private_encrypt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_set_pub(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_private_encrypt", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_set_pub",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_private_encrypt" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_set_pub" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_private_encrypt" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_private_encrypt(arg1,arg2,arg3); + result = (PyObject *)dsa_set_pub(arg1,arg2); { resultobj=result; } @@ -18838,40 +18149,47 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_public_decrypt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_write_params_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; + DSA *arg1 = (DSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "rsa_public_decrypt", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_write_params_bio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_public_decrypt" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_params_bio" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (DSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_params_bio" "', argument " "2"" of type '" "BIO *""'"); } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_public_decrypt" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_public_decrypt(arg1,arg2,arg3); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)dsa_write_params_bio(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -18879,81 +18197,71 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_public_encrypt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_write_key_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; + DSA *arg1 = (DSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; + EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "rsa_public_encrypt", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_write_key_bio",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_public_encrypt" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_key_bio" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_key_bio" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dsa_write_key_bio" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + } + arg3 = (EVP_CIPHER *)(argp3); { - arg2=swig_obj[1]; + if (!PyCallable_Check(obj3)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg4=obj3; } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_public_encrypt" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_public_encrypt(arg1,arg2,arg3); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rsa_private_decrypt(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "rsa_private_decrypt", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_private_decrypt" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); { - arg2=swig_obj[1]; + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_private_decrypt" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); { - if (!arg1) { + if (!arg4) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_private_decrypt(arg1,arg2,arg3); + result = (int)dsa_write_key_bio(arg1,arg2,arg3,arg4); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -18961,53 +18269,57 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_padding_add_pkcs1_pss(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_write_key_bio_no_cipher(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; - int arg4 ; + DSA *arg1 = (DSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - PyObject *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "rsa_padding_add_pkcs1_pss", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_write_key_bio_no_cipher",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_padding_add_pkcs1_pss" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_key_bio_no_cipher" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (DSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_key_bio_no_cipher" "', argument " "2"" of type '" "BIO *""'"); } - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rsa_padding_add_pkcs1_pss" "', argument " "3"" of type '" "EVP_MD *""'"); + arg2 = (BIO *)(argp2); + { + if (!PyCallable_Check(obj2)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg3=obj2; } - arg3 = (EVP_MD *)(argp3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rsa_padding_add_pkcs1_pss" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } { if (!arg3) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_padding_add_pkcs1_pss(arg1,arg2,arg3,arg4); + result = (int)dsa_write_key_bio_no_cipher(arg1,arg2,arg3); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -19015,55 +18327,44 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_verify_pkcs1_pss(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_write_pub_key_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - EVP_MD *arg4 = (EVP_MD *) 0 ; - int arg5 ; + DSA *arg1 = (DSA *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "rsa_verify_pkcs1_pss", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_write_pub_key_bio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_verify_pkcs1_pss" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_pub_key_bio" "', argument " "1"" of type '" "DSA *""'"); } - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rsa_verify_pkcs1_pss" "', argument " "4"" of type '" "EVP_MD *""'"); + arg1 = (DSA *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_pub_key_bio" "', argument " "2"" of type '" "BIO *""'"); } - arg4 = (EVP_MD *)(argp4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "rsa_verify_pkcs1_pss" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg4) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)rsa_verify_pkcs1_pss(arg1,arg2,arg3,arg4,arg5); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)dsa_write_pub_key_bio(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19074,38 +18375,31 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_sign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_sign(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; - int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_sign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_sign",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_sign" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_sign" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rsa_sign" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_sign(arg1,arg2,arg3); + result = (PyObject *)dsa_sign(arg1,arg2); { resultobj=result; } @@ -19115,42 +18409,41 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_verify(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_verify(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) 0 ; - int arg4 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "rsa_verify", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_verify",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_verify" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_verify" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { - arg2=swig_obj[1]; + arg2=obj1; } { - arg3=swig_obj[2]; + arg3=obj2; + } + { + arg4=obj3; } - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rsa_verify" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)rsa_verify(arg1,arg2,arg3,arg4); + result = (int)dsa_verify(arg1,arg2,arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19161,42 +18454,31 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_generate_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_sign_asn1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - unsigned long arg2 ; - PyObject *arg3 = (PyObject *) 0 ; - int val1 ; - int ecode1 = 0 ; - unsigned long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[3] ; + DSA *arg1 = (DSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "rsa_generate_key", 3, 3, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rsa_generate_key" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - ecode2 = SWIG_AsVal_unsigned_SS_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rsa_generate_key" "', argument " "2"" of type '" "unsigned long""'"); - } - arg2 = (unsigned long)(val2); + if(!PyArg_UnpackTuple(args,(char *)"dsa_sign_asn1",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_sign_asn1" "', argument " "1"" of type '" "DSA *""'"); + } + arg1 = (DSA *)(argp1); { - if (!PyCallable_Check(swig_obj[2])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg3=swig_obj[2]; + arg2=obj1; } { - if (!arg3) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)rsa_generate_key(arg1,arg2,arg3); + result = (PyObject *)dsa_sign_asn1(arg1,arg2); { resultobj=result; } @@ -19206,27 +18488,36 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_verify_asn1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_verify_asn1",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_type_check" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_verify_asn1" "', argument " "1"" of type '" "DSA *""'"); + } + arg1 = (DSA *)(argp1); + { + arg2=obj1; + } + { + arg3=obj2; } - arg1 = (RSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)rsa_type_check(arg1); + result = (int)dsa_verify_asn1(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19237,27 +18528,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_check_pub_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_check_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_check_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_check_pub_key" "', argument " "1"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_check_key" "', argument " "1"" of type '" "DSA *""'"); } - arg1 = (RSA *)(argp1); + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)rsa_check_pub_key(arg1); + result = (int)dsa_check_key(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19268,43 +18558,26 @@ fail: } -SWIGINTERN PyObject *_wrap_rsa_write_key_der(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_check_pub_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - RSA *arg1 = (RSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; + DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "rsa_write_key_der", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_RSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_check_pub_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rsa_write_key_der" "', argument " "1"" of type '" "RSA *""'"); - } - arg1 = (RSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rsa_write_key_der" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_check_pub_key" "', argument " "1"" of type '" "DSA *""'"); } - arg2 = (BIO *)(argp2); + arg1 = (DSA *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)rsa_write_key_der(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)dsa_check_pub_key(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19315,59 +18588,18 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - DSA *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "dsa_new", 0, 0, 0)) SWIG_fail; - result = (DSA *)DSA_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DSA, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dsa_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_keylen(PyObject *self, PyObject *args) { PyObject *resultobj = 0; DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_free" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - DSA_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dsa_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_keylen",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_size" "', argument " "1"" of type '" "DSA const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_keylen" "', argument " "1"" of type '" "DSA *""'"); } arg1 = (DSA *)(argp1); { @@ -19375,7 +18607,7 @@ SWIGINTERN PyObject *_wrap_dsa_size(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)DSA_size((DSA const *)arg1); + result = (int)dsa_keylen(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19386,19 +18618,18 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_gen_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_dsa_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; DSA *arg1 = (DSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"dsa_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_DSA, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_gen_key" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_type_check" "', argument " "1"" of type '" "DSA *""'"); } arg1 = (DSA *)(argp1); { @@ -19406,7 +18637,7 @@ SWIGINTERN PyObject *_wrap_dsa_gen_key(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)DSA_generate_key(arg1); + result = (int)dsa_type_check(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19417,229 +18648,92 @@ fail: } -SWIGINTERN int Swig_var__dsa_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_dsa_err""' of type '""PyObject *""'"); - } - _dsa_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__dsa_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_dsa_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_dsa_init(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - dsa_init(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dsa_generate_parameters(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - PyObject *arg2 = (PyObject *) 0 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[2] ; - DSA *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "dsa_generate_parameters", 2, 2, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dsa_generate_parameters" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (DSA *)dsa_generate_parameters(arg1,arg2); - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); - else { - resultobj = NULL; - } - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_dsa_read_params(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_ciphers(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - DSA *result = 0 ; + PyObject * obj0 = 0 ; + struct stack_st_SSL_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "dsa_read_params", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_ciphers",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_read_params" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_ciphers" "', argument " "1"" of type '" "SSL const *""'"); } + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (DSA *)dsa_read_params(arg1,arg2); - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); - else { - resultobj = NULL; - } - } + result = (struct stack_st_SSL_CIPHER *)SSL_get_ciphers((SSL const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_SSL_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_read_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_version(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - DSA *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "dsa_read_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_version",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_read_key" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_version" "', argument " "1"" of type '" "SSL const *""'"); } + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (DSA *)dsa_read_key(arg1,arg2); - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); - else { - resultobj = NULL; - } - } + result = (char *)SSL_get_version((SSL const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_read_pub_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_error(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL *arg1 = (SSL *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - DSA *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_read_pub_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_error",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_read_pub_key" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_error" "', argument " "1"" of type '" "SSL const *""'"); } + arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_get_error" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)SSL_get_error((SSL const *)arg1,arg2); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (DSA *)dsa_read_pub_key(arg1,arg2); - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_DSA, 0); - else { - resultobj = NULL; - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -19647,190 +18741,305 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_get_p(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_state(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_p" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_state" "', argument " "1"" of type '" "SSL const *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_get_p(arg1); - { - resultobj=result; - } + result = (char *)SSL_state_string((SSL const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_get_q(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_state_v(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_state_v",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_q" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_state_v" "', argument " "1"" of type '" "SSL const *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_get_q(arg1); - { - resultobj=result; - } + result = (char *)SSL_state_string_long((SSL const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_get_g(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_alert_type(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_g" "', argument " "1"" of type '" "DSA *""'"); + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_alert_type",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_type" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (char *)SSL_alert_type_string(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_get_alert_type_v(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_alert_type_v",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_type_v" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (char *)SSL_alert_type_string_long(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_get_alert_desc(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_alert_desc",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_desc" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (char *)SSL_alert_desc_string(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_get_alert_desc_v(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_alert_desc_v",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_desc_v" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (char *)SSL_alert_desc_string_long(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sslv23_method(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + SSL_METHOD *result = 0 ; + + result = (SSL_METHOD *)SSLv23_method(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_METHOD, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_ctx_new(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + SSL_METHOD *arg1 = (SSL_METHOD *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + SSL_CTX *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_new",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_METHOD, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_new" "', argument " "1"" of type '" "SSL_METHOD *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL_METHOD *)(argp1); + result = (SSL_CTX *)SSL_CTX_new(arg1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_SSL_CTX, 0); + else { + m2_PyErr_Msg(_ssl_err); + resultobj = NULL; } } - result = (PyObject *)dsa_get_g(arg1); - { - resultobj=result; - } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_get_pub(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_pub" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_free" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_get_pub(arg1); - { - resultobj=result; - } + SSL_CTX_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_get_priv(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify_depth(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_verify_depth",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_get_priv" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_verify_depth" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_verify_depth" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_get_priv(arg1); - { - resultobj=result; - } + SSL_CTX_set_verify_depth(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_set_pqg(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_get_verify_depth(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[4] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_set_pqg", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_get_verify_depth",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_set_pqg" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_verify_depth" "', argument " "1"" of type '" "SSL_CTX const *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL_CTX *)(argp1); { - arg2=swig_obj[1]; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (int)SSL_CTX_get_verify_depth((SSL_CTX const *)arg1); { - arg3=swig_obj[2]; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - { - arg4=swig_obj[3]; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_ctx_get_verify_mode(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_get_verify_mode",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_verify_mode" "', argument " "1"" of type '" "SSL_CTX const *""'"); } + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_set_pqg(arg1,arg2,arg3,arg4); + result = (int)SSL_CTX_get_verify_mode((SSL_CTX const *)arg1); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -19838,76 +19047,77 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_set_pub(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_cipher_list(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_set_pub", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_cipher_list",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_set_pub" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_cipher_list" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (DSA *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_cipher_list" "', argument " "2"" of type '" "char const *""'"); } + arg2 = (char *)(buf2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_set_pub(arg1,arg2); + result = (int)SSL_CTX_set_cipher_list(arg1,(char const *)arg2); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_dsa_write_params_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_add_session(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_write_params_bio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_add_session",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_params_bio" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_add_session" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (DSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_params_bio" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_add_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); } - arg2 = (BIO *)(argp2); + arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)dsa_write_params_bio(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)SSL_CTX_add_session(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19918,65 +19128,35 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_write_key_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_remove_session(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; - EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_write_key_bio", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_remove_session",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_key_bio" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_remove_session" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (DSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_key_bio" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dsa_write_key_bio" "', argument " "3"" of type '" "EVP_CIPHER *""'"); - } - arg3 = (EVP_CIPHER *)(argp3); - { - if (!PyCallable_Check(swig_obj[3])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg4=swig_obj[3]; + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_remove_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); } + arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)dsa_write_key_bio(arg1,arg2,arg3,arg4); + result = (int)SSL_CTX_remove_session(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -19987,174 +19167,116 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_write_key_bio_no_cipher(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_session_timeout(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[3] ; - int result; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "dsa_write_key_bio_no_cipher", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_session_timeout",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_key_bio_no_cipher" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_key_bio_no_cipher" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - { - if (!PyCallable_Check(swig_obj[2])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_session_timeout" "', argument " "1"" of type '" "SSL_CTX *""'"); } + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_session_timeout" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)dsa_write_key_bio_no_cipher(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (long)SSL_CTX_set_timeout(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_write_pub_key_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_get_session_timeout(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - BIO *arg2 = (BIO *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "dsa_write_pub_key_bio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_get_session_timeout",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_write_pub_key_bio" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dsa_write_pub_key_bio" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_session_timeout" "', argument " "1"" of type '" "SSL_CTX const *""'"); } - arg2 = (BIO *)(argp2); + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)dsa_write_pub_key_bio(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (long)SSL_CTX_get_timeout((SSL_CTX const *)arg1); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_sign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_get_cert_store(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + X509_STORE *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "dsa_sign", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_get_cert_store",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_sign" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_cert_store" "', argument " "1"" of type '" "SSL_CTX const *""'"); } + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)dsa_sign(arg1,arg2); - { - resultobj=result; - } + result = (X509_STORE *)SSL_CTX_get_cert_store((SSL_CTX const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_STORE, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_verify(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_default_verify_paths(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_verify", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_default_verify_paths",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_verify" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; - } - { - arg4=swig_obj[3]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_default_verify_paths" "', argument " "1"" of type '" "SSL_CTX *""'"); } + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dsa_verify(arg1,arg2,arg3,arg4); + result = (int)SSL_CTX_set_default_verify_paths(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -20165,32 +19287,14 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_sign_asn1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_ex_data_x509_store_ctx_idx(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "dsa_sign_asn1", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_sign_asn1" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - { - arg2=swig_obj[1]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)dsa_sign_asn1(arg1,arg2); + result = (int)SSL_get_ex_data_X509_STORE_CTX_idx(); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -20198,181 +19302,191 @@ fail: } -SWIGINTERN PyObject *_wrap_dsa_verify_asn1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_bio_new_ssl(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - int result; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + BIO *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "dsa_verify_asn1", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"bio_new_ssl",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_verify_asn1" "', argument " "1"" of type '" "DSA *""'"); - } - arg1 = (DSA *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_new_ssl" "', argument " "1"" of type '" "SSL_CTX *""'"); } + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_ssl" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dsa_verify_asn1(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (BIO *)BIO_new_ssl(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_check_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + SSL *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_new",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_check_key" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_new" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dsa_check_key(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (SSL *)SSL_new(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_check_pub_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_check_pub_key" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_free" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dsa_check_pub_key(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + SSL_free(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; } + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_keylen(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_dup(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + SSL *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_dup",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_keylen" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_dup" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dsa_keylen(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (SSL *)SSL_dup(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_dsa_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - DSA *arg1 = (DSA *) 0 ; + SSL *arg1 = (SSL *) 0 ; + BIO *arg2 = (BIO *) 0 ; + BIO *arg3 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DSA, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_bio",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsa_type_check" "', argument " "1"" of type '" "DSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_bio" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (DSA *)(argp1); + arg1 = (SSL *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_bio" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ssl_set_bio" "', argument " "3"" of type '" "BIO *""'"); + } + arg3 = (BIO *)(argp3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)dsa_type_check(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + SSL_set_bio(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_ciphers(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_accept_state(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - struct stack_st_SSL_CIPHER *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_accept_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_ciphers" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_accept_state" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); { @@ -20380,27 +19494,25 @@ SWIGINTERN PyObject *_wrap_ssl_get_ciphers(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (struct stack_st_SSL_CIPHER *)SSL_get_ciphers((SSL const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_SSL_CIPHER, 0 | 0 ); + SSL_set_accept_state(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_version(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_connect_state(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_connect_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_version" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_connect_state" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); { @@ -20408,42 +19520,34 @@ SWIGINTERN PyObject *_wrap_ssl_get_version(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)SSL_get_version((SSL const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + SSL_set_connect_state(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_error(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_shutdown(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; - int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_get_error", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_shutdown",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_error" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_shutdown" "', argument " "1"" of type '" "SSL const *""'"); } arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_get_error" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_get_error((SSL const *)arg1,arg2); + result = (int)SSL_get_shutdown((SSL const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -20454,47 +19558,53 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_get_state(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_shutdown(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_shutdown",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_state" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_shutdown" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_shutdown" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)SSL_state_string((SSL const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + SSL_set_shutdown(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_state_v(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_shutdown(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_shutdown",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_state_v" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_shutdown" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); { @@ -20502,144 +19612,14 @@ SWIGINTERN PyObject *_wrap_ssl_get_state_v(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)SSL_state_string_long((SSL const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_get_alert_type(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_type" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (char *)SSL_alert_type_string(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_get_alert_type_v(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_type_v" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (char *)SSL_alert_type_string_long(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_get_alert_desc(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_desc" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (char *)SSL_alert_desc_string(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_get_alert_desc_v(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ssl_get_alert_desc_v" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (char *)SSL_alert_desc_string_long(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sslv23_method(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "sslv23_method", 0, 0, 0)) SWIG_fail; - result = (SSL_METHOD *)SSLv23_method(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_METHOD, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_ctx_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL_METHOD *arg1 = (SSL_METHOD *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL_CTX *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_METHOD, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_new" "', argument " "1"" of type '" "SSL_METHOD *""'"); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)SSL_shutdown(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; } - arg1 = (SSL_METHOD *)(argp1); - result = (SSL_CTX *)SSL_CTX_new(arg1); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_SSL_CTX, 0); - else { - m2_PyErr_Msg(_ssl_err); - resultobj = NULL; - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -20647,88 +19627,94 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_clear(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_clear",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_free" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_clear" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - SSL_CTX_free(arg1); - resultobj = SWIG_Py_Void(); + result = (int)SSL_clear(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify_depth(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_do_handshake(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - int arg2 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_verify_depth", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_do_handshake",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_verify_depth" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_do_handshake" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_verify_depth" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - SSL_CTX_set_verify_depth(arg1,arg2); - resultobj = SWIG_Py_Void(); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)SSL_do_handshake(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_get_verify_depth(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_renegotiate(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_renegotiate",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_verify_depth" "', argument " "1"" of type '" "SSL_CTX const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_renegotiate" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_CTX_get_verify_depth((SSL_CTX const *)arg1); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)SSL_renegotiate(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -20739,27 +19725,26 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_get_verify_mode(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_pending(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_pending",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_verify_mode" "', argument " "1"" of type '" "SSL_CTX const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_pending" "', argument " "1"" of type '" "SSL const *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_CTX_get_verify_mode((SSL_CTX const *)arg1); + result = (int)SSL_pending((SSL const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -20770,75 +19755,80 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_cipher_list(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_peer_cert(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - char *arg2 = (char *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_cipher_list", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_peer_cert",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_cipher_list" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_cipher_list" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_peer_cert" "', argument " "1"" of type '" "SSL const *""'"); } - arg2 = (char *)(buf2); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_CTX_set_cipher_list(arg1,(char const *)arg2); + result = (X509 *)SSL_get_peer_certificate((SSL const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_get_current_cipher(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + SSL *arg1 = (SSL *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + SSL_CIPHER *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_current_cipher",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_current_cipher" "', argument " "1"" of type '" "SSL const *""'"); + } + arg1 = (SSL *)(argp1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (SSL_CIPHER *)SSL_get_current_cipher((SSL const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_add_session(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_verify_mode(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_add_session", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_verify_mode",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_add_session" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_add_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_verify_mode" "', argument " "1"" of type '" "SSL const *""'"); } - arg2 = (SSL_SESSION *)(argp2); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_CTX_add_session(arg1,arg2); + result = (int)SSL_get_verify_mode((SSL const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -20849,34 +19839,26 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_remove_session(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_verify_depth(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_remove_session", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_verify_depth",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_remove_session" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_remove_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_verify_depth" "', argument " "1"" of type '" "SSL const *""'"); } - arg2 = (SSL_SESSION *)(argp2); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_CTX_remove_session(arg1,arg2); + result = (int)SSL_get_verify_depth((SSL const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -20887,34 +19869,26 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_session_timeout(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_verify_result(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - long arg2 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; long result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_session_timeout", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_verify_result",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_session_timeout" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_verify_result" "', argument " "1"" of type '" "SSL const *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_session_timeout" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)SSL_CTX_set_timeout(arg1,arg2); + result = (long)SSL_get_verify_result((SSL const *)arg1); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: @@ -20922,184 +19896,204 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_get_session_timeout(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_ssl_ctx(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - long result; + PyObject * obj0 = 0 ; + SSL_CTX *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_ssl_ctx",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_session_timeout" "', argument " "1"" of type '" "SSL_CTX const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_ssl_ctx" "', argument " "1"" of type '" "SSL const *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)SSL_CTX_get_timeout((SSL_CTX const *)arg1); - resultobj = SWIG_From_long((long)(result)); + result = (SSL_CTX *)SSL_get_SSL_CTX((SSL const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_CTX, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_get_cert_store(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_default_session_timeout(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_STORE *result = 0 ; + PyObject * obj0 = 0 ; + long result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_default_session_timeout",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_cert_store" "', argument " "1"" of type '" "SSL_CTX const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_default_session_timeout" "', argument " "1"" of type '" "SSL const *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509_STORE *)SSL_CTX_get_cert_store((SSL_CTX const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_STORE, 0 | 0 ); + result = (long)SSL_get_default_timeout((SSL const *)arg1); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_default_verify_paths(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_cipher_list(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_cipher_list",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_default_verify_paths" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_cipher_list" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_cipher_list" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_CTX_set_default_verify_paths(arg1); + result = (int)SSL_set_cipher_list(arg1,(char const *)arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_ex_data_x509_store_ctx_idx(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_cipher_list(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int result; + SSL *arg1 = (SSL *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_get_ex_data_x509_store_ctx_idx", 0, 0, 0)) SWIG_fail; - result = (int)SSL_get_ex_data_X509_STORE_CTX_idx(); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_cipher_list",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_cipher_list" "', argument " "1"" of type '" "SSL const *""'"); + } + arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_get_cipher_list" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (char *)SSL_get_cipher_list((SSL const *)arg1,arg2); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_new_ssl(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_cipher_get_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - int arg2 ; + SSL_CIPHER *arg1 = (SSL_CIPHER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - BIO *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "bio_new_ssl", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_cipher_get_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_new_ssl" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher_get_name" "', argument " "1"" of type '" "SSL_CIPHER const *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bio_new_ssl" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (SSL_CIPHER *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (BIO *)BIO_new_ssl(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BIO, 0 | 0 ); + result = (char *)SSL_CIPHER_get_name((SSL_CIPHER const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_cipher_get_version(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL_CIPHER *arg1 = (SSL_CIPHER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_cipher_get_version",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_new" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher_get_version" "', argument " "1"" of type '" "SSL_CIPHER const *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL_CIPHER *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (SSL *)SSL_new(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL, 0 | 0 ); + result = (char *)SSL_CIPHER_get_version((SSL_CIPHER const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_session(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + SSL_SESSION *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_session",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_free" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_session" "', argument " "1"" of type '" "SSL const *""'"); } arg1 = (SSL *)(argp1); { @@ -21107,31 +20101,26 @@ SWIGINTERN PyObject *_wrap_ssl_free(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - SSL_free(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_Py_Void(); + result = (SSL_SESSION *)SSL_get_session((SSL const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_SESSION, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_dup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get1_session(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL *result = 0 ; + PyObject * obj0 = 0 ; + SSL_SESSION *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get1_session",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_dup" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get1_session" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); { @@ -21139,86 +20128,67 @@ SWIGINTERN PyObject *_wrap_ssl_dup(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (SSL *)SSL_dup(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL, 0 | 0 ); + result = (SSL_SESSION *)SSL_get1_session(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_SESSION, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_session(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; - BIO *arg2 = (BIO *) 0 ; - BIO *arg3 = (BIO *) 0 ; + SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_bio", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_session",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_bio" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_session" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_bio" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ssl_set_bio" "', argument " "3"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); } - arg3 = (BIO *)(argp3); + arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)SSL_set_session(arg1,arg2); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - SSL_set_bio(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_accept_state(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_session_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_session_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_accept_state" "', argument " "1"" of type '" "SSL *""'"); - } - arg1 = (SSL *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_free" "', argument " "1"" of type '" "SSL_SESSION *""'"); } - SSL_set_accept_state(arg1); + arg1 = (SSL_SESSION *)(argp1); + SSL_SESSION_free(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -21226,54 +20196,39 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_set_connect_state(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_session_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + BIO *arg1 = (BIO *) 0 ; + SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_session_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_connect_state" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_print" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_session_print" "', argument " "2"" of type '" "SSL_SESSION const *""'"); + } + arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - SSL_set_connect_state(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_get_shutdown(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_shutdown" "', argument " "1"" of type '" "SSL const *""'"); - } - arg1 = (SSL *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)SSL_SESSION_print(arg1,(SSL_SESSION const *)arg2); + SWIG_PYTHON_THREAD_END_ALLOW; } - result = (int)SSL_get_shutdown((SSL const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -21284,99 +20239,92 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_set_shutdown(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_session_set_timeout(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - int arg2 ; + SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + long val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_shutdown", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_session_set_timeout",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_shutdown" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_set_timeout" "', argument " "1"" of type '" "SSL_SESSION *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (SSL_SESSION *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_shutdown" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_session_set_timeout" "', argument " "2"" of type '" "long""'"); } - arg2 = (int)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - SSL_set_shutdown(arg1,arg2); - resultobj = SWIG_Py_Void(); + arg2 = (long)(val2); + result = (long)SSL_SESSION_set_timeout(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_shutdown(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_session_get_timeout(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + long result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_session_get_timeout",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_shutdown" "', argument " "1"" of type '" "SSL *""'"); - } - arg1 = (SSL *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)SSL_shutdown(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_get_timeout" "', argument " "1"" of type '" "SSL_SESSION const *""'"); } + arg1 = (SSL_SESSION *)(argp1); + result = (long)SSL_SESSION_get_timeout((SSL_SESSION const *)arg1); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_clear(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_accept(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; + double arg2 = (double) -1 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_accept",1,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_clear" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_accept" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_accept" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_clear(arg1); + result = (PyObject *)ssl_accept(arg1,arg2); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -21384,34 +20332,39 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_do_handshake(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_connect(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; + double arg2 = (double) -1 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_connect",1,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_do_handshake" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_connect" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_connect" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)ssl_connect(arg1,arg2); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)SSL_do_handshake(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -21419,34 +20372,48 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_renegotiate(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_read(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; + int arg2 ; + double arg3 = (double) -1 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_read",2,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_renegotiate" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_read" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_read" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ssl_read" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)ssl_read(arg1,arg2,arg3); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)SSL_renegotiate(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -21454,27 +20421,42 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_pending(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_write(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + double arg3 = (double) -1 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_write",2,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_pending" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_write" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); + { + arg2=obj1; + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ssl_write" "', argument " "3"" of type '" "double""'"); + } + arg3 = (double)(val3); + } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_pending((SSL const *)arg1); + result = (int)ssl_write(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -21485,229 +20467,275 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_get_peer_cert(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - X509 *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_peer_cert" "', argument " "1"" of type '" "SSL const *""'"); - } - arg1 = (SSL *)(argp1); +SWIGINTERN int Swig_var__ssl_err_set(PyObject *_val) { { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_ssl_err""' of type '""PyObject *""'"); } + _ssl_err = (PyObject *)(argp); } - result = (X509 *)SSL_get_peer_certificate((SSL const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); - return resultobj; + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_ssl_get_current_cipher(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL_CIPHER *result = 0 ; +SWIGINTERN PyObject *Swig_var__ssl_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_current_cipher" "', argument " "1"" of type '" "SSL const *""'"); - } - arg1 = (SSL *)(argp1); + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_ssl_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN int Swig_var__ssl_timeout_err_set(PyObject *_val) { { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_ssl_timeout_err""' of type '""PyObject *""'"); } + _ssl_timeout_err = (PyObject *)(argp); } - result = (SSL_CIPHER *)SSL_get_current_cipher((SSL const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); - return resultobj; + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_ssl_get_verify_mode(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *Swig_var__ssl_timeout_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_ssl_timeout_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_ssl_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_verify_mode" "', argument " "1"" of type '" "SSL const *""'"); - } - arg1 = (SSL *)(argp1); + if(!PyArg_UnpackTuple(args,(char *)"ssl_init",2,2,&obj0,&obj1)) SWIG_fail; { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg1=obj0; } - result = (int)SSL_get_verify_mode((SSL const *)arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + arg2=obj1; } + ssl_init(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_verify_depth(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_tlsv1_method(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_METHOD *result = 0 ; + + result = (SSL_METHOD *)tlsv1_method(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_METHOD, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ssl_ctx_passphrase_callback(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_passphrase_callback",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_verify_depth" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_passphrase_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); + } + arg1 = (SSL_CTX *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; } - arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_get_verify_depth((SSL const *)arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + ssl_ctx_passphrase_callback(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_verify_result(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_use_x509(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - long result; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_use_x509",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_verify_result" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_x509" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_x509" "', argument " "2"" of type '" "X509 *""'"); + } + arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)SSL_get_verify_result((SSL const *)arg1); - resultobj = SWIG_From_long((long)(result)); + result = (int)ssl_ctx_use_x509(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_ssl_ctx(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_use_cert(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL_CTX *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_use_cert",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_ssl_ctx" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_cert" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_cert" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (SSL_CTX *)SSL_get_SSL_CTX((SSL const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_CTX, 0 | 0 ); + result = (int)ssl_ctx_use_cert(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_default_session_timeout(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_use_cert_chain(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - long result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_use_cert_chain",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_default_session_timeout" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_cert_chain" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_cert_chain" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)SSL_get_default_timeout((SSL const *)arg1); - resultobj = SWIG_From_long((long)(result)); + result = (int)ssl_ctx_use_cert_chain(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_cipher_list(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_use_privkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_cipher_list", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_use_privkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_cipher_list" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_cipher_list" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_privkey" "', argument " "2"" of type '" "char *""'"); } arg2 = (char *)(buf2); { @@ -21715,7 +20743,7 @@ SWIGINTERN PyObject *_wrap_ssl_set_cipher_list(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_set_cipher_list(arg1,(char const *)arg2); + result = (int)ssl_ctx_use_privkey(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -21728,206 +20756,239 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_get_cipher_list(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_use_rsa_privkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - int arg2 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + RSA *arg2 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - char *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_get_cipher_list", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_use_rsa_privkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_cipher_list" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_rsa_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_get_cipher_list" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_rsa_privkey" "', argument " "2"" of type '" "RSA *""'"); + } + arg2 = (RSA *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)SSL_get_cipher_list((SSL const *)arg1,arg2); - resultobj = SWIG_FromCharPtr((const char *)result); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)ssl_ctx_use_rsa_privkey(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_cipher_get_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_use_pkey_privkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CIPHER *arg1 = (SSL_CIPHER *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_use_pkey_privkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher_get_name" "', argument " "1"" of type '" "SSL_CIPHER const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_pkey_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL_CIPHER *)(argp1); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_pkey_privkey" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)SSL_CIPHER_get_name((SSL_CIPHER const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)ssl_ctx_use_pkey_privkey(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_cipher_get_version(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_check_privkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CIPHER *arg1 = (SSL_CIPHER *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_check_privkey",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher_get_version" "', argument " "1"" of type '" "SSL_CIPHER const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_check_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL_CIPHER *)(argp1); + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)SSL_CIPHER_get_version((SSL_CIPHER const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} + result = (int)ssl_ctx_check_privkey(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + return resultobj; +fail: + return NULL; +} -SWIGINTERN PyObject *_wrap_ssl_get_session(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_client_CA_list_from_file(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL_SESSION *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_client_CA_list_from_file",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_session" "', argument " "1"" of type '" "SSL const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_client_CA_list_from_file" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_client_CA_list_from_file" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (SSL_SESSION *)SSL_get_session((SSL const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + ssl_ctx_set_client_CA_list_from_file(arg1,(char const *)arg2); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get1_session(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify_default(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL_SESSION *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_verify_default",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get1_session" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_verify_default" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_verify_default" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (SSL_SESSION *)SSL_get1_session(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + ssl_ctx_set_verify_default(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_session(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + int arg2 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_session", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_verify",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_session" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_verify" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_verify" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!PyCallable_Check(obj2)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg3=obj2; } - arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)SSL_set_session(arg1,arg2); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_session_free(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_free" "', argument " "1"" of type '" "SSL_SESSION *""'"); + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - arg1 = (SSL_SESSION *)(argp1); - SSL_SESSION_free(arg1); + ssl_ctx_set_verify(arg1,arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -21935,38 +20996,31 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_session_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_session_id_context(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_session_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_session_id_context",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_session_id_context" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_session_print" "', argument " "2"" of type '" "SSL_SESSION const *""'"); + arg1 = (SSL_CTX *)(argp1); + { + arg2=obj1; } - arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)SSL_SESSION_print(arg1,(SSL_SESSION const *)arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)ssl_ctx_set_session_id_context(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -21977,52 +21031,80 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_session_set_timeout(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_info_callback(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; - long arg2 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - long result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_session_set_timeout", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_info_callback",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_set_timeout" "', argument " "1"" of type '" "SSL_SESSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_info_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL_SESSION *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_session_set_timeout" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); - result = (long)SSL_SESSION_set_timeout(arg1,arg2); - resultobj = SWIG_From_long((long)(result)); + arg1 = (SSL_CTX *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + ssl_ctx_set_info_callback(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_session_get_timeout(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_dh(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + DH *arg2 = (DH *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; long result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_tmp_dh",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_get_timeout" "', argument " "1"" of type '" "SSL_SESSION const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_dh" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL_SESSION *)(argp1); - result = (long)SSL_SESSION_get_timeout((SSL_SESSION const *)arg1); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_DH, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_tmp_dh" "', argument " "2"" of type '" "DH *""'"); + } + arg2 = (DH *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (long)ssl_ctx_set_tmp_dh(arg1,arg2); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: @@ -22030,357 +21112,355 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_accept(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_dh_callback(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - double arg2 = (double) -1 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_accept", 1, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_tmp_dh_callback",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_accept" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_dh_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_accept" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); + arg1 = (SSL_CTX *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ssl_accept(arg1,arg2); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + ssl_ctx_set_tmp_dh_callback(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_connect(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_rsa(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - double arg2 = (double) -1 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + RSA *arg2 = (RSA *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "ssl_connect", 1, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_tmp_rsa",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_connect" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_rsa" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - if (swig_obj[1]) { - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_connect" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_tmp_rsa" "', argument " "2"" of type '" "RSA *""'"); } + arg2 = (RSA *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ssl_connect(arg1,arg2); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (long)ssl_ctx_set_tmp_rsa(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_read(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_rsa_callback(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - int arg2 ; - double arg3 = (double) -1 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_read", 2, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_tmp_rsa_callback",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_read" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_rsa_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_read" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ssl_read" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); + arg1 = (SSL_CTX *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ssl_read(arg1,arg2,arg3); { - resultobj=result; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + ssl_ctx_set_tmp_rsa_callback(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_write(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_load_verify_locations(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - double arg3 = (double) -1 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_write", 2, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_load_verify_locations",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_write" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_load_verify_locations" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (SSL_CTX *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_load_verify_locations" "', argument " "2"" of type '" "char const *""'"); } - if (swig_obj[2]) { - ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ssl_write" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ssl_ctx_load_verify_locations" "', argument " "3"" of type '" "char const *""'"); } + arg3 = (char *)(buf3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_write(arg1,arg2,arg3); + result = (int)ssl_ctx_load_verify_locations(arg1,(char const *)arg2,(char const *)arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN int Swig_var__ssl_err_set(PyObject *_val) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_options(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_options",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_options" "', argument " "1"" of type '" "SSL_CTX *""'"); + } + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_options" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_ssl_err""' of type '""PyObject *""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } - _ssl_err = (PyObject *)(argp); } - return 0; + result = (long)ssl_ctx_set_options(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); + return resultobj; fail: - return 1; + return NULL; } -SWIGINTERN PyObject *Swig_var__ssl_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; +SWIGINTERN PyObject *_wrap_bio_set_ssl(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + BIO *arg1 = (BIO *) 0 ; + SSL *arg2 = (SSL *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_ssl_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN int Swig_var__ssl_timeout_err_set(PyObject *_val) { + if(!PyArg_UnpackTuple(args,(char *)"bio_set_ssl",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_ssl" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_set_ssl" "', argument " "2"" of type '" "SSL *""'"); + } + arg2 = (SSL *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bio_set_ssl" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_ssl_timeout_err""' of type '""PyObject *""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } - _ssl_timeout_err = (PyObject *)(argp); } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__ssl_timeout_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_ssl_timeout_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_ssl_init(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *swig_obj[2] ; - - if (!SWIG_Python_UnpackTuple(args, "ssl_init", 2, 2, swig_obj)) SWIG_fail; { - arg1=swig_obj[0]; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (int)bio_set_ssl(arg1,arg2,arg3); { - arg2=swig_obj[1]; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - ssl_init(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_tlsv1_method(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "tlsv1_method", 0, 0, 0)) SWIG_fail; - result = (SSL_METHOD *)tlsv1_method(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_METHOD, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_passphrase_callback(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_mode(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL *arg1 = (SSL *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_passphrase_callback", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_mode",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_passphrase_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_mode" "', argument " "1"" of type '" "SSL *""'"); } + arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_mode" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - ssl_ctx_passphrase_callback(arg1,arg2); - resultobj = SWIG_Py_Void(); + result = (long)ssl_set_mode(arg1,arg2); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_use_x509(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_mode(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - X509 *arg2 = (X509 *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_use_x509", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_mode",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_x509" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_x509" "', argument " "2"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_mode" "', argument " "1"" of type '" "SSL *""'"); } - arg2 = (X509 *)(argp2); + arg1 = (SSL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_use_x509(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (long)ssl_get_mode(arg1); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_use_cert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_tlsext_host_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_use_cert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_tlsext_host_name",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_cert" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_tlsext_host_name" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (SSL *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_cert" "', argument " "2"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_tlsext_host_name" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { @@ -22388,7 +21468,7 @@ SWIGINTERN PyObject *_wrap_ssl_ctx_use_cert(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_use_cert(arg1,arg2); + result = (int)ssl_set_tlsext_host_name(arg1,(char const *)arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -22401,27 +21481,27 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_use_cert_chain(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_client_CA_list_from_file(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_use_cert_chain", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_client_CA_list_from_file",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_cert_chain" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_client_CA_list_from_file" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (SSL *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_cert_chain" "', argument " "2"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_client_CA_list_from_file" "', argument " "2"" of type '" "char const *""'"); } arg2 = (char *)(buf2); { @@ -22429,52 +21509,8 @@ SWIGINTERN PyObject *_wrap_ssl_ctx_use_cert_chain(PyObject *self, PyObject *args SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_use_cert_chain(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_ctx_use_privkey(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_use_privkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_privkey" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)ssl_ctx_use_privkey(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + ssl_set_client_CA_list_from_file(arg1,(char const *)arg2); + resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: @@ -22483,28 +21519,28 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_use_rsa_privkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_client_CA_list_from_context(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - RSA *arg2 = (RSA *) 0 ; + SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg2 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_use_rsa_privkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_client_CA_list_from_context",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_rsa_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_client_CA_list_from_context" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + arg1 = (SSL *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_rsa_privkey" "', argument " "2"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_client_CA_list_from_context" "', argument " "2"" of type '" "SSL_CTX *""'"); } - arg2 = (RSA *)(argp2); + arg2 = (SSL_CTX *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -22515,50 +21551,39 @@ SWIGINTERN PyObject *_wrap_ssl_ctx_use_rsa_privkey(PyObject *self, PyObject *arg SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_use_rsa_privkey(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + ssl_set_client_CA_list_from_context(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_use_pkey_privkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_session_id_context(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + SSL *arg1 = (SSL *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_use_pkey_privkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_session_id_context",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_use_pkey_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_use_pkey_privkey" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_session_id_context" "', argument " "1"" of type '" "SSL *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg1 = (SSL *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg2=obj1; } { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_use_pkey_privkey(arg1,arg2); + result = (int)ssl_set_session_id_context(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -22569,27 +21594,35 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_check_privkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_fd(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_fd",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_check_privkey" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_fd" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_fd" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_check_privkey(arg1); + result = (int)ssl_set_fd(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -22600,62 +21633,62 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_client_CA_list_from_file(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_set_shutdown1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - char *arg2 = (char *) 0 ; + SSL *arg1 = (SSL *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_client_CA_list_from_file", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_set_shutdown1",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_client_CA_list_from_file" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_client_CA_list_from_file" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_shutdown1" "', argument " "1"" of type '" "SSL *""'"); } - arg2 = (char *)(buf2); + arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_shutdown1" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ssl_ctx_set_client_CA_list_from_file(arg1,(char const *)arg2); + ssl_set_shutdown1(arg1,arg2); resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify_default(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_read_nbio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + SSL *arg1 = (SSL *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_verify_default", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_read_nbio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_verify_default" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_read_nbio" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (SSL *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_verify_default" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_read_nbio" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); { @@ -22663,85 +21696,71 @@ SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify_default(PyObject *self, PyObject * SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ssl_ctx_set_verify_default(arg1,arg2); - resultobj = SWIG_Py_Void(); + result = (PyObject *)ssl_read_nbio(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_verify(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_write_nbio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - int arg2 ; - PyObject *arg3 = (PyObject *) 0 ; + SSL *arg1 = (SSL *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_verify", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_write_nbio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_verify" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_write_nbio" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_verify" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (SSL *)(argp1); { - if (!PyCallable_Check(swig_obj[2])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg3=swig_obj[2]; + arg2=obj1; } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)ssl_write_nbio(arg1,arg2); { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - ssl_ctx_set_verify(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_session_id_context(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_cipher_get_bits(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL_CIPHER *arg1 = (SSL_CIPHER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_session_id_context", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_cipher_get_bits",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_session_id_context" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher_get_bits" "', argument " "1"" of type '" "SSL_CIPHER *""'"); } + arg1 = (SSL_CIPHER *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_set_session_id_context(arg1,arg2); + result = (int)ssl_cipher_get_bits(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -22752,331 +21771,346 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_info_callback(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_ssl_cipher_num(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + struct stack_st_SSL_CIPHER *arg1 = (struct stack_st_SSL_CIPHER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_info_callback", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_ssl_cipher_num",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_SSL_CIPHER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_info_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_ssl_cipher_num" "', argument " "1"" of type '" "struct stack_st_SSL_CIPHER *""'"); } + arg1 = (struct stack_st_SSL_CIPHER *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)sk_ssl_cipher_num(arg1); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - ssl_ctx_set_info_callback(arg1,arg2); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_dh(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_ssl_cipher_value(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - DH *arg2 = (DH *) 0 ; + struct stack_st_SSL_CIPHER *arg1 = (struct stack_st_SSL_CIPHER *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - long result; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + SSL_CIPHER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_tmp_dh", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_ssl_cipher_value",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_SSL_CIPHER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_dh" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_DH, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_tmp_dh" "', argument " "2"" of type '" "DH *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_ssl_cipher_value" "', argument " "1"" of type '" "struct stack_st_SSL_CIPHER *""'"); } - arg2 = (DH *)(argp2); + arg1 = (struct stack_st_SSL_CIPHER *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_ssl_cipher_value" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (long)ssl_ctx_set_tmp_dh(arg1,arg2); - resultobj = SWIG_From_long((long)(result)); + result = (SSL_CIPHER *)sk_ssl_cipher_value(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_dh_callback(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_get_peer_cert_chain(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + struct stack_st_X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_tmp_dh_callback", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_get_peer_cert_chain",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_dh_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_peer_cert_chain" "', argument " "1"" of type '" "SSL *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (SSL *)(argp1); { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } - arg2=swig_obj[1]; } + result = (struct stack_st_X509 *)ssl_get_peer_cert_chain(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_x509_num(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_num",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_num" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); + } + arg1 = (struct stack_st_X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)sk_x509_num(arg1); { - if (!arg2) { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_x509_value(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + X509 *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_value",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_value" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); + } + arg1 = (struct stack_st_X509 *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_x509_value" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ssl_ctx_set_tmp_dh_callback(arg1,arg2); - resultobj = SWIG_Py_Void(); + result = (X509 *)sk_x509_value(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_rsa(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_i2d_ssl_session(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - RSA *arg2 = (RSA *) 0 ; + BIO *arg1 = (BIO *) 0 ; + SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; - long result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_tmp_rsa", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"i2d_ssl_session",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_rsa" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_ssl_session" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_RSA, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_set_tmp_rsa" "', argument " "2"" of type '" "RSA *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_ssl_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); } - arg2 = (RSA *)(argp2); + arg2 = (SSL_SESSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + i2d_ssl_session(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; } - result = (long)ssl_ctx_set_tmp_rsa(arg1,arg2); - resultobj = SWIG_From_long((long)(result)); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_tmp_rsa_callback(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_session_read_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + SSL_SESSION *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_tmp_rsa_callback", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_session_read_pem",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_tmp_rsa_callback" "', argument " "1"" of type '" "SSL_CTX *""'"); - } - arg1 = (SSL_CTX *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_read_pem" "', argument " "1"" of type '" "BIO *""'"); } + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (SSL_SESSION *)ssl_session_read_pem(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_SSL_SESSION, 0); + else { + m2_PyErr_Msg(_ssl_err); + resultobj = NULL; } } - ssl_ctx_set_tmp_rsa_callback(arg1,arg2); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_load_verify_locations(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_session_write_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject *swig_obj[3] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_load_verify_locations", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_session_write_pem",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_load_verify_locations" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_write_pem" "', argument " "1"" of type '" "SSL_SESSION *""'"); } - arg1 = (SSL_CTX *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (SSL_SESSION *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ctx_load_verify_locations" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ssl_ctx_load_verify_locations" "', argument " "3"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_session_write_pem" "', argument " "2"" of type '" "BIO *""'"); } - arg3 = (char *)(buf3); + arg2 = (BIO *)(argp2); { - if (!arg1) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_load_verify_locations(arg1,(char const *)arg2,(char const *)arg3); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)ssl_session_write_pem(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_options(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_session_cache_mode(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL_CTX *arg1 = (SSL_CTX *) 0 ; - long arg2 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - long result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_options", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_session_cache_mode",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_options" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_session_cache_mode" "', argument " "1"" of type '" "SSL_CTX *""'"); } arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_options" "', argument " "2"" of type '" "long""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_session_cache_mode" "', argument " "2"" of type '" "int""'"); } - arg2 = (long)(val2); + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)ssl_ctx_set_options(arg1,arg2); - resultobj = SWIG_From_long((long)(result)); + result = (int)ssl_ctx_set_session_cache_mode(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_bio_set_ssl(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_get_session_cache_mode(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - SSL *arg2 = (SSL *) 0 ; - int arg3 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "bio_set_ssl", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_get_session_cache_mode",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_set_ssl" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bio_set_ssl" "', argument " "2"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_session_cache_mode" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg2 = (SSL *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bio_set_ssl" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); + arg1 = (SSL_CTX *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)bio_set_ssl(arg1,arg2,arg3); + result = (int)ssl_ctx_get_session_cache_mode(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23087,26 +22121,27 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_set_mode(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_ctx_set_cache_size(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + SSL_CTX *arg1 = (SSL_CTX *) 0 ; long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; long result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_mode", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_ctx_set_cache_size",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_mode" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_cache_size" "', argument " "1"" of type '" "SSL_CTX *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); + arg1 = (SSL_CTX *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_mode" "', argument " "2"" of type '" "long""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_cache_size" "', argument " "2"" of type '" "long""'"); } arg2 = (long)(val2); { @@ -23114,7 +22149,7 @@ SWIGINTERN PyObject *_wrap_ssl_set_mode(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)ssl_set_mode(arg1,arg2); + result = (long)ssl_ctx_set_cache_size(arg1,arg2); resultobj = SWIG_From_long((long)(result)); return resultobj; fail: @@ -23122,19 +22157,18 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_get_mode(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ssl_is_init_finished(PyObject *self, PyObject *args) { PyObject *resultobj = 0; SSL *arg1 = (SSL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - long result; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ssl_is_init_finished",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SSL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_mode" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_is_init_finished" "', argument " "1"" of type '" "SSL *""'"); } arg1 = (SSL *)(argp1); { @@ -23142,124 +22176,105 @@ SWIGINTERN PyObject *_wrap_ssl_get_mode(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)ssl_get_mode(arg1); - resultobj = SWIG_From_long((long)(result)); + result = (int)ssl_is_init_finished(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_tlsext_host_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_check_ca(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - char *arg2 = (char *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_tlsext_host_name", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_check_ca",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_tlsext_host_name" "', argument " "1"" of type '" "SSL *""'"); - } - arg1 = (SSL *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_tlsext_host_name" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_check_ca" "', argument " "1"" of type '" "X509 *""'"); } - arg2 = (char *)(buf2); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_set_tlsext_host_name(arg1,(char const *)arg2); + result = (int)X509_check_ca(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_client_CA_list_from_file(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; + X509 *result = 0 ; + + result = (X509 *)X509_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_dup(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509 *arg1 = (X509 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_client_CA_list_from_file", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_dup",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_client_CA_list_from_file" "', argument " "1"" of type '" "SSL *""'"); - } - arg1 = (SSL *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_client_CA_list_from_file" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_dup" "', argument " "1"" of type '" "X509 *""'"); } - arg2 = (char *)(buf2); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ssl_set_client_CA_list_from_file(arg1,(char const *)arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (X509 *)X509_dup(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_client_CA_list_from_context(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - SSL_CTX *arg2 = (SSL_CTX *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_client_CA_list_from_context", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_client_CA_list_from_context" "', argument " "1"" of type '" "SSL *""'"); - } - arg1 = (SSL *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL_CTX, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_set_client_CA_list_from_context" "', argument " "2"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_free" "', argument " "1"" of type '" "X509 *""'"); } - arg2 = (SSL_CTX *)(argp2); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - ssl_set_client_CA_list_from_context(arg1,arg2); + X509_free(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -23267,68 +22282,82 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_set_session_id_context(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_crl_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + X509_CRL *arg1 = (X509_CRL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_session_id_context", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_crl_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_CRL, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_session_id_context" "', argument " "1"" of type '" "SSL *""'"); - } - arg1 = (SSL *)(argp1); - { - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_crl_free" "', argument " "1"" of type '" "X509_CRL *""'"); } + arg1 = (X509_CRL *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_set_session_id_context(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + X509_CRL_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_set_fd(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_crl_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - int arg2 ; + X509_CRL *result = 0 ; + + result = (X509_CRL *)X509_CRL_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_CRL, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_print(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + BIO *arg1 = (BIO *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_fd", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_fd" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_print" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_fd" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_print" "', argument " "2"" of type '" "X509 *""'"); + } + arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_set_fd(arg1,arg2); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)X509_print(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23339,101 +22368,110 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_set_shutdown1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_crl_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - int arg2 ; + BIO *arg1 = (BIO *) 0 ; + X509_CRL *arg2 = (X509_CRL *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_set_shutdown1", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_crl_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_set_shutdown1" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_crl_print" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_set_shutdown1" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_CRL, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_crl_print" "', argument " "2"" of type '" "X509_CRL *""'"); + } + arg2 = (X509_CRL *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ssl_set_shutdown1(arg1,arg2); - resultobj = SWIG_Py_Void(); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)X509_CRL_print(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_read_nbio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_serial_number(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - int arg2 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + ASN1_INTEGER *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ssl_read_nbio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_serial_number",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_read_nbio" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_serial_number" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (SSL *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_read_nbio" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ssl_read_nbio(arg1,arg2); - { - resultobj=result; - } + result = (ASN1_INTEGER *)X509_get_serialNumber(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_write_nbio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_serial_number(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + X509 *arg1 = (X509 *) 0 ; + ASN1_INTEGER *arg2 = (ASN1_INTEGER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_write_nbio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_serial_number",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_write_nbio" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_serial_number" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (SSL *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_serial_number" "', argument " "2"" of type '" "ASN1_INTEGER *""'"); } + arg2 = (ASN1_INTEGER *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_write_nbio(arg1,arg2); + result = (int)X509_set_serialNumber(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23444,58 +22482,67 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_cipher_get_bits(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CIPHER *arg1 = (SSL_CIPHER *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + EVP_PKEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_pubkey",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher_get_bits" "', argument " "1"" of type '" "SSL_CIPHER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_pubkey" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (SSL_CIPHER *)(argp1); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_cipher_get_bits(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (EVP_PKEY *)X509_get_pubkey(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_ssl_cipher_num(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_SSL_CIPHER *arg1 = (struct stack_st_SSL_CIPHER *) 0 ; + X509 *arg1 = (X509 *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_SSL_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_pubkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_ssl_cipher_num" "', argument " "1"" of type '" "struct stack_st_SSL_CIPHER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_pubkey" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (struct stack_st_SSL_CIPHER *)(argp1); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_pubkey" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)sk_ssl_cipher_num(arg1); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)X509_set_pubkey(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23506,90 +22553,67 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_ssl_cipher_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_issuer_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_SSL_CIPHER *arg1 = (struct stack_st_SSL_CIPHER *) 0 ; - int arg2 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - SSL_CIPHER *result = 0 ; + PyObject * obj0 = 0 ; + X509_NAME *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_ssl_cipher_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_SSL_CIPHER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_issuer_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_ssl_cipher_value" "', argument " "1"" of type '" "struct stack_st_SSL_CIPHER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_issuer_name" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (struct stack_st_SSL_CIPHER *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_ssl_cipher_value" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (SSL_CIPHER *)sk_ssl_cipher_value(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SSL_CIPHER, 0 | 0 ); + result = (X509_NAME *)X509_get_issuer_name(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_get_peer_cert_chain(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_issuer_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + X509 *arg1 = (X509 *) 0 ; + X509_NAME *arg2 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - struct stack_st_X509 *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_issuer_name",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_get_peer_cert_chain" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_issuer_name" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_issuer_name" "', argument " "2"" of type '" "X509_NAME *""'"); + } + arg2 = (X509_NAME *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (struct stack_st_X509 *)ssl_get_peer_cert_chain(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sk_x509_num(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_num" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); - } - arg1 = (struct stack_st_X509 *)(argp1); { - if (!arg1) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)sk_x509_num(arg1); + result = (int)X509_set_issuer_name(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23600,113 +22624,70 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_x509_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_subject_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; - int arg2 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - X509 *result = 0 ; + PyObject * obj0 = 0 ; + X509_NAME *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_x509_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_subject_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_value" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_subject_name" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (struct stack_st_X509 *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_x509_value" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509 *)sk_x509_value(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + result = (X509_NAME *)X509_get_subject_name(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_i2d_ssl_session(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_subject_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - SSL_SESSION *arg2 = (SSL_SESSION *) 0 ; + X509 *arg1 = (X509 *) 0 ; + X509_NAME *arg2 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "i2d_ssl_session", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_subject_name",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_ssl_session" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_subject_name" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_ssl_session" "', argument " "2"" of type '" "SSL_SESSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_subject_name" "', argument " "2"" of type '" "X509_NAME *""'"); } - arg2 = (SSL_SESSION *)(argp2); + arg2 = (X509_NAME *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - i2d_ssl_session(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ssl_session_read_pem(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - SSL_SESSION *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_read_pem" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)X509_set_subject_name(arg1,arg2); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (SSL_SESSION *)ssl_session_read_pem(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_SSL_SESSION, 0); - else { - m2_PyErr_Msg(_ssl_err); - resultobj = NULL; - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -23714,38 +22695,21 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_session_write_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_cmp_current_time(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_SESSION *arg1 = (SSL_SESSION *) 0 ; - BIO *arg2 = (BIO *) 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_session_write_pem", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_SESSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_cmp_current_time",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_session_write_pem" "', argument " "1"" of type '" "SSL_SESSION *""'"); - } - arg1 = (SSL_SESSION *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_session_write_pem" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)ssl_session_write_pem(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_cmp_current_time" "', argument " "1"" of type '" "ASN1_TIME *""'"); } + arg1 = (ASN1_TIME *)(argp1); + result = (int)X509_cmp_current_time(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23756,34 +22720,44 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_session_cache_mode(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_check_purpose(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + X509 *arg1 = (X509 *) 0 ; int arg2 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_session_cache_mode", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_check_purpose",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_session_cache_mode" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_check_purpose" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (X509 *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_session_cache_mode" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_check_purpose" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_check_purpose" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_set_session_cache_mode(arg1,arg2); + result = (int)X509_check_purpose(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23794,27 +22768,44 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_get_session_cache_mode(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_check_trust(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; + X509 *arg1 = (X509 *) 0 ; + int arg2 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_check_trust",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_get_session_cache_mode" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_check_trust" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (SSL_CTX *)(argp1); + arg1 = (X509 *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_check_trust" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_check_trust" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_ctx_get_session_cache_mode(arg1); + result = (int)X509_check_trust(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23825,62 +22816,83 @@ fail: } -SWIGINTERN PyObject *_wrap_ssl_ctx_set_cache_size(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_write_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL_CTX *arg1 = (SSL_CTX *) 0 ; - long arg2 ; + BIO *arg1 = (BIO *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - long result; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "ssl_ctx_set_cache_size", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_write_pem",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ctx_set_cache_size" "', argument " "1"" of type '" "SSL_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_write_pem" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (SSL_CTX *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ssl_ctx_set_cache_size" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_write_pem" "', argument " "2"" of type '" "X509 *""'"); + } + arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)ssl_ctx_set_cache_size(arg1,arg2); - resultobj = SWIG_From_long((long)(result)); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)PEM_write_bio_X509(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ssl_is_init_finished(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_write_pem_file(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - SSL *arg1 = (SSL *) 0 ; + FILE *arg1 = (FILE *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SSL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_write_pem_file",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_is_init_finished" "', argument " "1"" of type '" "SSL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_write_pem_file" "', argument " "1"" of type '" "FILE *""'"); } - arg1 = (SSL *)(argp1); + arg1 = (FILE *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_write_pem_file" "', argument " "2"" of type '" "X509 *""'"); + } + arg2 = (X509 *)(argp2); { - if (!arg1) { + if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ssl_is_init_finished(arg1); + result = (int)PEM_write_X509(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23891,27 +22903,40 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_check_ca(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_verify(PyObject *self, PyObject *args) { PyObject *resultobj = 0; X509 *arg1 = (X509 *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_verify",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_check_ca" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_verify" "', argument " "1"" of type '" "X509 *""'"); } arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_verify" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_check_ca(arg1); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)X509_verify(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -23922,59 +22947,88 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_verify_error(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *result = 0 ; + long arg1 ; + long val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_new", 0, 0, 0)) SWIG_fail; - result = (X509 *)X509_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_verify_error",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_long(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "x509_get_verify_error" "', argument " "1"" of type '" "long""'"); + } + arg1 = (long)(val1); + result = (char *)X509_verify_cert_error_string(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_dup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_add_ext(PyObject *self, PyObject *args) { PyObject *resultobj = 0; X509 *arg1 = (X509 *) 0 ; + X509_EXTENSION *arg2 = (X509_EXTENSION *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509 *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_add_ext",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_dup" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_add_ext" "', argument " "1"" of type '" "X509 *""'"); } arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_add_ext" "', argument " "2"" of type '" "X509_EXTENSION *""'"); + } + arg2 = (X509_EXTENSION *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_add_ext" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509 *)X509_dup(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + result = (int)X509_add_ext(arg1,arg2,arg3); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_ext_count(PyObject *self, PyObject *args) { PyObject *resultobj = 0; X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_ext_count",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_free" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_ext_count" "', argument " "1"" of type '" "X509 *""'"); } arg1 = (X509 *)(argp1); { @@ -23982,89 +23036,102 @@ SWIGINTERN PyObject *_wrap_x509_free(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - X509_free(arg1); - resultobj = SWIG_Py_Void(); + result = (int)X509_get_ext_count(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_crl_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_ext(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_CRL *arg1 = (X509_CRL *) 0 ; + X509 *arg1 = (X509 *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + X509_EXTENSION *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_CRL, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_ext",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_crl_free" "', argument " "1"" of type '" "X509_CRL *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_ext" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (X509_CRL *)(argp1); + arg1 = (X509 *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_get_ext" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - X509_CRL_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_x509_crl_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - X509_CRL *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "x509_crl_new", 0, 0, 0)) SWIG_fail; - result = (X509_CRL *)X509_CRL_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_CRL, 0 | 0 ); + result = (X509_EXTENSION *)X509_get_ext(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_ext_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; - X509 *arg2 = (X509 *) 0 ; + X509_EXTENSION *arg2 = (X509_EXTENSION *) 0 ; + unsigned long arg3 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + unsigned long val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_ext_print",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_ext_print" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_print" "', argument " "2"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_ext_print" "', argument " "2"" of type '" "X509_EXTENSION *""'"); } - arg2 = (X509 *)(argp2); + arg2 = (X509_EXTENSION *)(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_long(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_ext_print" "', argument " "3"" of type '" "unsigned long""'"); + } + arg3 = (unsigned long)(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "x509_ext_print" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)X509_print(arg1,arg2); + result = (int)X509V3_EXT_print(arg1,arg2,arg3,arg4); SWIG_PYTHON_THREAD_END_ALLOW; } { @@ -24077,28 +23144,76 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_crl_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_new(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_NAME *result = 0 ; + + result = (X509_NAME *)X509_NAME_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_name_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_NAME *arg1 = (X509_NAME *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"x509_name_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_free" "', argument " "1"" of type '" "X509_NAME *""'"); + } + arg1 = (X509_NAME *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + X509_NAME_free(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_name_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; - X509_CRL *arg2 = (X509_CRL *) 0 ; + X509_NAME *arg2 = (X509_NAME *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_crl_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_print",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_crl_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_print" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_CRL, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_crl_print" "', argument " "2"" of type '" "X509_CRL *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_print" "', argument " "2"" of type '" "X509_NAME *""'"); } - arg2 = (X509_CRL *)(argp2); + arg2 = (X509_NAME *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_print" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -24111,7 +23226,7 @@ SWIGINTERN PyObject *_wrap_x509_crl_print(PyObject *self, PyObject *args) { } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)X509_CRL_print(arg1,arg2); + result = (int)X509_NAME_print(arg1,arg2,arg3); SWIG_PYTHON_THREAD_END_ALLOW; } { @@ -24124,62 +23239,62 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_serial_number(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_get_entry(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - ASN1_INTEGER *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + X509_NAME_ENTRY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_get_entry",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_serial_number" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_get_entry" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509 *)(argp1); + arg1 = (X509_NAME *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_get_entry" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (ASN1_INTEGER *)X509_get_serialNumber(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + result = (X509_NAME_ENTRY *)X509_NAME_get_entry(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_set_serial_number(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_count(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - ASN1_INTEGER *arg2 = (ASN1_INTEGER *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_set_serial_number", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_count",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_serial_number" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_serial_number" "', argument " "2"" of type '" "ASN1_INTEGER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_count" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg2 = (ASN1_INTEGER *)(argp2); + arg1 = (X509_NAME *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_set_serialNumber(arg1,arg2); + result = (int)X509_NAME_entry_count(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24190,56 +23305,83 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_delete_entry(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - EVP_PKEY *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + X509_NAME_ENTRY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_delete_entry",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_pubkey" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_delete_entry" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509 *)(argp1); + arg1 = (X509_NAME *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_delete_entry" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (EVP_PKEY *)X509_get_pubkey(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + result = (X509_NAME_ENTRY *)X509_NAME_delete_entry(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_set_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_add_entry(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + X509_NAME_ENTRY *arg2 = (X509_NAME_ENTRY *) 0 ; + int arg3 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_set_pubkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_add_entry",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_pubkey" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + arg1 = (X509_NAME *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_pubkey" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_add_entry" "', argument " "2"" of type '" "X509_NAME_ENTRY *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg2 = (X509_NAME_ENTRY *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "x509_name_add_entry" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -24250,7 +23392,7 @@ SWIGINTERN PyObject *_wrap_x509_set_pubkey(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_set_pubkey(arg1,arg2); + result = (int)X509_NAME_add_entry(arg1,arg2,arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24261,67 +23403,80 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_issuer_name(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_NAME *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_issuer_name" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (X509_NAME *)X509_get_issuer_name(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_x509_set_issuer_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_add_entry_by_obj(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - X509_NAME *arg2 = (X509_NAME *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + ASN1_OBJECT *arg2 = (ASN1_OBJECT *) 0 ; + int arg3 ; + unsigned char *arg4 = (unsigned char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_set_issuer_name", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_add_entry_by_obj",7,7,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_issuer_name" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry_by_obj" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); + arg1 = (X509_NAME *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_issuer_name" "', argument " "2"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_add_entry_by_obj" "', argument " "2"" of type '" "ASN1_OBJECT *""'"); } - arg2 = (X509_NAME *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg2 = (ASN1_OBJECT *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry_by_obj" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_add_entry_by_obj" "', argument " "4"" of type '" "unsigned char *""'"); } + arg4 = (unsigned char *)(argp4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_add_entry_by_obj" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "x509_name_add_entry_by_obj" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "x509_name_add_entry_by_obj" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_set_issuer_name(arg1,arg2); + result = (int)X509_NAME_add_entry_by_OBJ(arg1,arg2,arg3,arg4,arg5,arg6,arg7); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24332,56 +23487,131 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_subject_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_add_entry_by_nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + int arg2 ; + int arg3 ; + unsigned char *arg4 = (unsigned char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_NAME *result = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_add_entry_by_nid",7,7,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_subject_name" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509 *)(argp1); + arg1 = (X509_NAME *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_add_entry_by_nid" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry_by_nid" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_add_entry_by_nid" "', argument " "4"" of type '" "unsigned char *""'"); + } + arg4 = (unsigned char *)(argp4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_add_entry_by_nid" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "x509_name_add_entry_by_nid" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "x509_name_add_entry_by_nid" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509_NAME *)X509_get_subject_name(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); + result = (int)X509_NAME_add_entry_by_NID(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_set_subject_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_print_ex(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + BIO *arg1 = (BIO *) 0 ; X509_NAME *arg2 = (X509_NAME *) 0 ; + int arg3 ; + unsigned long arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + int val3 ; + int ecode3 = 0 ; + unsigned long val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_set_subject_name", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_print_ex",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_subject_name" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_print_ex" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_subject_name" "', argument " "2"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_print_ex" "', argument " "2"" of type '" "X509_NAME *""'"); } arg2 = (X509_NAME *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_print_ex" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_unsigned_SS_long(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "x509_name_print_ex" "', argument " "4"" of type '" "unsigned long""'"); + } + arg4 = (unsigned long)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -24392,7 +23622,11 @@ SWIGINTERN PyObject *_wrap_x509_set_subject_name(PyObject *self, PyObject *args) SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_set_subject_name(arg1,arg2); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)X509_NAME_print_ex(arg1,arg2,arg3,arg4); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24403,35 +23637,36 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_cmp_current_time(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_hash(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; + unsigned long result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_hash",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_cmp_current_time" "', argument " "1"" of type '" "ASN1_TIME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_hash" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (ASN1_TIME *)(argp1); - result = (int)X509_cmp_current_time(arg1); + arg1 = (X509_NAME *)(argp1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (unsigned long)X509_NAME_hash_old(arg1); + resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_check_purpose(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_get_index_by_nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; int arg2 ; int arg3 ; void *argp1 = 0 ; @@ -24440,23 +23675,25 @@ SWIGINTERN PyObject *_wrap_x509_check_purpose(PyObject *self, PyObject *args) { int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_check_purpose", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_get_index_by_nid",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_check_purpose" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_get_index_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509 *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (X509_NAME *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_check_purpose" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_get_index_by_nid" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_check_purpose" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_get_index_by_nid" "', argument " "3"" of type '" "int""'"); } arg3 = (int)(val3); { @@ -24464,7 +23701,7 @@ SWIGINTERN PyObject *_wrap_x509_check_purpose(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_check_purpose(arg1,arg2,arg3); + result = (int)X509_NAME_get_index_by_NID(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24475,127 +23712,131 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_check_trust(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - int arg2 ; - int arg3 ; + X509_NAME_ENTRY *result = 0 ; + + result = (X509_NAME_ENTRY *)X509_NAME_ENTRY_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_name_entry_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_check_trust", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_check_trust" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_free" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); } - arg1 = (X509 *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_check_trust" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_check_trust" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); + arg1 = (X509_NAME_ENTRY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_check_trust(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + X509_NAME_ENTRY_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_write_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_create_by_nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - X509 *arg2 = (X509 *) 0 ; + X509_NAME_ENTRY **arg1 = (X509_NAME_ENTRY **) 0 ; + int arg2 ; + int arg3 ; + unsigned char *arg4 = (unsigned char *) 0 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + X509_NAME_ENTRY *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_write_pem", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_create_by_nid",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_write_pem" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_write_pem" "', argument " "2"" of type '" "X509 *""'"); - } - arg2 = (X509 *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)PEM_write_bio_X509(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_create_by_nid" "', argument " "1"" of type '" "X509_NAME_ENTRY **""'"); } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + arg1 = (X509_NAME_ENTRY **)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_entry_create_by_nid" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_entry_create_by_nid" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_entry_create_by_nid" "', argument " "4"" of type '" "unsigned char *""'"); } + arg4 = (unsigned char *)(argp4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_entry_create_by_nid" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + result = (X509_NAME_ENTRY *)X509_NAME_ENTRY_create_by_NID(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_write_pem_file(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_set_object(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - FILE *arg1 = (FILE *) 0 ; - X509 *arg2 = (X509 *) 0 ; + X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; + ASN1_OBJECT *arg2 = (ASN1_OBJECT *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_write_pem_file", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_set_object",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_write_pem_file" "', argument " "1"" of type '" "FILE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_set_object" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); } - arg1 = (FILE *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); + arg1 = (X509_NAME_ENTRY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_write_pem_file" "', argument " "2"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_entry_set_object" "', argument " "2"" of type '" "ASN1_OBJECT *""'"); } - arg2 = (X509 *)(argp2); + arg2 = (ASN1_OBJECT *)(argp2); { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)PEM_write_X509(arg1,arg2); + result = (int)X509_NAME_ENTRY_set_object(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24606,139 +23847,110 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_verify(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_get_object(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + ASN1_OBJECT *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_verify", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_get_object",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_verify" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_verify" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_get_object" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg1 = (X509_NAME_ENTRY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)X509_verify(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_x509_get_verify_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - long arg1 ; - long val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_long(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "x509_get_verify_error" "', argument " "1"" of type '" "long""'"); - } - arg1 = (long)(val1); - result = (char *)X509_verify_cert_error_string(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + result = (ASN1_OBJECT *)X509_NAME_ENTRY_get_object(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_add_ext(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_get_data(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - X509_EXTENSION *arg2 = (X509_EXTENSION *) 0 ; - int arg3 ; + X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + ASN1_STRING *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_add_ext", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_get_data",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_add_ext" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_add_ext" "', argument " "2"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_get_data" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); } - arg2 = (X509_EXTENSION *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_add_ext" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); + arg1 = (X509_NAME_ENTRY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_add_ext(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (ASN1_STRING *)X509_NAME_ENTRY_get_data(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_STRING, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_get_ext_count(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_set_data(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; + int arg2 ; + unsigned char *arg3 = (unsigned char *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_set_data",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_ext_count" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_set_data" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); + } + arg1 = (X509_NAME_ENTRY *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_entry_set_data" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (PyString_Check(obj2)) { + Py_ssize_t len; + + arg3 = (unsigned char *)PyString_AsString(obj2); + len = PyString_Size(obj2); + + + if (len > INT_MAX) { + PyErr_SetString(_x509_err, "object too large"); + return NULL; + } + arg4 = len; + } else { + PyErr_SetString(PyExc_TypeError, "expected string"); + return NULL; + } } - arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_get_ext_count(arg1); + result = (int)X509_NAME_ENTRY_set_data(arg1,arg2,(unsigned char const *)arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24749,87 +23961,80 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_ext(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - int arg2 ; + X509_REQ *result = 0 ; + + result = (X509_REQ *)X509_REQ_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_REQ, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_req_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_REQ *arg1 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - X509_EXTENSION *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_get_ext", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_ext" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_free" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (X509 *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_get_ext" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (X509_REQ *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509_EXTENSION *)X509_get_ext(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + X509_REQ_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_ext_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; - X509_EXTENSION *arg2 = (X509_EXTENSION *) 0 ; - unsigned long arg3 ; - int arg4 ; + X509_REQ *arg2 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - unsigned long val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_ext_print", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_ext_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_print" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_ext_print" "', argument " "2"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_print" "', argument " "2"" of type '" "X509_REQ *""'"); } - arg2 = (X509_EXTENSION *)(argp2); - ecode3 = SWIG_AsVal_unsigned_SS_long(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_ext_print" "', argument " "3"" of type '" "unsigned long""'"); - } - arg3 = (unsigned long)(val3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "x509_ext_print" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); + arg2 = (X509_REQ *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)X509V3_EXT_print(arg1,arg2,arg3,arg4); + result = (int)X509_REQ_print(arg1,arg2); SWIG_PYTHON_THREAD_END_ALLOW; } { @@ -24842,76 +24047,56 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - X509_NAME *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "x509_name_new", 0, 0, 0)) SWIG_fail; - result = (X509_NAME *)X509_NAME_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_x509_name_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_get_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + EVP_PKEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_get_pubkey",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_free" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_get_pubkey" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (X509_NAME *)(argp1); + arg1 = (X509_REQ *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - X509_NAME_free(arg1); - resultobj = SWIG_Py_Void(); + result = (EVP_PKEY *)X509_REQ_get_pubkey(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_set_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - X509_NAME *arg2 = (X509_NAME *) 0 ; - int arg3 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_print", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_set_pubkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_set_pubkey" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); + arg1 = (X509_REQ *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_print" "', argument " "2"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_set_pubkey" "', argument " "2"" of type '" "EVP_PKEY *""'"); } - arg2 = (X509_NAME *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_print" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -24922,11 +24107,7 @@ SWIGINTERN PyObject *_wrap_x509_name_print(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)X509_NAME_print(arg1,arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)X509_REQ_set_pubkey(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -24937,62 +24118,84 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_get_entry(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_set_subject_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - int arg2 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; + X509_NAME *arg2 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - X509_NAME_ENTRY *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_get_entry", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_set_subject_name",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_get_entry" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_set_subject_name" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (X509_NAME *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_get_entry" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (X509_REQ *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_set_subject_name" "', argument " "2"" of type '" "X509_NAME *""'"); + } + arg2 = (X509_NAME *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509_NAME_ENTRY *)X509_NAME_get_entry(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)X509_REQ_set_subject_name(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_entry_count(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_verify(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_verify",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_count" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_verify" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (X509_NAME *)(argp1); + arg1 = (X509_REQ *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_verify" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_NAME_entry_count(arg1); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)X509_REQ_verify(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25003,79 +24206,87 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_delete_entry(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_sign(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - int arg2 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - X509_NAME_ENTRY *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_delete_entry", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_sign",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_delete_entry" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_sign" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (X509_NAME *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_delete_entry" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + arg1 = (X509_REQ *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_sign" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "x509_req_sign" "', argument " "3"" of type '" "EVP_MD const *""'"); + } + arg3 = (EVP_MD *)(argp3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509_NAME_ENTRY *)X509_NAME_delete_entry(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)X509_REQ_sign(arg1,arg2,(EVP_MD const *)arg3); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_add_entry(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_i2d_x509_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - X509_NAME_ENTRY *arg2 = (X509_NAME_ENTRY *) 0 ; - int arg3 ; - int arg4 ; + BIO *arg1 = (BIO *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_add_entry", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"i2d_x509_bio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_x509_bio" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_NAME *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_add_entry" "', argument " "2"" of type '" "X509_NAME_ENTRY *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_x509_bio" "', argument " "2"" of type '" "X509 *""'"); } - arg2 = (X509_NAME_ENTRY *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "x509_name_add_entry" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); + arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -25086,7 +24297,11 @@ SWIGINTERN PyObject *_wrap_x509_name_add_entry(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_NAME_add_entry(arg1,arg2,arg3,arg4); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)i2d_X509_bio(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25097,74 +24312,44 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_add_entry_by_obj(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_i2d_x509_req_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - ASN1_OBJECT *arg2 = (ASN1_OBJECT *) 0 ; - int arg3 ; - unsigned char *arg4 = (unsigned char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; + BIO *arg1 = (BIO *) 0 ; + X509_REQ *arg2 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject *swig_obj[7] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_add_entry_by_obj", 7, 7, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"i2d_x509_req_bio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry_by_obj" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_x509_req_bio" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_NAME *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_add_entry_by_obj" "', argument " "2"" of type '" "ASN1_OBJECT *""'"); - } - arg2 = (ASN1_OBJECT *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry_by_obj" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_add_entry_by_obj" "', argument " "4"" of type '" "unsigned char *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_x509_req_bio" "', argument " "2"" of type '" "X509_REQ *""'"); } - arg4 = (unsigned char *)(argp4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_add_entry_by_obj" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "x509_name_add_entry_by_obj" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "x509_name_add_entry_by_obj" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); + arg2 = (X509_REQ *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_NAME_add_entry_by_OBJ(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)i2d_X509_REQ_bio(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25175,137 +24360,68 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_add_entry_by_nid(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - int arg2 ; - int arg3 ; - unsigned char *arg4 = (unsigned char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; + X509_STORE *result = 0 ; + + result = (X509_STORE *)X509_STORE_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_STORE, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_store_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_STORE *arg1 = (X509_STORE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject *swig_obj[7] ; - int result; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_add_entry_by_nid", 7, 7, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); - } - arg1 = (X509_NAME *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_add_entry_by_nid" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry_by_nid" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_add_entry_by_nid" "', argument " "4"" of type '" "unsigned char *""'"); - } - arg4 = (unsigned char *)(argp4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_add_entry_by_nid" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "x509_name_add_entry_by_nid" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "x509_name_add_entry_by_nid" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)X509_NAME_add_entry_by_NID(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_free" "', argument " "1"" of type '" "X509_STORE *""'"); } + arg1 = (X509_STORE *)(argp1); + X509_STORE_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_print_ex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_add_cert(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - X509_NAME *arg2 = (X509_NAME *) 0 ; - int arg3 ; - unsigned long arg4 ; + X509_STORE *arg1 = (X509_STORE *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - unsigned long val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_print_ex", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_add_cert",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_print_ex" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_add_cert" "', argument " "1"" of type '" "X509_STORE *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); + arg1 = (X509_STORE *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_print_ex" "', argument " "2"" of type '" "X509_NAME *""'"); - } - arg2 = (X509_NAME *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_print_ex" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_unsigned_SS_long(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "x509_name_print_ex" "', argument " "4"" of type '" "unsigned long""'"); - } - arg4 = (unsigned long)(val4); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_store_add_cert" "', argument " "2"" of type '" "X509 *""'"); } + arg2 = (X509 *)(argp2); { if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)X509_NAME_print_ex(arg1,arg2,arg3,arg4); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)X509_STORE_add_cert(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25316,70 +24432,72 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_hash(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_set_verify_cb__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; + X509_STORE *arg1 = (X509_STORE *) 0 ; + int (*arg2)(int,X509_STORE_CTX *) = (int (*)(int,X509_STORE_CTX *)) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - unsigned long result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_set_verify_cb",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_hash" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_set_verify_cb" "', argument " "1"" of type '" "X509_STORE *""'"); } - arg1 = (X509_NAME *)(argp1); + arg1 = (X509_STORE *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_int_p_X509_STORE_CTX__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "x509_store_set_verify_cb" "', argument " "2"" of type '" "int (*)(int,X509_STORE_CTX *)""'"); } } - result = (unsigned long)X509_NAME_hash_old(arg1); - resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); + X509_STORE_set_verify_cb(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_get_index_by_nid(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_ctx_get_current_cert(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - int arg2 ; - int arg3 ; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_get_index_by_nid", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_get_current_cert",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_get_index_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_current_cert" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); } - arg1 = (X509_NAME *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_get_index_by_nid" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_get_index_by_nid" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg1 = (X509_STORE_CTX *)(argp1); + result = (X509 *)X509_STORE_CTX_get_current_cert(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_store_ctx_get_error(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_get_error",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_error" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); } - result = (int)X509_NAME_get_index_by_NID(arg1,arg2,arg3); + arg1 = (X509_STORE_CTX *)(argp1); + result = (int)X509_STORE_CTX_get_error(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25390,39 +24508,45 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_entry_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_ctx_get_error_depth(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY *result = 0 ; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_entry_new", 0, 0, 0)) SWIG_fail; - result = (X509_NAME_ENTRY *)X509_NAME_ENTRY_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_get_error_depth",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_error_depth" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + } + arg1 = (X509_STORE_CTX *)(argp1); + result = (int)X509_STORE_CTX_get_error_depth(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_entry_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_ctx_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_free" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); - } - arg1 = (X509_NAME_ENTRY *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_free" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); } - X509_NAME_ENTRY_free(arg1); + arg1 = (X509_STORE_CTX *)(argp1); + X509_STORE_CTX_free(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -25430,88 +24554,77 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_entry_create_by_nid(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_ctx_get1_chain(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY **arg1 = (X509_NAME_ENTRY **) 0 ; - int arg2 ; - int arg3 ; - unsigned char *arg4 = (unsigned char *) 0 ; - int arg5 ; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; - X509_NAME_ENTRY *result = 0 ; + PyObject * obj0 = 0 ; + struct stack_st_X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_entry_create_by_nid", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_get1_chain",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_create_by_nid" "', argument " "1"" of type '" "X509_NAME_ENTRY **""'"); - } - arg1 = (X509_NAME_ENTRY **)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_entry_create_by_nid" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_entry_create_by_nid" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_entry_create_by_nid" "', argument " "4"" of type '" "unsigned char *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get1_chain" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); } - arg4 = (unsigned char *)(argp4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_entry_create_by_nid" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - result = (X509_NAME_ENTRY *)X509_NAME_ENTRY_create_by_NID(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + arg1 = (X509_STORE_CTX *)(argp1); + result = (struct stack_st_X509 *)X509_STORE_CTX_get1_chain(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_entry_set_object(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_extension_get_critical(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; - ASN1_OBJECT *arg2 = (ASN1_OBJECT *) 0 ; + X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_entry_set_object", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_extension_get_critical",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_set_object" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); - } - arg1 = (X509_NAME_ENTRY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_entry_set_object" "', argument " "2"" of type '" "ASN1_OBJECT *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_get_critical" "', argument " "1"" of type '" "X509_EXTENSION *""'"); } - arg2 = (ASN1_OBJECT *)(argp2); + arg1 = (X509_EXTENSION *)(argp1); + result = (int)X509_EXTENSION_get_critical(arg1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (int)X509_NAME_ENTRY_set_object(arg1,arg2); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_extension_set_critical(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"x509_extension_set_critical",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_set_critical" "', argument " "1"" of type '" "X509_EXTENSION *""'"); + } + arg1 = (X509_EXTENSION *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_extension_set_critical" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (int)X509_EXTENSION_set_critical(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25522,113 +24635,113 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_entry_get_object(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_set_flags(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; + X509_STORE *arg1 = (X509_STORE *) 0 ; + unsigned long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - ASN1_OBJECT *result = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_set_flags",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_get_object" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_set_flags" "', argument " "1"" of type '" "X509_STORE *""'"); } - arg1 = (X509_NAME_ENTRY *)(argp1); + arg1 = (X509_STORE *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_store_set_flags" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = (unsigned long)(val2); + result = (int)X509_STORE_set_flags(arg1,arg2); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - result = (ASN1_OBJECT *)X509_NAME_ENTRY_get_object(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_entry_get_data(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_read_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - ASN1_STRING *result = 0 ; + PyObject * obj0 = 0 ; + X509 *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_read_pem",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_get_data" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_read_pem" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_NAME_ENTRY *)(argp1); + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (ASN1_STRING *)X509_NAME_ENTRY_get_data(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_STRING, 0 | 0 ); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (X509 *)x509_read_pem(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509, 0); + else { + m2_PyErr_Msg(_x509_err); + resultobj = NULL; + } + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_entry_set_data(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_d2i_x509(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY *arg1 = (X509_NAME_ENTRY *) 0 ; - int arg2 ; - unsigned char *arg3 = (unsigned char *) 0 ; - int arg4 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_entry_set_data", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"d2i_x509",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_set_data" "', argument " "1"" of type '" "X509_NAME_ENTRY *""'"); - } - arg1 = (X509_NAME_ENTRY *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_entry_set_data" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - { - if (PyString_Check(swig_obj[2])) { - Py_ssize_t len; - - arg3 = (unsigned char *)PyString_AsString(swig_obj[2]); - len = PyString_Size(swig_obj[2]); - - - if (len > INT_MAX) { - PyErr_SetString(_x509_err, "object too large"); - return NULL; - } - arg4 = len; - } else { - PyErr_SetString(PyExc_TypeError, "expected string"); - return NULL; - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "d2i_x509" "', argument " "1"" of type '" "BIO *""'"); } + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_NAME_ENTRY_set_data(arg1,arg2,(unsigned char const *)arg3,arg4); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (X509 *)d2i_x509(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509, 0); + else { + m2_PyErr_Msg(_x509_err); + resultobj = NULL; + } } return resultobj; fail: @@ -25636,86 +24749,121 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_new(PyObject *self, PyObject *args) { +SWIGINTERN int Swig_var__x509_err_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_x509_err""' of type '""PyObject *""'"); + } + _x509_err = (PyObject *)(argp); + } + return 0; +fail: + return 1; +} + + +SWIGINTERN PyObject *Swig_var__x509_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_x509_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_x509_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_req_new", 0, 0, 0)) SWIG_fail; - result = (X509_REQ *)X509_REQ_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_init",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; + } + x509_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_req_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_d2i_x509_req(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + X509_REQ *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"d2i_x509_req",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_free" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "d2i_x509_req" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_REQ *)(argp1); + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - X509_REQ_free(arg1); - resultobj = SWIG_Py_Void(); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (X509_REQ *)d2i_x509_req(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_REQ, 0); + else { + m2_PyErr_Msg(_x509_err); + resultobj = NULL; + } + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_req_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_read_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; - X509_REQ *arg2 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + X509_REQ *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_req_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_read_pem",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_read_pem" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_REQ, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_print" "', argument " "2"" of type '" "X509_REQ *""'"); - } - arg2 = (X509_REQ *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)X509_REQ_print(arg1,arg2); + result = (X509_REQ *)x509_req_read_pem(arg1); SWIG_PYTHON_THREAD_END_ALLOW; } { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_REQ, 0); + else { + m2_PyErr_Msg(_x509_err); + resultobj = NULL; + } } return resultobj; fail: @@ -25723,56 +24871,58 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_get_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_i2d_x509(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - EVP_PKEY *result = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"i2d_x509",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_get_pubkey" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_x509" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (X509_REQ *)(argp1); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (EVP_PKEY *)X509_REQ_get_pubkey(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + result = (PyObject *)i2d_x509(arg1); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_req_set_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_write_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + BIO *arg1 = (BIO *) 0 ; + X509_REQ *arg2 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_req_set_pubkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_write_pem",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_set_pubkey" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_write_pem" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_REQ *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_set_pubkey" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_write_pem" "', argument " "2"" of type '" "X509_REQ *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg2 = (X509_REQ *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -25783,7 +24933,11 @@ SWIGINTERN PyObject *_wrap_x509_req_set_pubkey(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_REQ_set_pubkey(arg1,arg2); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)x509_req_write_pem(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25794,42 +24948,39 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_set_subject_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_crl_read_pem(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; - X509_NAME *arg2 = (X509_NAME *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + X509_CRL *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_req_set_subject_name", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_crl_read_pem",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_set_subject_name" "', argument " "1"" of type '" "X509_REQ *""'"); - } - arg1 = (X509_REQ *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_NAME, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_set_subject_name" "', argument " "2"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_crl_read_pem" "', argument " "1"" of type '" "BIO *""'"); } - arg2 = (X509_NAME *)(argp2); + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (X509_CRL *)x509_crl_read_pem(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; } - result = (int)X509_REQ_set_subject_name(arg1,arg2); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_CRL, 0); + else { + m2_PyErr_Msg(_x509_err); + resultobj = NULL; + } } return resultobj; fail: @@ -25837,39 +24988,35 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_verify(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_version(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + X509 *arg1 = (X509 *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_req_verify", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_version",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_verify" "', argument " "1"" of type '" "X509_REQ *""'"); - } - arg1 = (X509_REQ *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_verify" "', argument " "2"" of type '" "EVP_PKEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_version" "', argument " "1"" of type '" "X509 *""'"); } - arg2 = (EVP_PKEY *)(argp2); + arg1 = (X509 *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_set_version" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)X509_REQ_verify(arg1,arg2); + result = (int)x509_set_version(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -25880,146 +25027,128 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_sign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_version(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + long result; - if (!SWIG_Python_UnpackTuple(args, "x509_req_sign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_version",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_sign" "', argument " "1"" of type '" "X509_REQ *""'"); - } - arg1 = (X509_REQ *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_sign" "', argument " "2"" of type '" "EVP_PKEY *""'"); - } - arg2 = (EVP_PKEY *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "x509_req_sign" "', argument " "3"" of type '" "EVP_MD const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_version" "', argument " "1"" of type '" "X509 *""'"); } - arg3 = (EVP_MD *)(argp3); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)X509_REQ_sign(arg1,arg2,(EVP_MD const *)arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (long)x509_get_version(arg1); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_i2d_x509_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_not_before(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - X509 *arg2 = (X509 *) 0 ; + X509 *arg1 = (X509 *) 0 ; + ASN1_TIME *arg2 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "i2d_x509_bio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_not_before",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_x509_bio" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_not_before" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_x509_bio" "', argument " "2"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_not_before" "', argument " "2"" of type '" "ASN1_TIME *""'"); } - arg2 = (X509 *)(argp2); + arg2 = (ASN1_TIME *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)x509_set_not_before(arg1,arg2); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)i2d_X509_bio(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509_get_not_before(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509 *arg1 = (X509 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + ASN1_TIME *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"x509_get_not_before",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_not_before" "', argument " "1"" of type '" "X509 *""'"); } + arg1 = (X509 *)(argp1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (ASN1_TIME *)x509_get_not_before(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_i2d_x509_req_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_set_not_after(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - X509_REQ *arg2 = (X509_REQ *) 0 ; + X509 *arg1 = (X509 *) 0 ; + ASN1_TIME *arg2 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "i2d_x509_req_bio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_set_not_after",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_x509_req_bio" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_not_after" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_REQ, 0 | 0 ); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_x509_req_bio" "', argument " "2"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_not_after" "', argument " "2"" of type '" "ASN1_TIME *""'"); } - arg2 = (X509_REQ *)(argp2); + arg2 = (ASN1_TIME *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)i2d_X509_REQ_bio(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)x509_set_not_after(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26030,69 +25159,81 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_store_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - X509_STORE *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "x509_store_new", 0, 0, 0)) SWIG_fail; - result = (X509_STORE *)X509_STORE_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_STORE, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_x509_store_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_get_not_after(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE *arg1 = (X509_STORE *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + ASN1_TIME *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_get_not_after",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_free" "', argument " "1"" of type '" "X509_STORE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_not_after" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (X509_STORE *)(argp1); - X509_STORE_free(arg1); - resultobj = SWIG_Py_Void(); + arg1 = (X509 *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (ASN1_TIME *)x509_get_not_after(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_add_cert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_sign(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE *arg1 = (X509_STORE *) 0 ; - X509 *arg2 = (X509 *) 0 ; + X509 *arg1 = (X509 *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + EVP_MD *arg3 = (EVP_MD *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_store_add_cert", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_sign",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_add_cert" "', argument " "1"" of type '" "X509_STORE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_sign" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (X509_STORE *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_store_add_cert" "', argument " "2"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_sign" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "x509_sign" "', argument " "3"" of type '" "EVP_MD *""'"); + } + arg3 = (EVP_MD *)(argp3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - arg2 = (X509 *)(argp2); { if (!arg2) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)X509_STORE_add_cert(arg1,arg2); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)x509_sign(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26103,72 +25244,109 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_store_set_verify_cb__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_x509_gmtime_adj(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE *arg1 = (X509_STORE *) 0 ; - int (*arg2)(int,X509_STORE_CTX *) = (int (*)(int,X509_STORE_CTX *)) 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + ASN1_TIME *result = 0 ; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_gmtime_adj",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_set_verify_cb" "', argument " "1"" of type '" "X509_STORE *""'"); - } - arg1 = (X509_STORE *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_int_p_X509_STORE_CTX__int); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "x509_store_set_verify_cb" "', argument " "2"" of type '" "int (*)(int,X509_STORE_CTX *)""'"); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_gmtime_adj" "', argument " "1"" of type '" "ASN1_TIME *""'"); } - X509_STORE_set_verify_cb(arg1,arg2); - resultobj = SWIG_Py_Void(); + arg1 = (ASN1_TIME *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_gmtime_adj" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); + result = (ASN1_TIME *)x509_gmtime_adj(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_ctx_get_current_cert(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_by_nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509 *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_by_nid",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_current_cert" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); + } + arg1 = (X509_NAME *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_by_nid" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)x509_name_by_nid(arg1,arg2); + { + resultobj=result; } - arg1 = (X509_STORE_CTX *)(argp1); - result = (X509 *)X509_STORE_CTX_get_current_cert(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_ctx_get_error(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_set_by_nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + int arg2 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_set_by_nid",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_error" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_set_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509_STORE_CTX *)(argp1); - result = (int)X509_STORE_CTX_get_error(arg1); + arg1 = (X509_NAME *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_set_by_nid" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + arg3=obj2; + } + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)x509_name_set_by_nid(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26179,93 +25357,185 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_store_ctx_get_error_depth(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_add_entry_by_txt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + int arg6 ; + int arg7 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + int val7 ; + int ecode7 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_add_entry_by_txt",7,7,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_error_depth" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry_by_txt" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (X509_STORE_CTX *)(argp1); - result = (int)X509_STORE_CTX_get_error_depth(arg1); + arg1 = (X509_NAME *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_add_entry_by_txt" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry_by_txt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_add_entry_by_txt" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_add_entry_by_txt" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + ecode6 = SWIG_AsVal_int(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "x509_name_add_entry_by_txt" "', argument " "6"" of type '" "int""'"); + } + arg6 = (int)(val6); + ecode7 = SWIG_AsVal_int(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "x509_name_add_entry_by_txt" "', argument " "7"" of type '" "int""'"); + } + arg7 = (int)(val7); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)x509_name_add_entry_by_txt(arg1,arg2,arg3,arg4,arg5,arg6,arg7); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_ctx_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_get_der(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_get_der",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_free" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_get_der" "', argument " "1"" of type '" "X509_NAME *""'"); + } + arg1 = (X509_NAME *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)x509_name_get_der(arg1); + { + resultobj=result; } - arg1 = (X509_STORE_CTX *)(argp1); - X509_STORE_CTX_free(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_ctx_get1_chain(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - struct stack_st_X509 *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get1_chain" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_free" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); } - arg1 = (X509_STORE_CTX *)(argp1); - result = (struct stack_st_X509 *)X509_STORE_CTX_get1_chain(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509, 0 | 0 ); + arg1 = (struct stack_st_X509 *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + sk_x509_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_extension_get_critical(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_push(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; + struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_push",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_get_critical" "', argument " "1"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_push" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); } - arg1 = (X509_EXTENSION *)(argp1); - result = (int)X509_EXTENSION_get_critical(arg1); + arg1 = (struct stack_st_X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_x509_push" "', argument " "2"" of type '" "X509 *""'"); + } + arg2 = (X509 *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)sk_x509_push(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26276,106 +25546,93 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_extension_set_critical(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_pop(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; - int arg2 ; + struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + X509 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_extension_set_critical", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_pop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_set_critical" "', argument " "1"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_pop" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); } - arg1 = (X509_EXTENSION *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_extension_set_critical" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (int)X509_EXTENSION_set_critical(arg1,arg2); + arg1 = (struct stack_st_X509 *)(argp1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (X509 *)sk_x509_pop(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_set_flags(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_load_locations(PyObject *self, PyObject *args) { PyObject *resultobj = 0; X509_STORE *arg1 = (X509_STORE *) 0 ; - unsigned long arg2 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_store_set_flags", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_load_locations",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_set_flags" "', argument " "1"" of type '" "X509_STORE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_load_locations" "', argument " "1"" of type '" "X509_STORE *""'"); } arg1 = (X509_STORE *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_store_set_flags" "', argument " "2"" of type '" "unsigned long""'"); - } - arg2 = (unsigned long)(val2); - result = (int)X509_STORE_set_flags(arg1,arg2); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_store_load_locations" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + result = (int)x509_store_load_locations(arg1,(char const *)arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_x509_read_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + X509 *arg1 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509 *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_read_pem" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_type_check" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (X509 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)x509_type_check(arg1); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (X509 *)x509_read_pem(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509, 0); - else { - m2_PyErr_Msg(_x509_err); - resultobj = NULL; - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -26383,195 +25640,122 @@ fail: } -SWIGINTERN PyObject *_wrap_d2i_x509(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509 *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "d2i_x509" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_type_check" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (X509_NAME *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)x509_name_type_check(arg1); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (X509 *)d2i_x509(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509, 0); - else { - m2_PyErr_Msg(_x509_err); - resultobj = NULL; - } - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var__x509_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_x509_err""' of type '""PyObject *""'"); - } - _x509_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__x509_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_x509_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_x509_init(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - x509_init(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_d2i_x509_req(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_get_subject_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_REQ *result = 0 ; + PyObject * obj0 = 0 ; + X509_NAME *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_get_subject_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "d2i_x509_req" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_get_subject_name" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (X509_REQ *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (X509_REQ *)d2i_x509_req(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_REQ, 0); - else { - m2_PyErr_Msg(_x509_err); - resultobj = NULL; - } - } + result = (X509_NAME *)x509_req_get_subject_name(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_req_read_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_get_version(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_REQ *result = 0 ; + PyObject * obj0 = 0 ; + long result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_get_version",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_read_pem" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_get_version" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (X509_REQ *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (X509_REQ *)x509_req_read_pem(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_REQ, 0); - else { - m2_PyErr_Msg(_x509_err); - resultobj = NULL; - } - } + result = (long)x509_req_get_version(arg1); + resultobj = SWIG_From_long((long)(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_i2d_x509(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_set_version(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_set_version",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_x509" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_set_version" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (X509 *)(argp1); + arg1 = (X509_REQ *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_req_set_version" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)i2d_x509(arg1); + result = (int)x509_req_set_version(arg1,arg2); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -26579,43 +25763,35 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_write_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_req_add_extensions(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - X509_REQ *arg2 = (X509_REQ *) 0 ; + X509_REQ *arg1 = (X509_REQ *) 0 ; + struct stack_st_X509_EXTENSION *arg2 = (struct stack_st_X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_req_write_pem", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_req_add_extensions",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_write_pem" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_add_extensions" "', argument " "1"" of type '" "X509_REQ *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_REQ, 0 | 0 ); + arg1 = (X509_REQ *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_write_pem" "', argument " "2"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_add_extensions" "', argument " "2"" of type '" "struct stack_st_X509_EXTENSION *""'"); } - arg2 = (X509_REQ *)(argp2); + arg2 = (struct stack_st_X509_EXTENSION *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)x509_req_write_pem(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)x509_req_add_extensions(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26626,38 +25802,81 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_crl_read_pem(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_entry_create_by_txt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + X509_NAME_ENTRY **arg1 = (X509_NAME_ENTRY **) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_CRL *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + X509_NAME_ENTRY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_entry_create_by_txt",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_X509_NAME_ENTRY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_crl_read_pem" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_create_by_txt" "', argument " "1"" of type '" "X509_NAME_ENTRY **""'"); } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg1 = (X509_NAME_ENTRY **)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_entry_create_by_txt" "', argument " "2"" of type '" "char *""'"); } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (X509_CRL *)x509_crl_read_pem(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_entry_create_by_txt" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_entry_create_by_txt" "', argument " "4"" of type '" "char *""'"); } + arg4 = (char *)(buf4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_entry_create_by_txt" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + result = (X509_NAME_ENTRY *)x509_name_entry_create_by_txt(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_x509v3_set_nconf(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + X509V3_CTX *result = 0 ; + + result = (X509V3_CTX *)x509v3_set_nconf(); { PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_CRL, 0); + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509V3_CTX, 0); else { - m2_PyErr_Msg(_x509_err); resultobj = NULL; } } @@ -26667,103 +25886,106 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_set_version(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509v3_ext_conf(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; + void *arg1 = (void *) 0 ; + X509V3_CTX *arg2 = (X509V3_CTX *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + int res1 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + X509_EXTENSION *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_set_version", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509v3_ext_conf",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_version" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509v3_ext_conf" "', argument " "1"" of type '" "void *""'"); } - arg1 = (X509 *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_set_version" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509V3_CTX, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509v3_ext_conf" "', argument " "2"" of type '" "X509V3_CTX *""'"); } - result = (int)x509_set_version(arg1,arg2); + arg2 = (X509V3_CTX *)(argp2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "x509v3_ext_conf" "', argument " "3"" of type '" "char *""'"); + } + arg3 = (char *)(buf3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509v3_ext_conf" "', argument " "4"" of type '" "char *""'"); + } + arg4 = (char *)(buf4); + result = (X509_EXTENSION *)x509v3_ext_conf(arg1,arg2,arg3,arg4); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_EXTENSION, 0); + else { + m2_PyErr_Msg(_x509_err); + resultobj = NULL; + } } + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_x509_get_version(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_extension_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - long result; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_extension_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_version" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_free" "', argument " "1"" of type '" "X509_EXTENSION *""'"); } - result = (long)x509_get_version(arg1); - resultobj = SWIG_From_long((long)(result)); + arg1 = (X509_EXTENSION *)(argp1); + x509_extension_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_set_not_before(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_extension_get_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - ASN1_TIME *arg2 = (ASN1_TIME *) 0 ; + X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_set_not_before", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_extension_get_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_not_before" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_not_before" "', argument " "2"" of type '" "ASN1_TIME *""'"); - } - arg2 = (ASN1_TIME *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_get_name" "', argument " "1"" of type '" "X509_EXTENSION *""'"); } - result = (int)x509_set_not_before(arg1,arg2); + arg1 = (X509_EXTENSION *)(argp1); + result = (PyObject *)x509_extension_get_name(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -26771,62 +25993,63 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_not_before(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_extension_new_null(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + struct stack_st_X509_EXTENSION *result = 0 ; + + result = (struct stack_st_X509_EXTENSION *)sk_x509_extension_new_null(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_sk_x509_extension_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - ASN1_TIME *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_extension_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_not_before" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_free" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); } - result = (ASN1_TIME *)x509_get_not_before(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + arg1 = (struct stack_st_X509_EXTENSION *)(argp1); + sk_x509_extension_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_set_not_after(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_extension_push(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - ASN1_TIME *arg2 = (ASN1_TIME *) 0 ; + struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; + X509_EXTENSION *arg2 = (X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_set_not_after", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_extension_push",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_set_not_after" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_push" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + arg1 = (struct stack_st_X509_EXTENSION *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_set_not_after" "', argument " "2"" of type '" "ASN1_TIME *""'"); - } - arg2 = (ASN1_TIME *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_x509_extension_push" "', argument " "2"" of type '" "X509_EXTENSION *""'"); } - result = (int)x509_set_not_after(arg1,arg2); + arg2 = (X509_EXTENSION *)(argp2); + result = (int)sk_x509_extension_push(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26837,80 +26060,43 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_get_not_after(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_extension_pop(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - ASN1_TIME *result = 0 ; + PyObject * obj0 = 0 ; + X509_EXTENSION *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_extension_pop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_get_not_after" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_pop" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); } - result = (ASN1_TIME *)x509_get_not_after(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + arg1 = (struct stack_st_X509_EXTENSION *)(argp1); + result = (X509_EXTENSION *)sk_x509_extension_pop(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_sign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_extension_num(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; - EVP_MD *arg3 = (EVP_MD *) 0 ; + struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_sign", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_extension_num",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_sign" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_sign" "', argument " "2"" of type '" "EVP_PKEY *""'"); - } - arg2 = (EVP_PKEY *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "x509_sign" "', argument " "3"" of type '" "EVP_MD *""'"); - } - arg3 = (EVP_MD *)(argp3); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_num" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); } - result = (int)x509_sign(arg1,arg2,arg3); + arg1 = (struct stack_st_X509_EXTENSION *)(argp1); + result = (int)sk_x509_extension_num(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -26921,222 +26107,190 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_gmtime_adj(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_extension_value(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; - long arg2 ; + struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; - ASN1_TIME *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + X509_EXTENSION *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_gmtime_adj", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"sk_x509_extension_value",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_gmtime_adj" "', argument " "1"" of type '" "ASN1_TIME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_value" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); } - arg1 = (ASN1_TIME *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); + arg1 = (struct stack_st_X509_EXTENSION *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_gmtime_adj" "', argument " "2"" of type '" "long""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_x509_extension_value" "', argument " "2"" of type '" "int""'"); } - arg2 = (long)(val2); - result = (ASN1_TIME *)x509_gmtime_adj(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + arg2 = (int)(val2); + result = (X509_EXTENSION *)sk_x509_extension_value(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_by_nid(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_ctx_get_app_data(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - int arg2 ; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + void *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_by_nid", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_get_app_data",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); - } - arg1 = (X509_NAME *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_by_nid" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)x509_name_by_nid(arg1,arg2); - { - resultobj=result; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_app_data" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); } + arg1 = (X509_STORE_CTX *)(argp1); + result = (void *)x509_store_ctx_get_app_data(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_set_by_nid(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_ctx_get_ex_data(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; + X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; int arg2 ; - PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - PyObject *swig_obj[3] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + void *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_set_by_nid", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_ctx_get_ex_data",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_set_by_nid" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_ex_data" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); } - arg1 = (X509_NAME *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + arg1 = (X509_STORE_CTX *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_name_set_by_nid" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_store_ctx_get_ex_data" "', argument " "2"" of type '" "int""'"); } arg2 = (int)(val2); - { - arg3=swig_obj[2]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)x509_name_set_by_nid(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + result = (void *)x509_store_ctx_get_ex_data(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_add_entry_by_txt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_store_set_verify_cb__SWIG_1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; - int arg6 ; - int arg7 ; + X509_STORE *arg1 = (X509_STORE *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - int alloc4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject *swig_obj[7] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_name_add_entry_by_txt", 7, 7, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_store_set_verify_cb",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_add_entry_by_txt" "', argument " "1"" of type '" "X509_NAME *""'"); - } - arg1 = (X509_NAME *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_add_entry_by_txt" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_add_entry_by_txt" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_add_entry_by_txt" "', argument " "4"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_set_verify_cb" "', argument " "1"" of type '" "X509_STORE *""'"); } - arg4 = (char *)(buf4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_add_entry_by_txt" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "x509_name_add_entry_by_txt" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); - ecode7 = SWIG_AsVal_int(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "x509_name_add_entry_by_txt" "', argument " "7"" of type '" "int""'"); - } - arg7 = (int)(val7); + arg1 = (X509_STORE *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; } + arg2=obj1; } - result = (int)x509_name_add_entry_by_txt(arg1,arg2,arg3,arg4,arg5,arg6,arg7); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + x509_store_set_verify_cb(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_get_der(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; +SWIGINTERN PyObject *_wrap_x509_store_set_verify_cb(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_get_der" "', argument " "1"" of type '" "X509_NAME *""'"); + if (!PyTuple_Check(args)) SWIG_fail; + argc = args ? (int)PyObject_Length(args) : 0; + for (ii = 0; (ii < 2) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); } - arg1 = (X509_NAME *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_X509_STORE, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *ptr = 0; + int res = SWIG_ConvertFunctionPtr(argv[1], &ptr, SWIGTYPE_p_f_int_p_X509_STORE_CTX__int); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_x509_store_set_verify_cb__SWIG_0(self, args); + } } } - result = (PyObject *)x509_name_get_der(arg1); + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_X509_STORE, 0); + _v = SWIG_CheckState(res); + if (_v) { + _v = (argv[1] != 0); + if (_v) { + return _wrap_x509_store_set_verify_cb__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'x509_store_set_verify_cb'.\n" + " Possible C/C++ prototypes are:\n" + " X509_STORE_set_verify_cb(X509_STORE *,int (*)(int,X509_STORE_CTX *))\n" + " x509_store_set_verify_cb(X509_STORE *,PyObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_make_stack_from_der_sequence(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + struct stack_st_X509 *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"make_stack_from_der_sequence",1,1,&obj0)) SWIG_fail; { - resultobj=result; + arg1=obj0; + } + result = (struct stack_st_X509 *)make_stack_from_der_sequence(arg1); + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_stack_st_X509, 0); + else { + resultobj = NULL; + } } return resultobj; fail: @@ -27144,69 +26298,48 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_x509_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_sk_x509_new_null(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + struct stack_st_X509 *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_free" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); - } - arg1 = (struct stack_st_X509 *)(argp1); + result = (struct stack_st_X509 *)sk_x509_new_null(); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_stack_st_X509, 0); + else { + resultobj = NULL; } } - sk_x509_free(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_x509_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_get_der_encoding_stack(PyObject *self, PyObject *args) { PyObject *resultobj = 0; struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; - X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_x509_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"get_der_encoding_stack",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_push" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_der_encoding_stack" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); } arg1 = (struct stack_st_X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_x509_push" "', argument " "2"" of type '" "X509 *""'"); - } - arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)get_der_encoding_stack(arg1); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)sk_x509_push(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -27214,122 +26347,168 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_x509_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_x509_name_oneline(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; + X509_NAME *arg1 = (X509_NAME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509 *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"x509_name_oneline",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_pop" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_oneline" "', argument " "1"" of type '" "X509_NAME *""'"); } - arg1 = (struct stack_st_X509 *)(argp1); + arg1 = (X509_NAME *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (X509 *)sk_x509_pop(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + result = (char *)x509_name_oneline(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + { + if (result != NULL) + OPENSSL_free(result); + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_load_locations(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_object_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE *arg1 = (X509_STORE *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + ASN1_OBJECT *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_store_load_locations", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_load_locations" "', argument " "1"" of type '" "X509_STORE *""'"); - } - arg1 = (X509_STORE *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_store_load_locations" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (int)x509_store_load_locations(arg1,(char const *)arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + result = (ASN1_OBJECT *)ASN1_OBJECT_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_x509_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_object_create(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; + int arg1 ; + unsigned char *arg2 = (unsigned char *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + char *arg5 = (char *) 0 ; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int res5 ; + char *buf5 = 0 ; + int alloc5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + ASN1_OBJECT *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"asn1_object_create",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "asn1_object_create" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_object_create" "', argument " "2"" of type '" "unsigned char *""'"); + } + arg2 = (unsigned char *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "asn1_object_create" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "asn1_object_create" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = (char *)(buf4); + res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "asn1_object_create" "', argument " "5"" of type '" "char const *""'"); + } + arg5 = (char *)(buf5); + result = (ASN1_OBJECT *)ASN1_OBJECT_create(arg1,arg2,arg3,(char const *)arg4,(char const *)arg5); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_asn1_object_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_object_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_type_check" "', argument " "1"" of type '" "X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_object_free" "', argument " "1"" of type '" "ASN1_OBJECT *""'"); } - arg1 = (X509 *)(argp1); + arg1 = (ASN1_OBJECT *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)x509_type_check(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + ASN1_OBJECT_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_i2d_asn1_object(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; + ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; + unsigned char **arg2 = (unsigned char **) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"i2d_asn1_object",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_type_check" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_asn1_object" "', argument " "1"" of type '" "ASN1_OBJECT *""'"); } - arg1 = (X509_NAME *)(argp1); + arg1 = (ASN1_OBJECT *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_asn1_object" "', argument " "2"" of type '" "unsigned char **""'"); + } + arg2 = (unsigned char **)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)x509_name_type_check(arg1); + result = (int)i2d_ASN1_OBJECT(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -27340,90 +26519,137 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_get_subject_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_d2i_asn1_object(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; + ASN1_OBJECT **arg1 = (ASN1_OBJECT **) 0 ; + unsigned char **arg2 = (unsigned char **) 0 ; + long arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_NAME *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + long val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + ASN1_OBJECT *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"d2i_asn1_object",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_get_subject_name" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "d2i_asn1_object" "', argument " "1"" of type '" "ASN1_OBJECT **""'"); } - arg1 = (X509_REQ *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg1 = (ASN1_OBJECT **)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "d2i_asn1_object" "', argument " "2"" of type '" "unsigned char const **""'"); } - result = (X509_NAME *)x509_req_get_subject_name(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME, 0 | 0 ); + arg2 = (unsigned char **)(argp2); + ecode3 = SWIG_AsVal_long(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "d2i_asn1_object" "', argument " "3"" of type '" "long""'"); + } + arg3 = (long)(val3); + result = (ASN1_OBJECT *)d2i_ASN1_OBJECT(arg1,(unsigned char const **)arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_req_get_version(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_bit_string_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; + ASN1_BIT_STRING *result = 0 ; + + result = (ASN1_BIT_STRING *)ASN1_BIT_STRING_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_BIT_STRING, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_asn1_string_new(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ASN1_STRING *result = 0 ; + + result = (ASN1_STRING *)ASN1_STRING_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_STRING, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_asn1_string_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ASN1_STRING *arg1 = (ASN1_STRING *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - long result; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_string_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_get_version" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_free" "', argument " "1"" of type '" "ASN1_STRING *""'"); } - arg1 = (X509_REQ *)(argp1); + arg1 = (ASN1_STRING *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (long)x509_req_get_version(arg1); - resultobj = SWIG_From_long((long)(result)); + ASN1_STRING_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_req_set_version(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_string_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; - long arg2 ; + ASN1_STRING *arg1 = (ASN1_STRING *) 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_req_set_version", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_string_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_set_version" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_set" "', argument " "1"" of type '" "ASN1_STRING *""'"); + } + arg1 = (ASN1_STRING *)(argp1); + { + if (PyBytes_Check(obj1)) { + Py_ssize_t len; + + arg2 = PyBytes_AsString(obj1); + len = PyBytes_Size(obj1); + + if (len > INT_MAX) { + PyErr_SetString(PyExc_ValueError, "object too large"); + return NULL; + } + arg3 = len; + } + else { + PyErr_SetString(PyExc_TypeError, "expected string"); + return NULL; + } } - arg1 = (X509_REQ *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_req_set_version" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)x509_req_set_version(arg1,arg2); + result = (int)ASN1_STRING_set(arg1,(void const *)arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -27434,34 +26660,44 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_req_add_extensions(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_string_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_REQ *arg1 = (X509_REQ *) 0 ; - struct stack_st_X509_EXTENSION *arg2 = (struct stack_st_X509_EXTENSION *) 0 ; + BIO *arg1 = (BIO *) 0 ; + ASN1_STRING *arg2 = (ASN1_STRING *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "x509_req_add_extensions", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_REQ, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_string_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_req_add_extensions" "', argument " "1"" of type '" "X509_REQ *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_print" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_REQ *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_req_add_extensions" "', argument " "2"" of type '" "struct stack_st_X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_string_print" "', argument " "2"" of type '" "ASN1_STRING *""'"); } - arg2 = (struct stack_st_X509_EXTENSION *)(argp2); + arg2 = (ASN1_STRING *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)x509_req_add_extensions(arg1,arg2); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)ASN1_STRING_print(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -27472,251 +26708,247 @@ fail: } -SWIGINTERN PyObject *_wrap_x509_name_entry_create_by_txt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_string_print_ex(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME_ENTRY **arg1 = (X509_NAME_ENTRY **) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - char *arg4 = (char *) 0 ; - int arg5 ; + BIO *arg1 = (BIO *) 0 ; + ASN1_STRING *arg2 = (ASN1_STRING *) 0 ; + unsigned long arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned long val3 ; int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - int alloc4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; - X509_NAME_ENTRY *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "x509_name_entry_create_by_txt", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_p_X509_NAME_ENTRY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_string_print_ex",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_entry_create_by_txt" "', argument " "1"" of type '" "X509_NAME_ENTRY **""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_print_ex" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (X509_NAME_ENTRY **)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509_name_entry_create_by_txt" "', argument " "2"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_string_print_ex" "', argument " "2"" of type '" "ASN1_STRING *""'"); } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + arg2 = (ASN1_STRING *)(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_long(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "x509_name_entry_create_by_txt" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "asn1_string_print_ex" "', argument " "3"" of type '" "unsigned long""'"); } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509_name_entry_create_by_txt" "', argument " "4"" of type '" "char *""'"); + arg3 = (unsigned long)(val3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)ASN1_STRING_print_ex(arg1,arg2,arg3); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg4 = (char *)(buf4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "x509_name_entry_create_by_txt" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); - result = (X509_NAME_ENTRY *)x509_name_entry_create_by_txt(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_NAME_ENTRY, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_x509v3_set_nconf(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509V3_CTX *result = 0 ; + ASN1_TIME *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509v3_set_nconf", 0, 0, 0)) SWIG_fail; - result = (X509V3_CTX *)x509v3_set_nconf(); - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509V3_CTX, 0); - else { - resultobj = NULL; - } - } + result = (ASN1_TIME *)ASN1_TIME_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509v3_ext_conf(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - void *arg1 = (void *) 0 ; - X509V3_CTX *arg2 = (X509V3_CTX *) 0 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - int res4 ; - char *buf4 = 0 ; - int alloc4 = 0 ; - PyObject *swig_obj[4] ; - X509_EXTENSION *result = 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509v3_ext_conf", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0],SWIG_as_voidptrptr(&arg1), 0, 0); + if(!PyArg_UnpackTuple(args,(char *)"asn1_time_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509v3_ext_conf" "', argument " "1"" of type '" "void *""'"); - } - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509V3_CTX, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "x509v3_ext_conf" "', argument " "2"" of type '" "X509V3_CTX *""'"); - } - arg2 = (X509V3_CTX *)(argp2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "x509v3_ext_conf" "', argument " "3"" of type '" "char *""'"); - } - arg3 = (char *)(buf3); - res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "x509v3_ext_conf" "', argument " "4"" of type '" "char *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_free" "', argument " "1"" of type '" "ASN1_TIME *""'"); } - arg4 = (char *)(buf4); - result = (X509_EXTENSION *)x509v3_ext_conf(arg1,arg2,arg3,arg4); + arg1 = (ASN1_TIME *)(argp1); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_X509_EXTENSION, 0); - else { - m2_PyErr_Msg(_x509_err); - resultobj = NULL; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + ASN1_TIME_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return NULL; } -SWIGINTERN PyObject *_wrap_x509_extension_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_time_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_free" "', argument " "1"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_check" "', argument " "1"" of type '" "ASN1_TIME *""'"); + } + arg1 = (ASN1_TIME *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)ASN1_TIME_check(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (X509_EXTENSION *)(argp1); - x509_extension_free(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_extension_get_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_EXTENSION *arg1 = (X509_EXTENSION *) 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + ASN1_TIME *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_time_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_extension_get_name" "', argument " "1"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_set" "', argument " "1"" of type '" "ASN1_TIME *""'"); } - arg1 = (X509_EXTENSION *)(argp1); - result = (PyObject *)x509_extension_get_name(arg1); + arg1 = (ASN1_TIME *)(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "asn1_time_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = (long)(val2); { - resultobj=result; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (ASN1_TIME *)ASN1_TIME_set(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_x509_extension_new_null(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - struct stack_st_X509_EXTENSION *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "sk_x509_extension_new_null", 0, 0, 0)) SWIG_fail; - result = (struct stack_st_X509_EXTENSION *)sk_x509_extension_new_null(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_sk_x509_extension_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_set_string(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_time_set_string",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_free" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_set_string" "', argument " "1"" of type '" "ASN1_TIME *""'"); } - arg1 = (struct stack_st_X509_EXTENSION *)(argp1); - sk_x509_extension_free(arg1); - resultobj = SWIG_Py_Void(); + arg1 = (ASN1_TIME *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_time_set_string" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)ASN1_TIME_set_string(arg1,(char const *)arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_sk_x509_extension_push(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_print(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; - X509_EXTENSION *arg2 = (X509_EXTENSION *) 0 ; + BIO *arg1 = (BIO *) 0 ; + ASN1_TIME *arg2 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "sk_x509_extension_push", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_time_print",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_push" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_print" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (struct stack_st_X509_EXTENSION *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sk_x509_extension_push" "', argument " "2"" of type '" "X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_time_print" "', argument " "2"" of type '" "ASN1_TIME *""'"); + } + arg2 = (ASN1_TIME *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)ASN1_TIME_print(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; } - arg2 = (X509_EXTENSION *)(argp2); - result = (int)sk_x509_extension_push(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -27727,235 +26959,175 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_x509_extension_pop(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_integer_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - X509_EXTENSION *result = 0 ; + ASN1_INTEGER *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_pop" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); - } - arg1 = (struct stack_st_X509_EXTENSION *)(argp1); - result = (X509_EXTENSION *)sk_x509_extension_pop(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); + result = (ASN1_INTEGER *)ASN1_INTEGER_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_x509_extension_num(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_integer_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; + ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_integer_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_num" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_free" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); } - arg1 = (struct stack_st_X509_EXTENSION *)(argp1); - result = (int)sk_x509_extension_num(arg1); + arg1 = (ASN1_INTEGER *)(argp1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + ASN1_INTEGER_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_sk_x509_extension_value(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_integer_cmp(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509_EXTENSION *arg1 = (struct stack_st_X509_EXTENSION *) 0 ; - int arg2 ; + ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; + ASN1_INTEGER *arg2 = (ASN1_INTEGER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - X509_EXTENSION *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "sk_x509_extension_value", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509_EXTENSION, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_integer_cmp",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sk_x509_extension_value" "', argument " "1"" of type '" "struct stack_st_X509_EXTENSION *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_cmp" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); + } + arg1 = (ASN1_INTEGER *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_integer_cmp" "', argument " "2"" of type '" "ASN1_INTEGER *""'"); + } + arg2 = (ASN1_INTEGER *)(argp2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)ASN1_INTEGER_cmp(arg1,arg2); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (struct stack_st_X509_EXTENSION *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sk_x509_extension_value" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (X509_EXTENSION *)sk_x509_extension_value(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509_EXTENSION, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_ctx_get_app_data(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_time_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; + ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_time_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_app_data" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_type_check" "', argument " "1"" of type '" "ASN1_TIME *""'"); + } + arg1 = (ASN1_TIME *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)asn1_time_type_check(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - arg1 = (X509_STORE_CTX *)(argp1); - result = (void *)x509_store_ctx_get_app_data(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_ctx_get_ex_data(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_asn1_integer_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE_CTX *arg1 = (X509_STORE_CTX *) 0 ; - int arg2 ; + ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - void *result = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "x509_store_ctx_get_ex_data", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE_CTX, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_integer_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_ctx_get_ex_data" "', argument " "1"" of type '" "X509_STORE_CTX *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_get" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); + } + arg1 = (ASN1_INTEGER *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)asn1_integer_get(arg1); + { + resultobj=result; } - arg1 = (X509_STORE_CTX *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "x509_store_ctx_get_ex_data" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - result = (void *)x509_store_ctx_get_ex_data(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_store_set_verify_cb__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_asn1_integer_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_STORE *arg1 = (X509_STORE *) 0 ; + ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"asn1_integer_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_store_set_verify_cb" "', argument " "1"" of type '" "X509_STORE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_set" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); } - arg1 = (X509_STORE *)(argp1); + arg1 = (ASN1_INTEGER *)(argp1); { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + arg2=obj1; } { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - x509_store_set_verify_cb(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_x509_store_set_verify_cb(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "x509_store_set_verify_cb", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_X509_STORE, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *ptr = 0; - int res = SWIG_ConvertFunctionPtr(argv[1], &ptr, SWIGTYPE_p_f_int_p_X509_STORE_CTX__int); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_x509_store_set_verify_cb__SWIG_0(self, argc, argv); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_X509_STORE, 0); - _v = SWIG_CheckState(res); - if (_v) { - _v = (argv[1] != 0); - if (_v) { - return _wrap_x509_store_set_verify_cb__SWIG_1(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'x509_store_set_verify_cb'.\n" - " Possible C/C++ prototypes are:\n" - " X509_STORE_set_verify_cb(X509_STORE *,int (*)(int,X509_STORE_CTX *))\n" - " x509_store_set_verify_cb(X509_STORE *,PyObject *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_make_stack_from_der_sequence(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - struct stack_st_X509 *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - result = (struct stack_st_X509 *)make_stack_from_der_sequence(arg1); + result = (int)asn1_integer_set(arg1,arg2); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_stack_st_X509, 0); - else { - resultobj = NULL; - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -27963,361 +27135,227 @@ fail: } -SWIGINTERN PyObject *_wrap_sk_x509_new_null(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509 *result = 0 ; + PKCS7 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "sk_x509_new_null", 0, 0, 0)) SWIG_fail; - result = (struct stack_st_X509 *)sk_x509_new_null(); - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_stack_st_X509, 0); - else { - resultobj = NULL; - } - } + result = (PKCS7 *)PKCS7_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PKCS7, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_get_der_encoding_stack(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; + PKCS7 *arg1 = (PKCS7 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_der_encoding_stack" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_free" "', argument " "1"" of type '" "PKCS7 *""'"); } - arg1 = (struct stack_st_X509 *)(argp1); + arg1 = (PKCS7 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)get_der_encoding_stack(arg1); - { - resultobj=result; - } + PKCS7_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_x509_name_oneline(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_add_certificate(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509_NAME *arg1 = (X509_NAME *) 0 ; + PKCS7 *arg1 = (PKCS7 *) 0 ; + X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509_NAME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_add_certificate",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "x509_name_oneline" "', argument " "1"" of type '" "X509_NAME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_add_certificate" "', argument " "1"" of type '" "PKCS7 *""'"); } - arg1 = (X509_NAME *)(argp1); + arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_add_certificate" "', argument " "2"" of type '" "X509 *""'"); + } + arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)x509_name_oneline(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); { - if (result != NULL) - OPENSSL_free(result); + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + PKCS7_add_certificate(arg1,arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_asn1_object_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_OBJECT *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "asn1_object_new", 0, 0, 0)) SWIG_fail; - result = (ASN1_OBJECT *)ASN1_OBJECT_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - return resultobj; +SWIGINTERN int Swig_var__pkcs7_err_set(PyObject *_val) { + { + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_pkcs7_err""' of type '""PyObject *""'"); + } + _pkcs7_err = (PyObject *)(argp); + } + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_asn1_object_create(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - unsigned char *arg2 = (unsigned char *) 0 ; - int arg3 ; - char *arg4 = (char *) 0 ; - char *arg5 = (char *) 0 ; - int val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - int alloc4 = 0 ; - int res5 ; - char *buf5 = 0 ; - int alloc5 = 0 ; - PyObject *swig_obj[5] ; - ASN1_OBJECT *result = 0 ; +SWIGINTERN PyObject *Swig_var__pkcs7_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; - if (!SWIG_Python_UnpackTuple(args, "asn1_object_create", 5, 5, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "asn1_object_create" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_object_create" "', argument " "2"" of type '" "unsigned char *""'"); - } - arg2 = (unsigned char *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "asn1_object_create" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "asn1_object_create" "', argument " "4"" of type '" "char const *""'"); - } - arg4 = (char *)(buf4); - res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "asn1_object_create" "', argument " "5"" of type '" "char const *""'"); - } - arg5 = (char *)(buf5); - result = (ASN1_OBJECT *)ASN1_OBJECT_create(arg1,arg2,arg3,(char const *)arg4,(char const *)arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); - return resultobj; -fail: - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - if (alloc5 == SWIG_NEWOBJ) free((char*)buf5); - return NULL; + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_pkcs7_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; } -SWIGINTERN PyObject *_wrap_asn1_object_free(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_object_free" "', argument " "1"" of type '" "ASN1_OBJECT *""'"); - } - arg1 = (ASN1_OBJECT *)(argp1); +SWIGINTERN int Swig_var__smime_err_set(PyObject *_val) { { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_smime_err""' of type '""PyObject *""'"); } + _smime_err = (PyObject *)(argp); } - ASN1_OBJECT_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_i2d_asn1_object(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; - unsigned char **arg2 = (unsigned char **) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; +SWIGINTERN PyObject *Swig_var__smime_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; - if (!SWIG_Python_UnpackTuple(args, "i2d_asn1_object", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "i2d_asn1_object" "', argument " "1"" of type '" "ASN1_OBJECT *""'"); - } - arg1 = (ASN1_OBJECT *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "i2d_asn1_object" "', argument " "2"" of type '" "unsigned char **""'"); - } - arg2 = (unsigned char **)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)i2d_ASN1_OBJECT(arg1,arg2); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; -fail: - return NULL; + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_smime_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; } -SWIGINTERN PyObject *_wrap_d2i_asn1_object(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_OBJECT **arg1 = (ASN1_OBJECT **) 0 ; - unsigned char **arg2 = (unsigned char **) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - long val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - ASN1_OBJECT *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "d2i_asn1_object", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "d2i_asn1_object" "', argument " "1"" of type '" "ASN1_OBJECT **""'"); - } - arg1 = (ASN1_OBJECT **)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_unsigned_char, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "d2i_asn1_object" "', argument " "2"" of type '" "unsigned char const **""'"); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_init",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; } - arg2 = (unsigned char **)(argp2); - ecode3 = SWIG_AsVal_long(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "d2i_asn1_object" "', argument " "3"" of type '" "long""'"); - } - arg3 = (long)(val3); - result = (ASN1_OBJECT *)d2i_ASN1_OBJECT(arg1,(unsigned char const **)arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_asn1_bit_string_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_BIT_STRING *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "asn1_bit_string_new", 0, 0, 0)) SWIG_fail; - result = (ASN1_BIT_STRING *)ASN1_BIT_STRING_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_BIT_STRING, 0 | 0 ); + pkcs7_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_asn1_string_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_smime_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_STRING *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "asn1_string_new", 0, 0, 0)) SWIG_fail; - result = (ASN1_STRING *)ASN1_STRING_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"smime_init",1,1,&obj0)) SWIG_fail; + { + arg1=obj0; + } + smime_init(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_asn1_string_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_decrypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_STRING *arg1 = (ASN1_STRING *) 0 ; + PKCS7 *arg1 = (PKCS7 *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + X509 *arg3 = (X509 *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_decrypt",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_free" "', argument " "1"" of type '" "ASN1_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_decrypt" "', argument " "1"" of type '" "PKCS7 *""'"); } - arg1 = (ASN1_STRING *)(argp1); + arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_decrypt" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_X509, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_decrypt" "', argument " "3"" of type '" "X509 *""'"); + } + arg3 = (X509 *)(argp3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs7_decrypt" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ASN1_STRING_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_asn1_string_set(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_STRING *arg1 = (ASN1_STRING *) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "asn1_string_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_set" "', argument " "1"" of type '" "ASN1_STRING *""'"); - } - arg1 = (ASN1_STRING *)(argp1); { - if (PyBytes_Check(swig_obj[1])) { - Py_ssize_t len; - - arg2 = PyBytes_AsString(swig_obj[1]); - len = PyBytes_Size(swig_obj[1]); - - if (len > INT_MAX) { - PyErr_SetString(PyExc_ValueError, "object too large"); - return NULL; - } - arg3 = len; - } - else { - PyErr_SetString(PyExc_TypeError, "expected string"); - return NULL; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } { - if (!arg1) { + if (!arg3) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ASN1_STRING_set(arg1,(void const *)arg2,arg3); + result = (PyObject *)pkcs7_decrypt(arg1,arg2,arg3,arg4); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -28325,28 +27363,47 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_string_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_encrypt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - ASN1_STRING *arg2 = (ASN1_STRING *) 0 ; + struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; + BIO *arg2 = (BIO *) 0 ; + EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PKCS7 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "asn1_string_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_encrypt",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_encrypt" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); + arg1 = (struct stack_st_X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_string_print" "', argument " "2"" of type '" "ASN1_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_encrypt" "', argument " "2"" of type '" "BIO *""'"); } - arg2 = (ASN1_STRING *)(argp2); + arg2 = (BIO *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_encrypt" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + } + arg3 = (EVP_CIPHER *)(argp3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs7_encrypt" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -28357,14 +27414,25 @@ SWIGINTERN PyObject *_wrap_asn1_string_print(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)ASN1_STRING_print(arg1,arg2); + result = (PKCS7 *)pkcs7_encrypt(arg1,arg2,arg3,arg4); SWIG_PYTHON_THREAD_END_ALLOW; } { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); + else { + m2_PyErr_Msg(_smime_err); + resultobj = NULL; + } } return resultobj; fail: @@ -28372,36 +27440,65 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_string_print_ex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_sign1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - ASN1_STRING *arg2 = (ASN1_STRING *) 0 ; - unsigned long arg3 ; + X509 *arg1 = (X509 *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + struct stack_st_X509 *arg3 = (struct stack_st_X509 *) 0 ; + BIO *arg4 = (BIO *) 0 ; + EVP_MD *arg5 = (EVP_MD *) 0 ; + int arg6 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - unsigned long val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - int result; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + int val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PKCS7 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "asn1_string_print_ex", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_sign1",6,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_string_print_ex" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_sign1" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_STRING, 0 | 0 ); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_string_print_ex" "', argument " "2"" of type '" "ASN1_STRING *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_sign1" "', argument " "2"" of type '" "EVP_PKEY *""'"); } - arg2 = (ASN1_STRING *)(argp2); - ecode3 = SWIG_AsVal_unsigned_SS_long(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "asn1_string_print_ex" "', argument " "3"" of type '" "unsigned long""'"); + arg2 = (EVP_PKEY *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_sign1" "', argument " "3"" of type '" "struct stack_st_X509 *""'"); + } + arg3 = (struct stack_st_X509 *)(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkcs7_sign1" "', argument " "4"" of type '" "BIO *""'"); + } + arg4 = (BIO *)(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pkcs7_sign1" "', argument " "5"" of type '" "EVP_MD *""'"); + } + arg5 = (EVP_MD *)(argp5); + ecode6 = SWIG_AsVal_int(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "pkcs7_sign1" "', argument " "6"" of type '" "int""'"); } - arg3 = (unsigned long)(val3); + arg6 = (int)(val6); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -28412,14 +27509,35 @@ SWIGINTERN PyObject *_wrap_asn1_string_print_ex(PyObject *self, PyObject *args) SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg5) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)ASN1_STRING_print_ex(arg1,arg2,arg3); + result = (PKCS7 *)pkcs7_sign1(arg1,arg2,arg3,arg4,arg5,arg6); SWIG_PYTHON_THREAD_END_ALLOW; } { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); + else { + m2_PyErr_Msg(_smime_err); + resultobj = NULL; + } } return resultobj; fail: @@ -28427,193 +27545,170 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_time_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_TIME *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "asn1_time_new", 0, 0, 0)) SWIG_fail; - result = (ASN1_TIME *)ASN1_TIME_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_asn1_time_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_sign0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + X509 *arg1 = (X509 *) 0 ; + EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; + BIO *arg3 = (BIO *) 0 ; + EVP_MD *arg4 = (EVP_MD *) 0 ; + int arg5 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PKCS7 *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_sign0",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_X509, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_free" "', argument " "1"" of type '" "ASN1_TIME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_sign0" "', argument " "1"" of type '" "X509 *""'"); } - arg1 = (ASN1_TIME *)(argp1); + arg1 = (X509 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_sign0" "', argument " "2"" of type '" "EVP_PKEY *""'"); + } + arg2 = (EVP_PKEY *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_sign0" "', argument " "3"" of type '" "BIO *""'"); + } + arg3 = (BIO *)(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_EVP_MD, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkcs7_sign0" "', argument " "4"" of type '" "EVP_MD *""'"); + } + arg4 = (EVP_MD *)(argp4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "pkcs7_sign0" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ASN1_TIME_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_asn1_time_check(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_check" "', argument " "1"" of type '" "ASN1_TIME *""'"); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - arg1 = (ASN1_TIME *)(argp1); { - if (!arg1) { + if (!arg3) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ASN1_TIME_check(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_asn1_time_set(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - ASN1_TIME *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "asn1_time_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_set" "', argument " "1"" of type '" "ASN1_TIME *""'"); + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (PKCS7 *)pkcs7_sign0(arg1,arg2,arg3,arg4,arg5); + SWIG_PYTHON_THREAD_END_ALLOW; } - arg1 = (ASN1_TIME *)(argp1); - ecode2 = SWIG_AsVal_long(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "asn1_time_set" "', argument " "2"" of type '" "long""'"); - } - arg2 = (long)(val2); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); + else { + m2_PyErr_Msg(_smime_err); + resultobj = NULL; } } - result = (ASN1_TIME *)ASN1_TIME_set(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_TIME, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_asn1_time_set_string(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_read_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; - char *arg2 = (char *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PKCS7 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "asn1_time_set_string", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_read_bio",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_set_string" "', argument " "1"" of type '" "ASN1_TIME *""'"); - } - arg1 = (ASN1_TIME *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_time_set_string" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_read_bio" "', argument " "1"" of type '" "BIO *""'"); } - arg2 = (char *)(buf2); + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ASN1_TIME_set_string(arg1,(char const *)arg2); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (PKCS7 *)pkcs7_read_bio(arg1); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); + else { + m2_PyErr_Msg(_pkcs7_err); + resultobj = NULL; + } } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_asn1_time_print(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_read_bio_der(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; - ASN1_TIME *arg2 = (ASN1_TIME *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PKCS7 *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "asn1_time_print", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_read_bio_der",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_print" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_read_bio_der" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_time_print" "', argument " "2"" of type '" "ASN1_TIME *""'"); - } - arg2 = (ASN1_TIME *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)ASN1_TIME_print(arg1,arg2); + result = (PKCS7 *)pkcs7_read_bio_der(arg1); SWIG_PYTHON_THREAD_END_ALLOW; } { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (result != NULL) + resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); + else { + m2_PyErr_Msg(_pkcs7_err); + resultobj = NULL; + } } return resultobj; fail: @@ -28621,68 +27716,183 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_integer_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_verify1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_INTEGER *result = 0 ; + PKCS7 *arg1 = (PKCS7 *) 0 ; + struct stack_st_X509 *arg2 = (struct stack_st_X509 *) 0 ; + X509_STORE *arg3 = (X509_STORE *) 0 ; + BIO *arg4 = (BIO *) 0 ; + int arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "asn1_integer_new", 0, 0, 0)) SWIG_fail; - result = (ASN1_INTEGER *)ASN1_INTEGER_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_verify1",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_verify1" "', argument " "1"" of type '" "PKCS7 *""'"); + } + arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_verify1" "', argument " "2"" of type '" "struct stack_st_X509 *""'"); + } + arg2 = (struct stack_st_X509 *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_verify1" "', argument " "3"" of type '" "X509_STORE *""'"); + } + arg3 = (X509_STORE *)(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkcs7_verify1" "', argument " "4"" of type '" "BIO *""'"); + } + arg4 = (BIO *)(argp4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "pkcs7_verify1" "', argument " "5"" of type '" "int""'"); + } + arg5 = (int)(val5); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)pkcs7_verify1(arg1,arg2,arg3,arg4,arg5); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_asn1_integer_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_verify0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; + PKCS7 *arg1 = (PKCS7 *) 0 ; + struct stack_st_X509 *arg2 = (struct stack_st_X509 *) 0 ; + X509_STORE *arg3 = (X509_STORE *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_verify0",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_free" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_verify0" "', argument " "1"" of type '" "PKCS7 *""'"); } - arg1 = (ASN1_INTEGER *)(argp1); + arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_verify0" "', argument " "2"" of type '" "struct stack_st_X509 *""'"); + } + arg2 = (struct stack_st_X509 *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_X509_STORE, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_verify0" "', argument " "3"" of type '" "X509_STORE *""'"); + } + arg3 = (X509_STORE *)(argp3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs7_verify0" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - ASN1_INTEGER_free(arg1); - resultobj = SWIG_Py_Void(); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (PyObject *)pkcs7_verify0(arg1,arg2,arg3,arg4); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_asn1_integer_cmp(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_smime_write_pkcs7_multi(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; - ASN1_INTEGER *arg2 = (ASN1_INTEGER *) 0 ; + BIO *arg1 = (BIO *) 0 ; + PKCS7 *arg2 = (PKCS7 *) 0 ; + BIO *arg3 = (BIO *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "asn1_integer_cmp", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"smime_write_pkcs7_multi",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_cmp" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_write_pkcs7_multi" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (ASN1_INTEGER *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "asn1_integer_cmp" "', argument " "2"" of type '" "ASN1_INTEGER *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "smime_write_pkcs7_multi" "', argument " "2"" of type '" "PKCS7 *""'"); } - arg2 = (ASN1_INTEGER *)(argp2); + arg2 = (PKCS7 *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "smime_write_pkcs7_multi" "', argument " "3"" of type '" "BIO *""'"); + } + arg3 = (BIO *)(argp3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "smime_write_pkcs7_multi" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -28693,7 +27903,16 @@ SWIGINTERN PyObject *_wrap_asn1_integer_cmp(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ASN1_INTEGER_cmp(arg1,arg2); + { + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)smime_write_pkcs7_multi(arg1,arg2,arg3,arg4); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -28704,27 +27923,53 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_time_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_smime_write_pkcs7(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_TIME *arg1 = (ASN1_TIME *) 0 ; + BIO *arg1 = (BIO *) 0 ; + PKCS7 *arg2 = (PKCS7 *) 0 ; + int arg3 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_TIME, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"smime_write_pkcs7",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_time_type_check" "', argument " "1"" of type '" "ASN1_TIME *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_write_pkcs7" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (ASN1_TIME *)(argp1); + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_PKCS7, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "smime_write_pkcs7" "', argument " "2"" of type '" "PKCS7 *""'"); + } + arg2 = (PKCS7 *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "smime_write_pkcs7" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)asn1_time_type_check(arg1); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)smime_write_pkcs7(arg1,arg2,arg3); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -28735,27 +27980,26 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_integer_get(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_smime_read_pkcs7(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; + BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"smime_read_pkcs7",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_get" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_read_pkcs7" "', argument " "1"" of type '" "BIO *""'"); } - arg1 = (ASN1_INTEGER *)(argp1); + arg1 = (BIO *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)asn1_integer_get(arg1); + result = (PyObject *)smime_read_pkcs7(arg1); { resultobj=result; } @@ -28765,30 +28009,44 @@ fail: } -SWIGINTERN PyObject *_wrap_asn1_integer_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_write_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ASN1_INTEGER *arg1 = (ASN1_INTEGER *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + PKCS7 *arg1 = (PKCS7 *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "asn1_integer_set", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_INTEGER, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_write_bio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "asn1_integer_set" "', argument " "1"" of type '" "ASN1_INTEGER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_write_bio" "', argument " "1"" of type '" "PKCS7 *""'"); } - arg1 = (ASN1_INTEGER *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_write_bio" "', argument " "2"" of type '" "BIO *""'"); } + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)asn1_integer_set(arg1,arg2); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)pkcs7_write_bio(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -28799,118 +28057,217 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PKCS7 *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "pkcs7_new", 0, 0, 0)) SWIG_fail; - result = (PKCS7 *)PKCS7_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PKCS7, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pkcs7_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_write_bio_der(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PKCS7 *arg1 = (PKCS7 *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_write_bio_der",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_free" "', argument " "1"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_write_bio_der" "', argument " "1"" of type '" "PKCS7 *""'"); } arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_write_bio_der" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - PKCS7_free(arg1); - resultobj = SWIG_Py_Void(); + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)pkcs7_write_bio_der(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkcs7_add_certificate(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_pkcs7_type_nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PKCS7 *arg1 = (PKCS7 *) 0 ; - X509 *arg2 = (X509 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_add_certificate", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_type_nid",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_add_certificate" "', argument " "1"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_type_nid" "', argument " "1"" of type '" "PKCS7 *""'"); } arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_X509, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_add_certificate" "', argument " "2"" of type '" "X509 *""'"); - } - arg2 = (X509 *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)pkcs7_type_nid(arg1); { - if (!arg2) { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_pkcs7_type_sn(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + PKCS7 *arg1 = (PKCS7 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_type_sn",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_type_sn" "', argument " "1"" of type '" "PKCS7 *""'"); + } + arg1 = (PKCS7 *)(argp1); + { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - PKCS7_add_certificate(arg1,arg2); - resultobj = SWIG_Py_Void(); + result = (char *)pkcs7_type_sn(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN int Swig_var__pkcs7_err_set(PyObject *_val) { +SWIGINTERN PyObject *_wrap_smime_crlf_copy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + BIO *arg1 = (BIO *) 0 ; + BIO *arg2 = (BIO *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"smime_crlf_copy",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_crlf_copy" "', argument " "1"" of type '" "BIO *""'"); + } + arg1 = (BIO *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "smime_crlf_copy" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_pkcs7_err""' of type '""PyObject *""'"); + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } - _pkcs7_err = (PyObject *)(argp); } - return 0; + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)smime_crlf_copy(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + return resultobj; fail: - return 1; + return NULL; } -SWIGINTERN PyObject *Swig_var__pkcs7_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; +SWIGINTERN PyObject *_wrap_pkcs7_get0_signers(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + PKCS7 *arg1 = (PKCS7 *) 0 ; + struct stack_st_X509 *arg2 = (struct stack_st_X509 *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + struct stack_st_X509 *result = 0 ; - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_pkcs7_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; + if(!PyArg_UnpackTuple(args,(char *)"pkcs7_get0_signers",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_get0_signers" "', argument " "1"" of type '" "PKCS7 *""'"); + } + arg1 = (PKCS7 *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_get0_signers" "', argument " "2"" of type '" "struct stack_st_X509 *""'"); + } + arg2 = (struct stack_st_X509 *)(argp2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkcs7_get0_signers" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + { + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (struct stack_st_X509 *)pkcs7_get0_signers(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509, 0 | 0 ); + return resultobj; +fail: + return NULL; } -SWIGINTERN int Swig_var__smime_err_set(PyObject *_val) { +SWIGINTERN int Swig_var__util_err_set(PyObject *_val) { { void *argp = 0; int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_smime_err""' of type '""PyObject *""'"); + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_util_err""' of type '""PyObject *""'"); } - _smime_err = (PyObject *)(argp); + _util_err = (PyObject *)(argp); } return 0; fail: @@ -28918,27 +28275,26 @@ fail: } -SWIGINTERN PyObject *Swig_var__smime_err_get(void) { +SWIGINTERN PyObject *Swig_var__util_err_get(void) { PyObject *pyobj = 0; PyObject *self = 0; (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_smime_err), SWIGTYPE_p_PyObject, 0 ); + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_util_err), SWIGTYPE_p_PyObject, 0 ); return pyobj; } -SWIGINTERN PyObject *_wrap_pkcs7_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_util_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if(!PyArg_UnpackTuple(args,(char *)"util_init",1,1,&obj0)) SWIG_fail; { - arg1=swig_obj[0]; + arg1=obj0; } - pkcs7_init(arg1); + util_init(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -28946,78 +28302,37 @@ fail: } -SWIGINTERN PyObject *_wrap_smime_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_util_hex_to_string(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if(!PyArg_UnpackTuple(args,(char *)"util_hex_to_string",1,1,&obj0)) SWIG_fail; { - arg1=swig_obj[0]; + arg1=obj0; + } + result = (PyObject *)util_hex_to_string(arg1); + { + resultobj=result; } - smime_init(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkcs7_decrypt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_util_string_to_hex(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; - X509 *arg3 = (X509 *) 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_decrypt", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_decrypt" "', argument " "1"" of type '" "PKCS7 *""'"); - } - arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_decrypt" "', argument " "2"" of type '" "EVP_PKEY *""'"); - } - arg2 = (EVP_PKEY *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_X509, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_decrypt" "', argument " "3"" of type '" "X509 *""'"); - } - arg3 = (X509 *)(argp3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs7_decrypt" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } + if(!PyArg_UnpackTuple(args,(char *)"util_string_to_hex",1,1,&obj0)) SWIG_fail; { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg1=obj0; } - result = (PyObject *)pkcs7_decrypt(arg1,arg2,arg3,arg4); + result = (PyObject *)util_string_to_hex(arg1); { resultobj=result; } @@ -29027,73 +28342,67 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_encrypt(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - struct stack_st_X509 *arg1 = (struct stack_st_X509 *) 0 ; - BIO *arg2 = (BIO *) 0 ; - EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; - int arg4 ; + EC_KEY *result = 0 ; + + result = (EC_KEY *)EC_KEY_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ec_key_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EC_KEY *arg1 = (EC_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - PKCS7 *result = 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_encrypt", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_encrypt" "', argument " "1"" of type '" "struct stack_st_X509 *""'"); - } - arg1 = (struct stack_st_X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_encrypt" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_encrypt" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_free" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg3 = (EVP_CIPHER *)(argp3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs7_encrypt" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); + arg1 = (EC_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + EC_KEY_free(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ec_key_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EC_KEY *arg1 = (EC_KEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"ec_key_size",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_size" "', argument " "1"" of type '" "EC_KEY const *""'"); } + arg1 = (EC_KEY *)(argp1); { - if (!arg3) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)ECDSA_size((EC_KEY const *)arg1); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (PKCS7 *)pkcs7_encrypt(arg1,arg2,arg3,arg4); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); - else { - m2_PyErr_Msg(_smime_err); - resultobj = NULL; - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -29101,99 +28410,115 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_sign1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_gen_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; - struct stack_st_X509 *arg3 = (struct stack_st_X509 *) 0 ; - BIO *arg4 = (BIO *) 0 ; - EVP_MD *arg5 = (EVP_MD *) 0 ; - int arg6 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - int val6 ; - int ecode6 = 0 ; - PyObject *swig_obj[6] ; - PKCS7 *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_sign1", 6, 6, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_gen_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_sign1" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_sign1" "', argument " "2"" of type '" "EVP_PKEY *""'"); - } - arg2 = (EVP_PKEY *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_stack_st_X509, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_sign1" "', argument " "3"" of type '" "struct stack_st_X509 *""'"); - } - arg3 = (struct stack_st_X509 *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkcs7_sign1" "', argument " "4"" of type '" "BIO *""'"); - } - arg4 = (BIO *)(argp4); - res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pkcs7_sign1" "', argument " "5"" of type '" "EVP_MD *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_gen_key" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg5 = (EVP_MD *)(argp5); - ecode6 = SWIG_AsVal_int(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "pkcs7_sign1" "', argument " "6"" of type '" "int""'"); - } - arg6 = (int)(val6); + arg1 = (EC_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)EC_KEY_generate_key(arg1); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ec_key_check_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EC_KEY *arg1 = (EC_KEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"ec_key_check_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_check_key" "', argument " "1"" of type '" "EC_KEY const *""'"); } + arg1 = (EC_KEY *)(argp1); { - if (!arg3) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)EC_KEY_check_key((EC_KEY const *)arg1); { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN int Swig_var__ec_err_set(PyObject *_val) { { - if (!arg5) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_ec_err""' of type '""PyObject *""'"); } + _ec_err = (PyObject *)(argp); } + return 0; +fail: + return 1; +} + + +SWIGINTERN PyObject *Swig_var__ec_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_ec_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_ec_init(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ec_init",1,1,&obj0)) SWIG_fail; { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (PKCS7 *)pkcs7_sign1(arg1,arg2,arg3,arg4,arg5,arg6); - SWIG_PYTHON_THREAD_END_ALLOW; + arg1=obj0; } + ec_init(arg1); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ec_get_builtin_curves(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + PyObject *result = 0 ; + + result = (PyObject *)ec_get_builtin_curves(); { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); - else { - m2_PyErr_Msg(_smime_err); - resultobj = NULL; - } + resultobj=result; } return resultobj; fail: @@ -29201,86 +28526,79 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_sign0(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_new_by_curve_name(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - X509 *arg1 = (X509 *) 0 ; - EVP_PKEY *arg2 = (EVP_PKEY *) 0 ; - BIO *arg3 = (BIO *) 0 ; - EVP_MD *arg4 = (EVP_MD *) 0 ; - int arg5 ; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + EC_KEY *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ec_key_new_by_curve_name",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ec_key_new_by_curve_name" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (EC_KEY *)ec_key_new_by_curve_name(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ec_key_get_public_der(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EC_KEY *arg1 = (EC_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; - PKCS7 *result = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_sign0", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_X509, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_get_public_der",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_sign0" "', argument " "1"" of type '" "X509 *""'"); - } - arg1 = (X509 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_sign0" "', argument " "2"" of type '" "EVP_PKEY *""'"); - } - arg2 = (EVP_PKEY *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_sign0" "', argument " "3"" of type '" "BIO *""'"); - } - arg3 = (BIO *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_EVP_MD, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkcs7_sign0" "', argument " "4"" of type '" "EVP_MD *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_get_public_der" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg4 = (EVP_MD *)(argp4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "pkcs7_sign0" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); + arg1 = (EC_KEY *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)ec_key_get_public_der(arg1); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + resultobj=result; } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ec_key_get_public_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + EC_KEY *arg1 = (EC_KEY *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"ec_key_get_public_key",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_get_public_key" "', argument " "1"" of type '" "EC_KEY *""'"); } + arg1 = (EC_KEY *)(argp1); { - if (!arg4) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)ec_key_get_public_key(arg1); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (PKCS7 *)pkcs7_sign0(arg1,arg2,arg3,arg4,arg5); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); - else { - m2_PyErr_Msg(_smime_err); - resultobj = NULL; - } + resultobj=result; } return resultobj; fail: @@ -29288,19 +28606,18 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_read_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_read_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; BIO *arg1 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PKCS7 *result = 0 ; + PyObject * obj0 = 0 ; + EC_KEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_read_pubkey",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_read_bio" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_read_pubkey" "', argument " "1"" of type '" "BIO *""'"); } arg1 = (BIO *)(argp1); { @@ -29310,112 +28627,39 @@ SWIGINTERN PyObject *_wrap_pkcs7_read_bio(PyObject *self, PyObject *args) { } { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (PKCS7 *)pkcs7_read_bio(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); - else { - m2_PyErr_Msg(_pkcs7_err); - resultobj = NULL; - } - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_pkcs7_read_bio_der(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PKCS7 *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_read_bio_der" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (PKCS7 *)pkcs7_read_bio_der(arg1); + result = (EC_KEY *)ec_key_read_pubkey(arg1); SWIG_PYTHON_THREAD_END_ALLOW; } - { - PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ - - if (result != NULL) - resultobj = SWIG_NewPointerObj(result, SWIGTYPE_p_PKCS7, 0); - else { - m2_PyErr_Msg(_pkcs7_err); - resultobj = NULL; - } - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_pkcs7_verify1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_write_pubkey(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; - struct stack_st_X509 *arg2 = (struct stack_st_X509 *) 0 ; - X509_STORE *arg3 = (X509_STORE *) 0 ; - BIO *arg4 = (BIO *) 0 ; - int arg5 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + BIO *arg2 = (BIO *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject *swig_obj[5] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_verify1", 5, 5, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_write_pubkey",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_verify1" "', argument " "1"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_write_pubkey" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + arg1 = (EC_KEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_verify1" "', argument " "2"" of type '" "struct stack_st_X509 *""'"); - } - arg2 = (struct stack_st_X509 *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_X509_STORE, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_verify1" "', argument " "3"" of type '" "X509_STORE *""'"); - } - arg3 = (X509_STORE *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkcs7_verify1" "', argument " "4"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ec_key_write_pubkey" "', argument " "2"" of type '" "BIO *""'"); } - arg4 = (BIO *)(argp4); - ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "pkcs7_verify1" "', argument " "5"" of type '" "int""'"); - } - arg5 = (int)(val5); + arg2 = (BIO *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -29427,13 +28671,13 @@ SWIGINTERN PyObject *_wrap_pkcs7_verify1(PyObject *self, PyObject *args) { } } { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (int)ec_key_write_pubkey(arg1,arg2); + SWIG_PYTHON_THREAD_END_ALLOW; } - result = (PyObject *)pkcs7_verify1(arg1,arg2,arg3,arg4,arg5); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -29441,44 +28685,29 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_verify0(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_read_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; - struct stack_st_X509 *arg2 = (struct stack_st_X509 *) 0 ; - X509_STORE *arg3 = (X509_STORE *) 0 ; - int arg4 ; + BIO *arg1 = (BIO *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + EC_KEY *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_verify0", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_read_bio",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_verify0" "', argument " "1"" of type '" "PKCS7 *""'"); - } - arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_stack_st_X509, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_verify0" "', argument " "2"" of type '" "struct stack_st_X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_read_bio" "', argument " "1"" of type '" "BIO *""'"); } - arg2 = (struct stack_st_X509 *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_X509_STORE, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkcs7_verify0" "', argument " "3"" of type '" "X509_STORE *""'"); + arg1 = (BIO *)(argp1); + { + if (!PyCallable_Check(obj1)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg2=obj1; } - arg3 = (X509_STORE *)(argp3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkcs7_verify0" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -29489,54 +28718,55 @@ SWIGINTERN PyObject *_wrap_pkcs7_verify0(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)pkcs7_verify0(arg1,arg2,arg3,arg4); - { - resultobj=result; - } + result = (EC_KEY *)ec_key_read_bio(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_smime_write_pkcs7_multi(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_write_bio(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PKCS7 *arg2 = (PKCS7 *) 0 ; - BIO *arg3 = (BIO *) 0 ; - int arg4 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + BIO *arg2 = (BIO *) 0 ; + EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "smime_write_pkcs7_multi", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_write_bio",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_write_pkcs7_multi" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_write_bio" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_PKCS7, 0 | 0 ); + arg1 = (EC_KEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "smime_write_pkcs7_multi" "', argument " "2"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ec_key_write_bio" "', argument " "2"" of type '" "BIO *""'"); } - arg2 = (PKCS7 *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_BIO, 0 | 0 ); + arg2 = (BIO *)(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "smime_write_pkcs7_multi" "', argument " "3"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ec_key_write_bio" "', argument " "3"" of type '" "EVP_CIPHER *""'"); + } + arg3 = (EVP_CIPHER *)(argp3); + { + if (!PyCallable_Check(obj3)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg4=obj3; } - arg3 = (BIO *)(argp3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "smime_write_pkcs7_multi" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -29553,10 +28783,11 @@ SWIGINTERN PyObject *_wrap_smime_write_pkcs7_multi(PyObject *self, PyObject *arg } } { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)smime_write_pkcs7_multi(arg1,arg2,arg3,arg4); - SWIG_PYTHON_THREAD_END_ALLOW; + if (!arg4) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (int)ec_key_write_bio(arg1,arg2,arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -29567,36 +28798,38 @@ fail: } -SWIGINTERN PyObject *_wrap_smime_write_pkcs7(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_write_bio_no_cipher(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PKCS7 *arg2 = (PKCS7 *) 0 ; - int arg3 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + BIO *arg2 = (BIO *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "smime_write_pkcs7", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_write_bio_no_cipher",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_write_pkcs7" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_write_bio_no_cipher" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_PKCS7, 0 | 0 ); + arg1 = (EC_KEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BIO, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "smime_write_pkcs7" "', argument " "2"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ec_key_write_bio_no_cipher" "', argument " "2"" of type '" "BIO *""'"); + } + arg2 = (BIO *)(argp2); + { + if (!PyCallable_Check(obj2)) { + PyErr_SetString(PyExc_TypeError, "expected PyCallable"); + return NULL; + } + arg3=obj2; } - arg2 = (PKCS7 *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "smime_write_pkcs7" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -29608,10 +28841,11 @@ SWIGINTERN PyObject *_wrap_smime_write_pkcs7(PyObject *self, PyObject *args) { } } { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)smime_write_pkcs7(arg1,arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; + if (!arg3) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (int)ec_key_write_bio_no_cipher(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -29622,27 +28856,21 @@ fail: } -SWIGINTERN PyObject *_wrap_smime_read_pkcs7(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdsa_sig_get_r(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + ECDSA_SIG *arg1 = (ECDSA_SIG *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdsa_sig_get_r",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ECDSA_SIG, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_read_pkcs7" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sig_get_r" "', argument " "1"" of type '" "ECDSA_SIG *""'"); } - result = (PyObject *)smime_read_pkcs7(arg1); + arg1 = (ECDSA_SIG *)(argp1); + result = (PyObject *)ecdsa_sig_get_r(arg1); { resultobj=result; } @@ -29652,46 +28880,23 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_write_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdsa_sig_get_s(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; - BIO *arg2 = (BIO *) 0 ; + ECDSA_SIG *arg1 = (ECDSA_SIG *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_write_bio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdsa_sig_get_s",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ECDSA_SIG, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_write_bio" "', argument " "1"" of type '" "PKCS7 *""'"); - } - arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_write_bio" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sig_get_s" "', argument " "1"" of type '" "ECDSA_SIG *""'"); } + arg1 = (ECDSA_SIG *)(argp1); + result = (PyObject *)ecdsa_sig_get_s(arg1); { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)pkcs7_write_bio(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -29699,46 +28904,33 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_write_bio_der(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdsa_sign(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; - BIO *arg2 = (BIO *) 0 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - int result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_write_bio_der", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdsa_sign",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_write_bio_der" "', argument " "1"" of type '" "PKCS7 *""'"); - } - arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_write_bio_der" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sign" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg2 = (BIO *)(argp2); + arg1 = (EC_KEY *)(argp1); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg2=obj1; } { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (PyObject *)ecdsa_sign(arg1,arg2); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)pkcs7_write_bio_der(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + resultobj=result; } return resultobj; fail: @@ -29746,27 +28938,41 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_type_nid(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdsa_verify(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; + PyObject *arg4 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdsa_verify",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_type_nid" "', argument " "1"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_verify" "', argument " "1"" of type '" "EC_KEY *""'"); + } + arg1 = (EC_KEY *)(argp1); + { + arg2=obj1; + } + { + arg3=obj2; + } + { + arg4=obj3; } - arg1 = (PKCS7 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)pkcs7_type_nid(arg1); + result = (int)ecdsa_verify(arg1,arg2,arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -29777,71 +28983,70 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_type_sn(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdsa_sign_asn1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdsa_sign_asn1",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_type_sn" "', argument " "1"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sign_asn1" "', argument " "1"" of type '" "EC_KEY *""'"); + } + arg1 = (EC_KEY *)(argp1); + { + arg2=obj1; } - arg1 = (PKCS7 *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)pkcs7_type_sn(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + result = (PyObject *)ecdsa_sign_asn1(arg1,arg2); + { + resultobj=result; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_smime_crlf_copy(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdsa_verify_asn1(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - BIO *arg2 = (BIO *) 0 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "smime_crlf_copy", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdsa_verify_asn1",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "smime_crlf_copy" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_verify_asn1" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg1 = (BIO *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "smime_crlf_copy" "', argument " "2"" of type '" "BIO *""'"); + arg1 = (EC_KEY *)(argp1); + { + arg2=obj1; } - arg2 = (BIO *)(argp2); { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + arg3=obj2; } { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)smime_crlf_copy(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)ecdsa_verify_asn1(arg1,arg2,arg3); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -29852,36 +29057,29 @@ fail: } -SWIGINTERN PyObject *_wrap_pkcs7_get0_signers(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ecdh_compute_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PKCS7 *arg1 = (PKCS7 *) 0 ; - struct stack_st_X509 *arg2 = (struct stack_st_X509 *) 0 ; - int arg3 ; + EC_KEY *arg1 = (EC_KEY *) 0 ; + EC_KEY *arg2 = (EC_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject *swig_obj[3] ; - struct stack_st_X509 *result = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "pkcs7_get0_signers", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_PKCS7, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ecdh_compute_key",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkcs7_get0_signers" "', argument " "1"" of type '" "PKCS7 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdh_compute_key" "', argument " "1"" of type '" "EC_KEY *""'"); } - arg1 = (PKCS7 *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_stack_st_X509, 0 | 0 ); + arg1 = (EC_KEY *)(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkcs7_get0_signers" "', argument " "2"" of type '" "struct stack_st_X509 *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ecdh_compute_key" "', argument " "2"" of type '" "EC_KEY *""'"); } - arg2 = (struct stack_st_X509 *)(argp2); - ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkcs7_get0_signers" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); + arg2 = (EC_KEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -29892,69 +29090,7 @@ SWIGINTERN PyObject *_wrap_pkcs7_get0_signers(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (struct stack_st_X509 *)pkcs7_get0_signers(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stack_st_X509, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int Swig_var__util_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_util_err""' of type '""PyObject *""'"); - } - _util_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__util_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_util_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_util_init(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - util_init(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_util_hex_to_string(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - result = (PyObject *)util_hex_to_string(arg1); + result = (PyObject *)ecdh_compute_key(arg1,arg2); { resultobj=result; } @@ -29964,33 +29100,44 @@ fail: } -SWIGINTERN PyObject *_wrap_util_string_to_hex(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_from_pubkey_der(PyObject *self, PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + EC_KEY *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; + if(!PyArg_UnpackTuple(args,(char *)"ec_key_from_pubkey_der",1,1,&obj0)) SWIG_fail; { - arg1=swig_obj[0]; - } - result = (PyObject *)util_string_to_hex(arg1); - { - resultobj=result; + arg1=obj0; } + result = (EC_KEY *)ec_key_from_pubkey_der(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_from_pubkey_params(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + int arg1 ; + PyObject *arg2 = (PyObject *) 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; EC_KEY *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ec_key_new", 0, 0, 0)) SWIG_fail; - result = (EC_KEY *)EC_KEY_new(); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_from_pubkey_params",2,2,&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ec_key_from_pubkey_params" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + { + arg2=obj1; + } + result = (EC_KEY *)ec_key_from_pubkey_params(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); return resultobj; fail: @@ -29998,18 +29145,18 @@ fail: } -SWIGINTERN PyObject *_wrap_ec_key_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_keylen(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EC_KEY *arg1 = (EC_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_keylen",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_free" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_keylen" "', argument " "1"" of type '" "EC_KEY *""'"); } arg1 = (EC_KEY *)(argp1); { @@ -30017,27 +29164,29 @@ SWIGINTERN PyObject *_wrap_ec_key_free(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - EC_KEY_free(arg1); - resultobj = SWIG_Py_Void(); + result = (int)ec_key_keylen(arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_size(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ec_key_type_check(PyObject *self, PyObject *args) { PyObject *resultobj = 0; EC_KEY *arg1 = (EC_KEY *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"ec_key_type_check",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_size" "', argument " "1"" of type '" "EC_KEY const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_type_check" "', argument " "1"" of type '" "EC_KEY *""'"); } arg1 = (EC_KEY *)(argp1); { @@ -30045,7 +29194,7 @@ SWIGINTERN PyObject *_wrap_ec_key_size(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ECDSA_size((EC_KEY const *)arg1); + result = (int)ec_key_type_check(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -30056,104 +29205,32 @@ fail: } -SWIGINTERN PyObject *_wrap_ec_key_gen_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_load_builtin_engines(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_gen_key" "', argument " "1"" of type '" "EC_KEY *""'"); - } - arg1 = (EC_KEY *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)EC_KEY_generate_key(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + ENGINE_load_builtin_engines(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_check_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_load_dynamic(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_check_key" "', argument " "1"" of type '" "EC_KEY const *""'"); - } - arg1 = (EC_KEY *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)EC_KEY_check_key((EC_KEY const *)arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } + ENGINE_load_dynamic(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN int Swig_var__ec_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_ec_err""' of type '""PyObject *""'"); - } - _ec_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__ec_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_ec_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_ec_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_load_openssl(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - ec_init(arg1); + ENGINE_load_openssl(); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -30161,97 +29238,82 @@ fail: } -SWIGINTERN PyObject *_wrap_ec_get_builtin_curves(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_cleanup(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - PyObject *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ec_get_builtin_curves", 0, 0, 0)) SWIG_fail; - result = (PyObject *)ec_get_builtin_curves(); - { - resultobj=result; - } + ENGINE_cleanup(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_new_by_curve_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - EC_KEY *result = 0 ; + ENGINE *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ec_key_new_by_curve_name" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (EC_KEY *)ec_key_new_by_curve_name(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); + result = (ENGINE *)ENGINE_new(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ENGINE, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_get_public_der(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_by_id(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + ENGINE *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_by_id",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_get_public_der" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_by_id" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (EC_KEY *)(argp1); + arg1 = (char *)(buf1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ec_key_get_public_der(arg1); - { - resultobj=result; - } + result = (ENGINE *)ENGINE_by_id((char const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ENGINE, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_get_public_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_free(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_get_public_key" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_free" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (EC_KEY *)(argp1); + arg1 = (ENGINE *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ec_key_get_public_key(arg1); + result = (int)ENGINE_free(arg1); { - resultobj=result; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } return resultobj; fail: @@ -30259,75 +29321,56 @@ fail: } -SWIGINTERN PyObject *_wrap_ec_key_read_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_init(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - EC_KEY *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_init",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_read_pubkey" "', argument " "1"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_init" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (BIO *)(argp1); + arg1 = (ENGINE *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (int)ENGINE_init(arg1); { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (EC_KEY *)ec_key_read_pubkey(arg1); - SWIG_PYTHON_THREAD_END_ALLOW; + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_write_pubkey(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_finish(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - BIO *arg2 = (BIO *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; + PyObject * obj0 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ec_key_write_pubkey", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_finish",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_write_pubkey" "', argument " "1"" of type '" "EC_KEY *""'"); - } - arg1 = (EC_KEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ec_key_write_pubkey" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_finish" "', argument " "1"" of type '" "ENGINE *""'"); } - arg2 = (BIO *)(argp2); + arg1 = (ENGINE *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)ec_key_write_pubkey(arg1,arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } + result = (int)ENGINE_finish(arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -30338,389 +29381,426 @@ fail: } -SWIGINTERN PyObject *_wrap_ec_key_read_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_get_id(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - BIO *arg1 = (BIO *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - EC_KEY *result = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ec_key_read_bio", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_BIO, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_get_id",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_read_bio" "', argument " "1"" of type '" "BIO *""'"); - } - arg1 = (BIO *)(argp1); - { - if (!PyCallable_Check(swig_obj[1])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg2=swig_obj[1]; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_get_id" "', argument " "1"" of type '" "ENGINE const *""'"); } + arg1 = (ENGINE *)(argp1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } + result = (char *)ENGINE_get_id((ENGINE const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_engine_get_name(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ENGINE *arg1 = (ENGINE *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"engine_get_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_get_name" "', argument " "1"" of type '" "ENGINE const *""'"); + } + arg1 = (ENGINE *)(argp1); { - if (!arg2) { + if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (EC_KEY *)ec_key_read_bio(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); + result = (char *)ENGINE_get_name((ENGINE const *)arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_write_bio(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_ctrl_cmd_string(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - BIO *arg2 = (BIO *) 0 ; - EVP_CIPHER *arg3 = (EVP_CIPHER *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + int arg4 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject *swig_obj[4] ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "ec_key_write_bio", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_ctrl_cmd_string",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_write_bio" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_ctrl_cmd_string" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (EC_KEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + arg1 = (ENGINE *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ec_key_write_bio" "', argument " "2"" of type '" "BIO *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_ctrl_cmd_string" "', argument " "2"" of type '" "char const *""'"); } - arg2 = (BIO *)(argp2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_EVP_CIPHER, 0 | 0 ); + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ec_key_write_bio" "', argument " "3"" of type '" "EVP_CIPHER *""'"); - } - arg3 = (EVP_CIPHER *)(argp3); - { - if (!PyCallable_Check(swig_obj[3])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg4=swig_obj[3]; + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "engine_ctrl_cmd_string" "', argument " "3"" of type '" "char const *""'"); } + arg3 = (char *)(buf3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "engine_ctrl_cmd_string" "', argument " "4"" of type '" "int""'"); + } + arg4 = (int)(val4); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg4) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)ec_key_write_bio(arg1,arg2,arg3,arg4); + result = (int)ENGINE_ctrl_cmd_string(arg1,(char const *)arg2,(char const *)arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_write_bio_no_cipher(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ui_openssl(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - BIO *arg2 = (BIO *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + UI_METHOD *result = 0 ; + + result = (UI_METHOD *)UI_OpenSSL(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UI_METHOD, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__cbd_t_password_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + _cbd_t *arg1 = (_cbd_t *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[3] ; - int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj1 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ec_key_write_bio_no_cipher", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"_cbd_t_password_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_write_bio_no_cipher" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_password_set" "', argument " "1"" of type '" "_cbd_t *""'"); } - arg1 = (EC_KEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_BIO, 0 | 0 ); + arg1 = (_cbd_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ec_key_write_bio_no_cipher" "', argument " "2"" of type '" "BIO *""'"); - } - arg2 = (BIO *)(argp2); - { - if (!PyCallable_Check(swig_obj[2])) { - PyErr_SetString(PyExc_TypeError, "expected PyCallable"); - return NULL; - } - arg3=swig_obj[2]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_cbd_t_password_set" "', argument " "2"" of type '" "char *""'"); } - result = (int)ec_key_write_bio_no_cipher(arg1,arg2,arg3); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + arg2 = (char *)(buf2); + if (arg1->password) free((char*)arg1->password); + if (arg2) { + size_t size = strlen((const char *)(arg2)) + 1; + arg1->password = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); + } else { + arg1->password = 0; } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ecdsa_sig_get_r(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__cbd_t_password_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ECDSA_SIG *arg1 = (ECDSA_SIG *) 0 ; + _cbd_t *arg1 = (_cbd_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + char *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ECDSA_SIG, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sig_get_r" "', argument " "1"" of type '" "ECDSA_SIG *""'"); - } - arg1 = (ECDSA_SIG *)(argp1); - result = (PyObject *)ecdsa_sig_get_r(arg1); - { - resultobj=result; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_password_get" "', argument " "1"" of type '" "_cbd_t *""'"); } + arg1 = (_cbd_t *)(argp1); + result = (char *) ((arg1)->password); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ecdsa_sig_get_s(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__cbd_t_prompt_set(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ECDSA_SIG *arg1 = (ECDSA_SIG *) 0 ; + _cbd_t *arg1 = (_cbd_t *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - PyObject *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj1 = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ECDSA_SIG, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"_cbd_t_prompt_set",1,1,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sig_get_s" "', argument " "1"" of type '" "ECDSA_SIG *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_prompt_set" "', argument " "1"" of type '" "_cbd_t *""'"); } - arg1 = (ECDSA_SIG *)(argp1); - result = (PyObject *)ecdsa_sig_get_s(arg1); - { - resultobj=result; + arg1 = (_cbd_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_cbd_t_prompt_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = (char *)(buf2); + if (arg1->prompt) free((char*)arg1->prompt); + if (arg2) { + size_t size = strlen((const char *)(arg2)) + 1; + arg1->prompt = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); + } else { + arg1->prompt = 0; } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ecdsa_sign(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__cbd_t_prompt_get(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; + _cbd_t *arg1 = (_cbd_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ecdsa_sign", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sign" "', argument " "1"" of type '" "EC_KEY *""'"); - } - arg1 = (EC_KEY *)(argp1); - { - arg2=swig_obj[1]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)ecdsa_sign(arg1,arg2); - { - resultobj=result; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_prompt_get" "', argument " "1"" of type '" "_cbd_t *""'"); } + arg1 = (_cbd_t *)(argp1); + result = (char *) ((arg1)->prompt); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ecdsa_verify(PyObject *self, PyObject *args) { +SWIGINTERN int _wrap_new__cbd_t(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; - PyObject *arg4 = (PyObject *) 0 ; + _cbd_t *result = 0 ; + + result = (_cbd_t *)calloc(1, sizeof(_cbd_t)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__cbd_t, SWIG_BUILTIN_INIT | 0 ); + return resultobj == Py_None ? -1 : 0; +fail: + return -1; +} + + +SWIGINTERN PyObject *_wrap_delete__cbd_t(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + _cbd_t *arg1 = (_cbd_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[4] ; - int result; - if (!SWIG_Python_UnpackTuple(args, "ecdsa_verify", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_verify" "', argument " "1"" of type '" "EC_KEY *""'"); - } - arg1 = (EC_KEY *)(argp1); - { - arg2=swig_obj[1]; - } - { - arg3=swig_obj[2]; - } - { - arg4=swig_obj[3]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)ecdsa_verify(arg1,arg2,arg3,arg4); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete__cbd_t" "', argument " "1"" of type '" "_cbd_t *""'"); } + arg1 = (_cbd_t *)(argp1); + free((char *) arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ecdsa_sign_asn1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_pkcs11_data_new(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + void *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ecdsa_sign_asn1", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_pkcs11_data_new",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_sign_asn1" "', argument " "1"" of type '" "EC_KEY *""'"); - } - arg1 = (EC_KEY *)(argp1); - { - arg2=swig_obj[1]; - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_pkcs11_data_new" "', argument " "1"" of type '" "char const *""'"); } - result = (PyObject *)ecdsa_sign_asn1(arg1,arg2); - { - resultobj=result; + arg1 = (char *)(buf1); + result = (void *)engine_pkcs11_data_new((char const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_engine_pkcs11_data_free(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + void *arg1 = (void *) 0 ; + int res1 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"engine_pkcs11_data_free",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_pkcs11_data_free" "', argument " "1"" of type '" "void *""'"); } + engine_pkcs11_data_free(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ecdsa_verify_asn1(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_load_private_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject *arg3 = (PyObject *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; + char *arg2 = (char *) 0 ; + UI_METHOD *arg3 = (UI_METHOD *) 0 ; + void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[3] ; - int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int res4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + EVP_PKEY *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ecdsa_verify_asn1", 3, 3, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_load_private_key",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdsa_verify_asn1" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_load_private_key" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (EC_KEY *)(argp1); - { - arg2=swig_obj[1]; + arg1 = (ENGINE *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_load_private_key" "', argument " "2"" of type '" "char const *""'"); } - { - arg3=swig_obj[2]; + arg2 = (char *)(buf2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_UI_METHOD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "engine_load_private_key" "', argument " "3"" of type '" "UI_METHOD *""'"); + } + arg3 = (UI_METHOD *)(argp3); + res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "engine_load_private_key" "', argument " "4"" of type '" "void *""'"); } { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ecdsa_verify_asn1(arg1,arg2,arg3); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (EVP_PKEY *)ENGINE_load_private_key(arg1,(char const *)arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ecdh_compute_key(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_load_public_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; - EC_KEY *arg2 = (EC_KEY *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; + char *arg2 = (char *) 0 ; + UI_METHOD *arg3 = (UI_METHOD *) 0 ; + void *arg4 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int res4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + EVP_PKEY *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ecdh_compute_key", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_load_public_key",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ecdh_compute_key" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_load_public_key" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (EC_KEY *)(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_EC_KEY, 0 | 0 ); + arg1 = (ENGINE *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ecdh_compute_key" "', argument " "2"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_load_public_key" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_UI_METHOD, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "engine_load_public_key" "', argument " "3"" of type '" "UI_METHOD *""'"); + } + arg3 = (UI_METHOD *)(argp3); + res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "engine_load_public_key" "', argument " "4"" of type '" "void *""'"); } - arg2 = (EC_KEY *)(argp2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); @@ -30731,113 +29811,131 @@ SWIGINTERN PyObject *_wrap_ecdh_compute_key(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (PyObject *)ecdh_compute_key(arg1,arg2); - { - resultobj=result; - } + result = (EVP_PKEY *)ENGINE_load_public_key(arg1,(char const *)arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_from_pubkey_der(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - EC_KEY *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; +SWIGINTERN int Swig_var__engine_err_set(PyObject *_val) { { - arg1=swig_obj[0]; + void *argp = 0; + int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_engine_err""' of type '""PyObject *""'"); + } + _engine_err = (PyObject *)(argp); } - result = (EC_KEY *)ec_key_from_pubkey_der(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); - return resultobj; + return 0; fail: - return NULL; + return 1; } -SWIGINTERN PyObject *_wrap_ec_key_from_pubkey_params(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *Swig_var__engine_err_get(void) { + PyObject *pyobj = 0; + PyObject *self = 0; + + (void)self; + pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_engine_err), SWIGTYPE_p_PyObject, 0 ); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_engine_init_error(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - PyObject *arg2 = (PyObject *) 0 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[2] ; - EC_KEY *result = 0 ; + PyObject *arg1 = (PyObject *) 0 ; + PyObject * obj0 = 0 ; - if (!SWIG_Python_UnpackTuple(args, "ec_key_from_pubkey_params", 2, 2, swig_obj)) SWIG_fail; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ec_key_from_pubkey_params" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); + if(!PyArg_UnpackTuple(args,(char *)"engine_init_error",1,1,&obj0)) SWIG_fail; { - arg2=swig_obj[1]; + arg1=obj0; } - result = (EC_KEY *)ec_key_from_pubkey_params(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EC_KEY, 0 | 0 ); + engine_init_error(arg1); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_keylen(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_load_certificate(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; + char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + X509 *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_load_certificate",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_keylen" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_load_certificate" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (EC_KEY *)(argp1); + arg1 = (ENGINE *)(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_load_certificate" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ec_key_keylen(arg1); { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; + if (!arg2) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } + result = (X509 *)engine_load_certificate(arg1,(char const *)arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap_ec_key_type_check(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_engine_set_default(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - EC_KEY *arg1 = (EC_KEY *) 0 ; + ENGINE *arg1 = (ENGINE *) 0 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject *swig_obj[1] ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EC_KEY, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"engine_set_default",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ec_key_type_check" "', argument " "1"" of type '" "EC_KEY *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_set_default" "', argument " "1"" of type '" "ENGINE *""'"); } - arg1 = (EC_KEY *)(argp1); + arg1 = (ENGINE *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "engine_set_default" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = (unsigned int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ec_key_type_check(arg1); + result = (int)ENGINE_set_default(arg1,arg2); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; @@ -30848,81 +29946,115 @@ fail: } -SWIGINTERN PyObject *_wrap_engine_load_builtin_engines(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - - if (!SWIG_Python_UnpackTuple(args, "engine_load_builtin_engines", 0, 0, 0)) SWIG_fail; - ENGINE_load_builtin_engines(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_load_dynamic(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_nid2obj(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + ASN1_OBJECT *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "engine_load_dynamic", 0, 0, 0)) SWIG_fail; - ENGINE_load_dynamic(); - resultobj = SWIG_Py_Void(); + if(!PyArg_UnpackTuple(args,(char *)"obj_nid2obj",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "obj_nid2obj" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (ASN1_OBJECT *)OBJ_nid2obj(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_engine_load_openssl(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_nid2ln(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "engine_load_openssl", 0, 0, 0)) SWIG_fail; - ENGINE_load_openssl(); - resultobj = SWIG_Py_Void(); + if(!PyArg_UnpackTuple(args,(char *)"obj_nid2ln",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "obj_nid2ln" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (char *)OBJ_nid2ln(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_engine_cleanup(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_nid2sn(PyObject *self, PyObject *args) { PyObject *resultobj = 0; + int arg1 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char *result = 0 ; - if (!SWIG_Python_UnpackTuple(args, "engine_cleanup", 0, 0, 0)) SWIG_fail; - ENGINE_cleanup(); - resultobj = SWIG_Py_Void(); + if(!PyArg_UnpackTuple(args,(char *)"obj_nid2sn",1,1,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "obj_nid2sn" "', argument " "1"" of type '" "int""'"); + } + arg1 = (int)(val1); + result = (char *)OBJ_nid2sn(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_engine_new(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_obj2nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ENGINE *result = 0 ; + ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!SWIG_Python_UnpackTuple(args, "engine_new", 0, 0, 0)) SWIG_fail; - result = (ENGINE *)ENGINE_new(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ENGINE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"obj_obj2nid",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_obj2nid" "', argument " "1"" of type '" "ASN1_OBJECT const *""'"); + } + arg1 = (ASN1_OBJECT *)(argp1); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } + } + result = (int)OBJ_obj2nid((ASN1_OBJECT const *)arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_engine_by_id(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_ln2nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - PyObject *swig_obj[1] ; - ENGINE *result = 0 ; + PyObject * obj0 = 0 ; + int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); + if(!PyArg_UnpackTuple(args,(char *)"obj_ln2nid",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_by_id" "', argument " "1"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_ln2nid" "', argument " "1"" of type '" "char const *""'"); } arg1 = (char *)(buf1); { @@ -30930,8 +30062,11 @@ SWIGINTERN PyObject *_wrap_engine_by_id(PyObject *self, PyObject *args) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (ENGINE *)ENGINE_by_id((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ENGINE, 0 | 0 ); + result = (int)OBJ_ln2nid((char const *)arg1); + { + resultobj=PyLong_FromLong(result); + if (PyErr_Occurred()) SWIG_fail; + } if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: @@ -30940,1698 +30075,1422 @@ fail: } -SWIGINTERN PyObject *_wrap_engine_free(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_sn2nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"obj_sn2nid",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_free" "', argument " "1"" of type '" "ENGINE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_sn2nid" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (ENGINE *)(argp1); + arg1 = (char *)(buf1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ENGINE_free(arg1); + result = (int)OBJ_sn2nid((char const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_engine_init(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_txt2nid(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; int result; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"obj_txt2nid",1,1,&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_init" "', argument " "1"" of type '" "ENGINE *""'"); - } - arg1 = (ENGINE *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)ENGINE_init(arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_finish(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_finish" "', argument " "1"" of type '" "ENGINE *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_txt2nid" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (ENGINE *)(argp1); + arg1 = (char *)(buf1); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ENGINE_finish(arg1); + result = (int)OBJ_txt2nid((char const *)arg1); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_engine_get_id(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_get_id" "', argument " "1"" of type '" "ENGINE const *""'"); - } - arg1 = (ENGINE *)(argp1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (char *)ENGINE_get_id((ENGINE const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_get_name(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_txt2obj(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; + char *arg1 = (char *) 0 ; + int arg2 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + ASN1_OBJECT *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"obj_txt2obj",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_get_name" "', argument " "1"" of type '" "ENGINE const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_txt2obj" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (ENGINE *)(argp1); + arg1 = (char *)(buf1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "obj_txt2obj" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); { if (!arg1) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (char *)ENGINE_get_name((ENGINE const *)arg1); - resultobj = SWIG_FromCharPtr((const char *)result); + result = (ASN1_OBJECT *)OBJ_txt2obj((char const *)arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_engine_ctrl_cmd_string(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap__obj_obj2txt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + char *arg1 = (char *) 0 ; + int arg2 ; + ASN1_OBJECT *arg3 = (ASN1_OBJECT *) 0 ; int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; int val4 ; int ecode4 = 0 ; - PyObject *swig_obj[4] ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; int result; - if (!SWIG_Python_UnpackTuple(args, "engine_ctrl_cmd_string", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"_obj_obj2txt",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_ctrl_cmd_string" "', argument " "1"" of type '" "ENGINE *""'"); - } - arg1 = (ENGINE *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_ctrl_cmd_string" "', argument " "2"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_obj_obj2txt" "', argument " "1"" of type '" "char *""'"); } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3); + arg1 = (char *)(buf1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_obj_obj2txt" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "engine_ctrl_cmd_string" "', argument " "3"" of type '" "char const *""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_obj_obj2txt" "', argument " "3"" of type '" "ASN1_OBJECT const *""'"); } - arg3 = (char *)(buf3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + arg3 = (ASN1_OBJECT *)(argp3); + ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "engine_ctrl_cmd_string" "', argument " "4"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_obj_obj2txt" "', argument " "4"" of type '" "int""'"); } arg4 = (int)(val4); { - if (!arg1) { + if (!arg3) { SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); } } - result = (int)ENGINE_ctrl_cmd_string(arg1,(char const *)arg2,(char const *)arg3,arg4); + result = (int)OBJ_obj2txt(arg1,arg2,(ASN1_OBJECT const *)arg3,arg4); { resultobj=PyLong_FromLong(result); if (PyErr_Occurred()) SWIG_fail; } - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ui_openssl(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - UI_METHOD *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "ui_openssl", 0, 0, 0)) SWIG_fail; - result = (UI_METHOD *)UI_OpenSSL(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UI_METHOD, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap__cbd_t_password_set(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_obj_obj2txt(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - _cbd_t *arg1 = (_cbd_t *) 0 ; - char *arg2 = (char *) 0 ; + ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject *result = 0 ; - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); + if(!PyArg_UnpackTuple(args,(char *)"obj_obj2txt",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_password_set" "', argument " "1"" of type '" "_cbd_t *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_obj2txt" "', argument " "1"" of type '" "ASN1_OBJECT const *""'"); } - arg1 = (_cbd_t *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_cbd_t_password_set" "', argument " "2"" of type '" "char *""'"); + arg1 = (ASN1_OBJECT *)(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "obj_obj2txt" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + { + if (!arg1) { + SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); + } } - arg2 = (char *)(buf2); - if (arg1->password) free((char*)arg1->password); - if (arg2) { - size_t size = strlen((const char *)(arg2)) + 1; - arg1->password = (char *)(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); - } else { - arg1->password = 0; + result = (PyObject *)obj_obj2txt((ASN1_OBJECT const *)arg1,arg2); + { + resultobj=result; } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } -SWIGINTERN PyObject *_wrap__cbd_t_password_get(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - _cbd_t *arg1 = (_cbd_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "_cbd_t_password_get", 0, 0, 0)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_password_get" "', argument " "1"" of type '" "_cbd_t *""'"); - } - arg1 = (_cbd_t *)(argp1); - result = (char *) ((arg1)->password); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} +static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, + { (char *)"sk_num", _wrap_sk_num, METH_VARARGS, NULL}, + { (char *)"sk_value", _wrap_sk_value, METH_VARARGS, NULL}, + { (char *)"sk_set", _wrap_sk_set, METH_VARARGS, NULL}, + { (char *)"sk_new", _wrap_sk_new, METH_VARARGS, NULL}, + { (char *)"sk_new_null", _wrap_sk_new_null, METH_VARARGS, NULL}, + { (char *)"sk_free", _wrap_sk_free, METH_VARARGS, NULL}, + { (char *)"sk_pop_free", _wrap_sk_pop_free, METH_VARARGS, NULL}, + { (char *)"sk_deep_copy", _wrap_sk_deep_copy, METH_VARARGS, NULL}, + { (char *)"sk_insert", _wrap_sk_insert, METH_VARARGS, NULL}, + { (char *)"sk_delete", _wrap_sk_delete, METH_VARARGS, NULL}, + { (char *)"sk_delete_ptr", _wrap_sk_delete_ptr, METH_VARARGS, NULL}, + { (char *)"sk_find", _wrap_sk_find, METH_VARARGS, NULL}, + { (char *)"sk_find_ex", _wrap_sk_find_ex, METH_VARARGS, NULL}, + { (char *)"sk_push", _wrap_sk_push, METH_VARARGS, NULL}, + { (char *)"sk_unshift", _wrap_sk_unshift, METH_VARARGS, NULL}, + { (char *)"sk_shift", _wrap_sk_shift, METH_VARARGS, NULL}, + { (char *)"sk_pop", _wrap_sk_pop, METH_VARARGS, NULL}, + { (char *)"sk_zero", _wrap_sk_zero, METH_VARARGS, NULL}, + { (char *)"sk_set_cmp_func", _wrap_sk_set_cmp_func, METH_VARARGS, NULL}, + { (char *)"sk_dup", _wrap_sk_dup, METH_VARARGS, NULL}, + { (char *)"sk_sort", _wrap_sk_sort, METH_VARARGS, NULL}, + { (char *)"sk_is_sorted", _wrap_sk_is_sorted, METH_VARARGS, NULL}, + { (char *)"threading_init", _wrap_threading_init, METH_VARARGS, NULL}, + { (char *)"threading_cleanup", _wrap_threading_cleanup, METH_VARARGS, NULL}, + { (char *)"lib_init", _wrap_lib_init, METH_VARARGS, NULL}, + { (char *)"bn_to_mpi", _wrap_bn_to_mpi, METH_VARARGS, NULL}, + { (char *)"mpi_to_bn", _wrap_mpi_to_bn, METH_VARARGS, NULL}, + { (char *)"bn_to_bin", _wrap_bn_to_bin, METH_VARARGS, NULL}, + { (char *)"bin_to_bn", _wrap_bin_to_bn, METH_VARARGS, NULL}, + { (char *)"bn_to_hex", _wrap_bn_to_hex, METH_VARARGS, NULL}, + { (char *)"hex_to_bn", _wrap_hex_to_bn, METH_VARARGS, NULL}, + { (char *)"dec_to_bn", _wrap_dec_to_bn, METH_VARARGS, NULL}, + { (char *)"err_print_errors", _wrap_err_print_errors, METH_VARARGS, NULL}, + { (char *)"err_get_error", _wrap_err_get_error, METH_VARARGS, NULL}, + { (char *)"err_peek_error", _wrap_err_peek_error, METH_VARARGS, NULL}, + { (char *)"err_lib_error_string", _wrap_err_lib_error_string, METH_VARARGS, NULL}, + { (char *)"err_func_error_string", _wrap_err_func_error_string, METH_VARARGS, NULL}, + { (char *)"err_reason_error_string", _wrap_err_reason_error_string, METH_VARARGS, NULL}, + { (char *)"bio_s_bio", _wrap_bio_s_bio, METH_VARARGS, NULL}, + { (char *)"bio_s_mem", _wrap_bio_s_mem, METH_VARARGS, NULL}, + { (char *)"bio_s_socket", _wrap_bio_s_socket, METH_VARARGS, NULL}, + { (char *)"bio_f_ssl", _wrap_bio_f_ssl, METH_VARARGS, NULL}, + { (char *)"bio_f_buffer", _wrap_bio_f_buffer, METH_VARARGS, NULL}, + { (char *)"bio_f_cipher", _wrap_bio_f_cipher, METH_VARARGS, NULL}, + { (char *)"bio_new", _wrap_bio_new, METH_VARARGS, NULL}, + { (char *)"bio_new_socket", _wrap_bio_new_socket, METH_VARARGS, NULL}, + { (char *)"bio_free_all", _wrap_bio_free_all, METH_VARARGS, NULL}, + { (char *)"bio_dup_chain", _wrap_bio_dup_chain, METH_VARARGS, NULL}, + { (char *)"bio_push", _wrap_bio_push, METH_VARARGS, NULL}, + { (char *)"bio_pop", _wrap_bio_pop, METH_VARARGS, NULL}, + { (char *)"bio_eof", _wrap_bio_eof, METH_VARARGS, NULL}, + { (char *)"pyfd_init", _wrap_pyfd_init, METH_VARARGS, NULL}, + { (char *)"bio_init", _wrap_bio_init, METH_VARARGS, NULL}, + { (char *)"bio_free", _wrap_bio_free, METH_VARARGS, NULL}, + { (char *)"bio_new_file", _wrap_bio_new_file, METH_VARARGS, NULL}, + { (char *)"bio_new_pyfile", _wrap_bio_new_pyfile, METH_VARARGS, NULL}, + { (char *)"bio_read", _wrap_bio_read, METH_VARARGS, NULL}, + { (char *)"bio_gets", _wrap_bio_gets, METH_VARARGS, NULL}, + { (char *)"bio_write", _wrap_bio_write, METH_VARARGS, NULL}, + { (char *)"bio_ctrl_pending", _wrap_bio_ctrl_pending, METH_VARARGS, NULL}, + { (char *)"bio_ctrl_wpending", _wrap_bio_ctrl_wpending, METH_VARARGS, NULL}, + { (char *)"bio_ctrl_get_write_guarantee", _wrap_bio_ctrl_get_write_guarantee, METH_VARARGS, NULL}, + { (char *)"bio_reset", _wrap_bio_reset, METH_VARARGS, NULL}, + { (char *)"bio_flush", _wrap_bio_flush, METH_VARARGS, NULL}, + { (char *)"bio_seek", _wrap_bio_seek, METH_VARARGS, NULL}, + { (char *)"bio_tell", _wrap_bio_tell, METH_VARARGS, NULL}, + { (char *)"bio_set_flags", _wrap_bio_set_flags, METH_VARARGS, NULL}, + { (char *)"bio_get_flags", _wrap_bio_get_flags, METH_VARARGS, NULL}, + { (char *)"bio_set_cipher", _wrap_bio_set_cipher, METH_VARARGS, NULL}, + { (char *)"bio_set_mem_eof_return", _wrap_bio_set_mem_eof_return, METH_VARARGS, NULL}, + { (char *)"bio_get_fd", _wrap_bio_get_fd, METH_VARARGS, NULL}, + { (char *)"bio_do_handshake", _wrap_bio_do_handshake, METH_VARARGS, NULL}, + { (char *)"bio_make_bio_pair", _wrap_bio_make_bio_pair, METH_VARARGS, NULL}, + { (char *)"bio_set_write_buf_size", _wrap_bio_set_write_buf_size, METH_VARARGS, NULL}, + { (char *)"bio_should_retry", _wrap_bio_should_retry, METH_VARARGS, NULL}, + { (char *)"bio_should_read", _wrap_bio_should_read, METH_VARARGS, NULL}, + { (char *)"bio_should_write", _wrap_bio_should_write, METH_VARARGS, NULL}, + { (char *)"BIO_meth_new", _wrap_BIO_meth_new, METH_VARARGS, NULL}, + { (char *)"BIO_meth_free", _wrap_BIO_meth_free, METH_VARARGS, NULL}, + { (char *)"pyfd_write", _wrap_pyfd_write, METH_VARARGS, NULL}, + { (char *)"pyfd_read", _wrap_pyfd_read, METH_VARARGS, NULL}, + { (char *)"pyfd_puts", _wrap_pyfd_puts, METH_VARARGS, NULL}, + { (char *)"pyfd_gets", _wrap_pyfd_gets, METH_VARARGS, NULL}, + { (char *)"pyfd_new", _wrap_pyfd_new, METH_VARARGS, NULL}, + { (char *)"pyfd_free", _wrap_pyfd_free, METH_VARARGS, NULL}, + { (char *)"pyfd_ctrl", _wrap_pyfd_ctrl, METH_VARARGS, NULL}, + { (char *)"bio_new_pyfd", _wrap_bio_new_pyfd, METH_VARARGS, NULL}, + { (char *)"bn_rand", _wrap_bn_rand, METH_VARARGS, NULL}, + { (char *)"bn_rand_range", _wrap_bn_rand_range, METH_VARARGS, NULL}, + { (char *)"rand_load_file", _wrap_rand_load_file, METH_VARARGS, NULL}, + { (char *)"rand_save_file", _wrap_rand_save_file, METH_VARARGS, NULL}, + { (char *)"rand_poll", _wrap_rand_poll, METH_VARARGS, NULL}, + { (char *)"rand_status", _wrap_rand_status, METH_VARARGS, NULL}, + { (char *)"rand_cleanup", _wrap_rand_cleanup, METH_VARARGS, NULL}, + { (char *)"rand_init", _wrap_rand_init, METH_VARARGS, NULL}, + { (char *)"rand_seed", _wrap_rand_seed, METH_VARARGS, NULL}, + { (char *)"rand_add", _wrap_rand_add, METH_VARARGS, NULL}, + { (char *)"rand_bytes", _wrap_rand_bytes, METH_VARARGS, NULL}, + { (char *)"rand_pseudo_bytes", _wrap_rand_pseudo_bytes, METH_VARARGS, NULL}, + { (char *)"rand_file_name", _wrap_rand_file_name, METH_VARARGS, NULL}, + { (char *)"rand_screen", _wrap_rand_screen, METH_VARARGS, NULL}, + { (char *)"rand_win32_event", _wrap_rand_win32_event, METH_VARARGS, NULL}, + { (char *)"md5", _wrap_md5, METH_VARARGS, NULL}, + { (char *)"sha1", _wrap_sha1, METH_VARARGS, NULL}, + { (char *)"ripemd160", _wrap_ripemd160, METH_VARARGS, NULL}, + { (char *)"sha224", _wrap_sha224, METH_VARARGS, NULL}, + { (char *)"sha256", _wrap_sha256, METH_VARARGS, NULL}, + { (char *)"sha384", _wrap_sha384, METH_VARARGS, NULL}, + { (char *)"sha512", _wrap_sha512, METH_VARARGS, NULL}, + { (char *)"digest_init", _wrap_digest_init, METH_VARARGS, NULL}, + { (char *)"des_ecb", _wrap_des_ecb, METH_VARARGS, NULL}, + { (char *)"des_ede_ecb", _wrap_des_ede_ecb, METH_VARARGS, NULL}, + { (char *)"des_ede3_ecb", _wrap_des_ede3_ecb, METH_VARARGS, NULL}, + { (char *)"des_cbc", _wrap_des_cbc, METH_VARARGS, NULL}, + { (char *)"des_ede_cbc", _wrap_des_ede_cbc, METH_VARARGS, NULL}, + { (char *)"des_ede3_cbc", _wrap_des_ede3_cbc, METH_VARARGS, NULL}, + { (char *)"des_cfb", _wrap_des_cfb, METH_VARARGS, NULL}, + { (char *)"des_ede_cfb", _wrap_des_ede_cfb, METH_VARARGS, NULL}, + { (char *)"des_ede3_cfb", _wrap_des_ede3_cfb, METH_VARARGS, NULL}, + { (char *)"des_ofb", _wrap_des_ofb, METH_VARARGS, NULL}, + { (char *)"des_ede_ofb", _wrap_des_ede_ofb, METH_VARARGS, NULL}, + { (char *)"des_ede3_ofb", _wrap_des_ede3_ofb, METH_VARARGS, NULL}, + { (char *)"bf_ecb", _wrap_bf_ecb, METH_VARARGS, NULL}, + { (char *)"bf_cbc", _wrap_bf_cbc, METH_VARARGS, NULL}, + { (char *)"bf_cfb", _wrap_bf_cfb, METH_VARARGS, NULL}, + { (char *)"bf_ofb", _wrap_bf_ofb, METH_VARARGS, NULL}, + { (char *)"cast5_ecb", _wrap_cast5_ecb, METH_VARARGS, NULL}, + { (char *)"cast5_cbc", _wrap_cast5_cbc, METH_VARARGS, NULL}, + { (char *)"cast5_cfb", _wrap_cast5_cfb, METH_VARARGS, NULL}, + { (char *)"cast5_ofb", _wrap_cast5_ofb, METH_VARARGS, NULL}, + { (char *)"rc4", _wrap_rc4, METH_VARARGS, NULL}, + { (char *)"rc2_40_cbc", _wrap_rc2_40_cbc, METH_VARARGS, NULL}, + { (char *)"aes_128_ecb", _wrap_aes_128_ecb, METH_VARARGS, NULL}, + { (char *)"aes_128_cbc", _wrap_aes_128_cbc, METH_VARARGS, NULL}, + { (char *)"aes_128_cfb", _wrap_aes_128_cfb, METH_VARARGS, NULL}, + { (char *)"aes_128_ofb", _wrap_aes_128_ofb, METH_VARARGS, NULL}, + { (char *)"aes_128_ctr", _wrap_aes_128_ctr, METH_VARARGS, NULL}, + { (char *)"aes_192_ecb", _wrap_aes_192_ecb, METH_VARARGS, NULL}, + { (char *)"aes_192_cbc", _wrap_aes_192_cbc, METH_VARARGS, NULL}, + { (char *)"aes_192_cfb", _wrap_aes_192_cfb, METH_VARARGS, NULL}, + { (char *)"aes_192_ofb", _wrap_aes_192_ofb, METH_VARARGS, NULL}, + { (char *)"aes_192_ctr", _wrap_aes_192_ctr, METH_VARARGS, NULL}, + { (char *)"aes_256_ecb", _wrap_aes_256_ecb, METH_VARARGS, NULL}, + { (char *)"aes_256_cbc", _wrap_aes_256_cbc, METH_VARARGS, NULL}, + { (char *)"aes_256_cfb", _wrap_aes_256_cfb, METH_VARARGS, NULL}, + { (char *)"aes_256_ofb", _wrap_aes_256_ofb, METH_VARARGS, NULL}, + { (char *)"aes_256_ctr", _wrap_aes_256_ctr, METH_VARARGS, NULL}, + { (char *)"cipher_set_padding", _wrap_cipher_set_padding, METH_VARARGS, NULL}, + { (char *)"pkey_free", _wrap_pkey_free, METH_VARARGS, NULL}, + { (char *)"pkey_assign", _wrap_pkey_assign, METH_VARARGS, NULL}, + { (char *)"pkey_assign_ec", _wrap_pkey_assign_ec, METH_VARARGS, NULL}, + { (char *)"pkey_set1_rsa", _wrap_pkey_set1_rsa, METH_VARARGS, NULL}, + { (char *)"sign_init", _wrap_sign_init, METH_VARARGS, NULL}, + { (char *)"verify_init", _wrap_verify_init, METH_VARARGS, NULL}, + { (char *)"pkey_size", _wrap_pkey_size, METH_VARARGS, NULL}, + { (char *)"evp_init", _wrap_evp_init, METH_VARARGS, NULL}, + { (char *)"pkey_get1_rsa", _wrap_pkey_get1_rsa, METH_VARARGS, NULL}, + { (char *)"pkcs5_pbkdf2_hmac_sha1", _wrap_pkcs5_pbkdf2_hmac_sha1, METH_VARARGS, NULL}, + { (char *)"md_ctx_new", _wrap_md_ctx_new, METH_VARARGS, NULL}, + { (char *)"md_ctx_free", _wrap_md_ctx_free, METH_VARARGS, NULL}, + { (char *)"digest_update", _wrap_digest_update, METH_VARARGS, NULL}, + { (char *)"digest_final", _wrap_digest_final, METH_VARARGS, NULL}, + { (char *)"hmac_ctx_new", _wrap_hmac_ctx_new, METH_VARARGS, NULL}, + { (char *)"hmac_ctx_free", _wrap_hmac_ctx_free, METH_VARARGS, NULL}, + { (char *)"hmac_init", _wrap_hmac_init, METH_VARARGS, NULL}, + { (char *)"hmac_update", _wrap_hmac_update, METH_VARARGS, NULL}, + { (char *)"hmac_final", _wrap_hmac_final, METH_VARARGS, NULL}, + { (char *)"hmac", _wrap_hmac, METH_VARARGS, NULL}, + { (char *)"cipher_ctx_new", _wrap_cipher_ctx_new, METH_VARARGS, NULL}, + { (char *)"cipher_ctx_free", _wrap_cipher_ctx_free, METH_VARARGS, NULL}, + { (char *)"bytes_to_key", _wrap_bytes_to_key, METH_VARARGS, NULL}, + { (char *)"cipher_init", _wrap_cipher_init, METH_VARARGS, NULL}, + { (char *)"cipher_update", _wrap_cipher_update, METH_VARARGS, NULL}, + { (char *)"cipher_final", _wrap_cipher_final, METH_VARARGS, NULL}, + { (char *)"sign_update", _wrap_sign_update, METH_VARARGS, NULL}, + { (char *)"sign_final", _wrap_sign_final, METH_VARARGS, NULL}, + { (char *)"verify_update", _wrap_verify_update, METH_VARARGS, NULL}, + { (char *)"verify_final", _wrap_verify_final, METH_VARARGS, NULL}, + { (char *)"digest_sign_init", _wrap_digest_sign_init, METH_VARARGS, NULL}, + { (char *)"digest_sign_update", _wrap_digest_sign_update, METH_VARARGS, NULL}, + { (char *)"digest_sign_final", _wrap_digest_sign_final, METH_VARARGS, NULL}, + { (char *)"digest_verify_init", _wrap_digest_verify_init, METH_VARARGS, NULL}, + { (char *)"digest_verify_update", _wrap_digest_verify_update, METH_VARARGS, NULL}, + { (char *)"digest_verify_final", _wrap_digest_verify_final, METH_VARARGS, NULL}, + { (char *)"get_digestbyname", _wrap_get_digestbyname, METH_VARARGS, NULL}, + { (char *)"pkey_write_pem_no_cipher", _wrap_pkey_write_pem_no_cipher, METH_VARARGS, NULL}, + { (char *)"pkey_write_pem", _wrap_pkey_write_pem, METH_VARARGS, NULL}, + { (char *)"pkey_new", _wrap_pkey_new, METH_VARARGS, NULL}, + { (char *)"pkey_read_pem", _wrap_pkey_read_pem, METH_VARARGS, NULL}, + { (char *)"pkey_read_pem_pubkey", _wrap_pkey_read_pem_pubkey, METH_VARARGS, NULL}, + { (char *)"pkey_assign_rsa", _wrap_pkey_assign_rsa, METH_VARARGS, NULL}, + { (char *)"pkey_as_der", _wrap_pkey_as_der, METH_VARARGS, NULL}, + { (char *)"pkey_get_modulus", _wrap_pkey_get_modulus, METH_VARARGS, NULL}, + { (char *)"aes_new", _wrap_aes_new, METH_VARARGS, NULL}, + { (char *)"AES_free", _wrap_AES_free, METH_VARARGS, NULL}, + { (char *)"AES_set_key", _wrap_AES_set_key, METH_VARARGS, NULL}, + { (char *)"AES_crypt", _wrap_AES_crypt, METH_VARARGS, NULL}, + { (char *)"AES_type_check", _wrap_AES_type_check, METH_VARARGS, NULL}, + { (char *)"rc4_new", _wrap_rc4_new, METH_VARARGS, NULL}, + { (char *)"rc4_free", _wrap_rc4_free, METH_VARARGS, NULL}, + { (char *)"rc4_set_key", _wrap_rc4_set_key, METH_VARARGS, NULL}, + { (char *)"rc4_update", _wrap_rc4_update, METH_VARARGS, NULL}, + { (char *)"rc4_type_check", _wrap_rc4_type_check, METH_VARARGS, NULL}, + { (char *)"dh_new", _wrap_dh_new, METH_VARARGS, NULL}, + { (char *)"dh_free", _wrap_dh_free, METH_VARARGS, NULL}, + { (char *)"dh_size", _wrap_dh_size, METH_VARARGS, NULL}, + { (char *)"dh_generate_key", _wrap_dh_generate_key, METH_VARARGS, NULL}, + { (char *)"dhparams_print", _wrap_dhparams_print, METH_VARARGS, NULL}, + { (char *)"dh_init", _wrap_dh_init, METH_VARARGS, NULL}, + { (char *)"dh_type_check", _wrap_dh_type_check, METH_VARARGS, NULL}, + { (char *)"dh_read_parameters", _wrap_dh_read_parameters, METH_VARARGS, NULL}, + { (char *)"dh_generate_parameters", _wrap_dh_generate_parameters, METH_VARARGS, NULL}, + { (char *)"dh_check", _wrap_dh_check, METH_VARARGS, NULL}, + { (char *)"dh_compute_key", _wrap_dh_compute_key, METH_VARARGS, NULL}, + { (char *)"dh_get_p", _wrap_dh_get_p, METH_VARARGS, NULL}, + { (char *)"dh_get_g", _wrap_dh_get_g, METH_VARARGS, NULL}, + { (char *)"dh_get_pub", _wrap_dh_get_pub, METH_VARARGS, NULL}, + { (char *)"dh_get_priv", _wrap_dh_get_priv, METH_VARARGS, NULL}, + { (char *)"dh_set_pg", _wrap_dh_set_pg, METH_VARARGS, NULL}, + { (char *)"rsa_size", _wrap_rsa_size, METH_VARARGS, NULL}, + { (char *)"rsa_new", _wrap_rsa_new, METH_VARARGS, NULL}, + { (char *)"rsa_free", _wrap_rsa_free, METH_VARARGS, NULL}, + { (char *)"rsa_check_key", _wrap_rsa_check_key, METH_VARARGS, NULL}, + { (char *)"rsa_init", _wrap_rsa_init, METH_VARARGS, NULL}, + { (char *)"rsa_read_key", _wrap_rsa_read_key, METH_VARARGS, NULL}, + { (char *)"rsa_write_key", _wrap_rsa_write_key, METH_VARARGS, NULL}, + { (char *)"rsa_write_key_no_cipher", _wrap_rsa_write_key_no_cipher, METH_VARARGS, NULL}, + { (char *)"rsa_read_pub_key", _wrap_rsa_read_pub_key, METH_VARARGS, NULL}, + { (char *)"rsa_write_pub_key", _wrap_rsa_write_pub_key, METH_VARARGS, NULL}, + { (char *)"rsa_get_e", _wrap_rsa_get_e, METH_VARARGS, NULL}, + { (char *)"rsa_get_n", _wrap_rsa_get_n, METH_VARARGS, NULL}, + { (char *)"rsa_set_e", _wrap_rsa_set_e, METH_VARARGS, NULL}, + { (char *)"rsa_set_n", _wrap_rsa_set_n, METH_VARARGS, NULL}, + { (char *)"rsa_set_en", _wrap_rsa_set_en, METH_VARARGS, NULL}, + { (char *)"PyObject_Bin_AsBIGNUM", _wrap_PyObject_Bin_AsBIGNUM, METH_VARARGS, NULL}, + { (char *)"rsa_set_en_bin", _wrap_rsa_set_en_bin, METH_VARARGS, NULL}, + { (char *)"rsa_private_encrypt", _wrap_rsa_private_encrypt, METH_VARARGS, NULL}, + { (char *)"rsa_public_decrypt", _wrap_rsa_public_decrypt, METH_VARARGS, NULL}, + { (char *)"rsa_public_encrypt", _wrap_rsa_public_encrypt, METH_VARARGS, NULL}, + { (char *)"rsa_private_decrypt", _wrap_rsa_private_decrypt, METH_VARARGS, NULL}, + { (char *)"rsa_padding_add_pkcs1_pss", _wrap_rsa_padding_add_pkcs1_pss, METH_VARARGS, NULL}, + { (char *)"rsa_verify_pkcs1_pss", _wrap_rsa_verify_pkcs1_pss, METH_VARARGS, NULL}, + { (char *)"rsa_sign", _wrap_rsa_sign, METH_VARARGS, NULL}, + { (char *)"rsa_verify", _wrap_rsa_verify, METH_VARARGS, NULL}, + { (char *)"rsa_generate_key", _wrap_rsa_generate_key, METH_VARARGS, NULL}, + { (char *)"rsa_type_check", _wrap_rsa_type_check, METH_VARARGS, NULL}, + { (char *)"rsa_check_pub_key", _wrap_rsa_check_pub_key, METH_VARARGS, NULL}, + { (char *)"rsa_write_key_der", _wrap_rsa_write_key_der, METH_VARARGS, NULL}, + { (char *)"dsa_new", _wrap_dsa_new, METH_VARARGS, NULL}, + { (char *)"dsa_free", _wrap_dsa_free, METH_VARARGS, NULL}, + { (char *)"dsa_size", _wrap_dsa_size, METH_VARARGS, NULL}, + { (char *)"dsa_gen_key", _wrap_dsa_gen_key, METH_VARARGS, NULL}, + { (char *)"dsa_init", _wrap_dsa_init, METH_VARARGS, NULL}, + { (char *)"dsa_generate_parameters", _wrap_dsa_generate_parameters, METH_VARARGS, NULL}, + { (char *)"dsa_read_params", _wrap_dsa_read_params, METH_VARARGS, NULL}, + { (char *)"dsa_read_key", _wrap_dsa_read_key, METH_VARARGS, NULL}, + { (char *)"dsa_read_pub_key", _wrap_dsa_read_pub_key, METH_VARARGS, NULL}, + { (char *)"dsa_get_p", _wrap_dsa_get_p, METH_VARARGS, NULL}, + { (char *)"dsa_get_q", _wrap_dsa_get_q, METH_VARARGS, NULL}, + { (char *)"dsa_get_g", _wrap_dsa_get_g, METH_VARARGS, NULL}, + { (char *)"dsa_get_pub", _wrap_dsa_get_pub, METH_VARARGS, NULL}, + { (char *)"dsa_get_priv", _wrap_dsa_get_priv, METH_VARARGS, NULL}, + { (char *)"dsa_set_pqg", _wrap_dsa_set_pqg, METH_VARARGS, NULL}, + { (char *)"dsa_set_pub", _wrap_dsa_set_pub, METH_VARARGS, NULL}, + { (char *)"dsa_write_params_bio", _wrap_dsa_write_params_bio, METH_VARARGS, NULL}, + { (char *)"dsa_write_key_bio", _wrap_dsa_write_key_bio, METH_VARARGS, NULL}, + { (char *)"dsa_write_key_bio_no_cipher", _wrap_dsa_write_key_bio_no_cipher, METH_VARARGS, NULL}, + { (char *)"dsa_write_pub_key_bio", _wrap_dsa_write_pub_key_bio, METH_VARARGS, NULL}, + { (char *)"dsa_sign", _wrap_dsa_sign, METH_VARARGS, NULL}, + { (char *)"dsa_verify", _wrap_dsa_verify, METH_VARARGS, NULL}, + { (char *)"dsa_sign_asn1", _wrap_dsa_sign_asn1, METH_VARARGS, NULL}, + { (char *)"dsa_verify_asn1", _wrap_dsa_verify_asn1, METH_VARARGS, NULL}, + { (char *)"dsa_check_key", _wrap_dsa_check_key, METH_VARARGS, NULL}, + { (char *)"dsa_check_pub_key", _wrap_dsa_check_pub_key, METH_VARARGS, NULL}, + { (char *)"dsa_keylen", _wrap_dsa_keylen, METH_VARARGS, NULL}, + { (char *)"dsa_type_check", _wrap_dsa_type_check, METH_VARARGS, NULL}, + { (char *)"ssl_get_ciphers", _wrap_ssl_get_ciphers, METH_VARARGS, NULL}, + { (char *)"ssl_get_version", _wrap_ssl_get_version, METH_VARARGS, NULL}, + { (char *)"ssl_get_error", _wrap_ssl_get_error, METH_VARARGS, NULL}, + { (char *)"ssl_get_state", _wrap_ssl_get_state, METH_VARARGS, NULL}, + { (char *)"ssl_get_state_v", _wrap_ssl_get_state_v, METH_VARARGS, NULL}, + { (char *)"ssl_get_alert_type", _wrap_ssl_get_alert_type, METH_VARARGS, NULL}, + { (char *)"ssl_get_alert_type_v", _wrap_ssl_get_alert_type_v, METH_VARARGS, NULL}, + { (char *)"ssl_get_alert_desc", _wrap_ssl_get_alert_desc, METH_VARARGS, NULL}, + { (char *)"ssl_get_alert_desc_v", _wrap_ssl_get_alert_desc_v, METH_VARARGS, NULL}, + { (char *)"sslv23_method", _wrap_sslv23_method, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_new", _wrap_ssl_ctx_new, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_free", _wrap_ssl_ctx_free, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_verify_depth", _wrap_ssl_ctx_set_verify_depth, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_get_verify_depth", _wrap_ssl_ctx_get_verify_depth, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_get_verify_mode", _wrap_ssl_ctx_get_verify_mode, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_cipher_list", _wrap_ssl_ctx_set_cipher_list, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_add_session", _wrap_ssl_ctx_add_session, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_remove_session", _wrap_ssl_ctx_remove_session, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_session_timeout", _wrap_ssl_ctx_set_session_timeout, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_get_session_timeout", _wrap_ssl_ctx_get_session_timeout, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_get_cert_store", _wrap_ssl_ctx_get_cert_store, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_default_verify_paths", _wrap_ssl_ctx_set_default_verify_paths, METH_VARARGS, NULL}, + { (char *)"ssl_get_ex_data_x509_store_ctx_idx", _wrap_ssl_get_ex_data_x509_store_ctx_idx, METH_VARARGS, NULL}, + { (char *)"bio_new_ssl", _wrap_bio_new_ssl, METH_VARARGS, NULL}, + { (char *)"ssl_new", _wrap_ssl_new, METH_VARARGS, NULL}, + { (char *)"ssl_free", _wrap_ssl_free, METH_VARARGS, NULL}, + { (char *)"ssl_dup", _wrap_ssl_dup, METH_VARARGS, NULL}, + { (char *)"ssl_set_bio", _wrap_ssl_set_bio, METH_VARARGS, NULL}, + { (char *)"ssl_set_accept_state", _wrap_ssl_set_accept_state, METH_VARARGS, NULL}, + { (char *)"ssl_set_connect_state", _wrap_ssl_set_connect_state, METH_VARARGS, NULL}, + { (char *)"ssl_get_shutdown", _wrap_ssl_get_shutdown, METH_VARARGS, NULL}, + { (char *)"ssl_set_shutdown", _wrap_ssl_set_shutdown, METH_VARARGS, NULL}, + { (char *)"ssl_shutdown", _wrap_ssl_shutdown, METH_VARARGS, NULL}, + { (char *)"ssl_clear", _wrap_ssl_clear, METH_VARARGS, NULL}, + { (char *)"ssl_do_handshake", _wrap_ssl_do_handshake, METH_VARARGS, NULL}, + { (char *)"ssl_renegotiate", _wrap_ssl_renegotiate, METH_VARARGS, NULL}, + { (char *)"ssl_pending", _wrap_ssl_pending, METH_VARARGS, NULL}, + { (char *)"ssl_get_peer_cert", _wrap_ssl_get_peer_cert, METH_VARARGS, NULL}, + { (char *)"ssl_get_current_cipher", _wrap_ssl_get_current_cipher, METH_VARARGS, NULL}, + { (char *)"ssl_get_verify_mode", _wrap_ssl_get_verify_mode, METH_VARARGS, NULL}, + { (char *)"ssl_get_verify_depth", _wrap_ssl_get_verify_depth, METH_VARARGS, NULL}, + { (char *)"ssl_get_verify_result", _wrap_ssl_get_verify_result, METH_VARARGS, NULL}, + { (char *)"ssl_get_ssl_ctx", _wrap_ssl_get_ssl_ctx, METH_VARARGS, NULL}, + { (char *)"ssl_get_default_session_timeout", _wrap_ssl_get_default_session_timeout, METH_VARARGS, NULL}, + { (char *)"ssl_set_cipher_list", _wrap_ssl_set_cipher_list, METH_VARARGS, NULL}, + { (char *)"ssl_get_cipher_list", _wrap_ssl_get_cipher_list, METH_VARARGS, NULL}, + { (char *)"ssl_cipher_get_name", _wrap_ssl_cipher_get_name, METH_VARARGS, NULL}, + { (char *)"ssl_cipher_get_version", _wrap_ssl_cipher_get_version, METH_VARARGS, NULL}, + { (char *)"ssl_get_session", _wrap_ssl_get_session, METH_VARARGS, NULL}, + { (char *)"ssl_get1_session", _wrap_ssl_get1_session, METH_VARARGS, NULL}, + { (char *)"ssl_set_session", _wrap_ssl_set_session, METH_VARARGS, NULL}, + { (char *)"ssl_session_free", _wrap_ssl_session_free, METH_VARARGS, NULL}, + { (char *)"ssl_session_print", _wrap_ssl_session_print, METH_VARARGS, NULL}, + { (char *)"ssl_session_set_timeout", _wrap_ssl_session_set_timeout, METH_VARARGS, NULL}, + { (char *)"ssl_session_get_timeout", _wrap_ssl_session_get_timeout, METH_VARARGS, NULL}, + { (char *)"ssl_accept", _wrap_ssl_accept, METH_VARARGS, NULL}, + { (char *)"ssl_connect", _wrap_ssl_connect, METH_VARARGS, NULL}, + { (char *)"ssl_read", _wrap_ssl_read, METH_VARARGS, NULL}, + { (char *)"ssl_write", _wrap_ssl_write, METH_VARARGS, NULL}, + { (char *)"ssl_init", _wrap_ssl_init, METH_VARARGS, NULL}, + { (char *)"tlsv1_method", _wrap_tlsv1_method, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_passphrase_callback", _wrap_ssl_ctx_passphrase_callback, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_use_x509", _wrap_ssl_ctx_use_x509, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_use_cert", _wrap_ssl_ctx_use_cert, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_use_cert_chain", _wrap_ssl_ctx_use_cert_chain, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_use_privkey", _wrap_ssl_ctx_use_privkey, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_use_rsa_privkey", _wrap_ssl_ctx_use_rsa_privkey, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_use_pkey_privkey", _wrap_ssl_ctx_use_pkey_privkey, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_check_privkey", _wrap_ssl_ctx_check_privkey, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_client_CA_list_from_file", _wrap_ssl_ctx_set_client_CA_list_from_file, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_verify_default", _wrap_ssl_ctx_set_verify_default, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_verify", _wrap_ssl_ctx_set_verify, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_session_id_context", _wrap_ssl_ctx_set_session_id_context, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_info_callback", _wrap_ssl_ctx_set_info_callback, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_tmp_dh", _wrap_ssl_ctx_set_tmp_dh, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_tmp_dh_callback", _wrap_ssl_ctx_set_tmp_dh_callback, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_tmp_rsa", _wrap_ssl_ctx_set_tmp_rsa, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_tmp_rsa_callback", _wrap_ssl_ctx_set_tmp_rsa_callback, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_load_verify_locations", _wrap_ssl_ctx_load_verify_locations, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_options", _wrap_ssl_ctx_set_options, METH_VARARGS, NULL}, + { (char *)"bio_set_ssl", _wrap_bio_set_ssl, METH_VARARGS, NULL}, + { (char *)"ssl_set_mode", _wrap_ssl_set_mode, METH_VARARGS, NULL}, + { (char *)"ssl_get_mode", _wrap_ssl_get_mode, METH_VARARGS, NULL}, + { (char *)"ssl_set_tlsext_host_name", _wrap_ssl_set_tlsext_host_name, METH_VARARGS, NULL}, + { (char *)"ssl_set_client_CA_list_from_file", _wrap_ssl_set_client_CA_list_from_file, METH_VARARGS, NULL}, + { (char *)"ssl_set_client_CA_list_from_context", _wrap_ssl_set_client_CA_list_from_context, METH_VARARGS, NULL}, + { (char *)"ssl_set_session_id_context", _wrap_ssl_set_session_id_context, METH_VARARGS, NULL}, + { (char *)"ssl_set_fd", _wrap_ssl_set_fd, METH_VARARGS, NULL}, + { (char *)"ssl_set_shutdown1", _wrap_ssl_set_shutdown1, METH_VARARGS, NULL}, + { (char *)"ssl_read_nbio", _wrap_ssl_read_nbio, METH_VARARGS, NULL}, + { (char *)"ssl_write_nbio", _wrap_ssl_write_nbio, METH_VARARGS, NULL}, + { (char *)"ssl_cipher_get_bits", _wrap_ssl_cipher_get_bits, METH_VARARGS, NULL}, + { (char *)"sk_ssl_cipher_num", _wrap_sk_ssl_cipher_num, METH_VARARGS, NULL}, + { (char *)"sk_ssl_cipher_value", _wrap_sk_ssl_cipher_value, METH_VARARGS, NULL}, + { (char *)"ssl_get_peer_cert_chain", _wrap_ssl_get_peer_cert_chain, METH_VARARGS, NULL}, + { (char *)"sk_x509_num", _wrap_sk_x509_num, METH_VARARGS, NULL}, + { (char *)"sk_x509_value", _wrap_sk_x509_value, METH_VARARGS, NULL}, + { (char *)"i2d_ssl_session", _wrap_i2d_ssl_session, METH_VARARGS, NULL}, + { (char *)"ssl_session_read_pem", _wrap_ssl_session_read_pem, METH_VARARGS, NULL}, + { (char *)"ssl_session_write_pem", _wrap_ssl_session_write_pem, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_session_cache_mode", _wrap_ssl_ctx_set_session_cache_mode, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_get_session_cache_mode", _wrap_ssl_ctx_get_session_cache_mode, METH_VARARGS, NULL}, + { (char *)"ssl_ctx_set_cache_size", _wrap_ssl_ctx_set_cache_size, METH_VARARGS, NULL}, + { (char *)"ssl_is_init_finished", _wrap_ssl_is_init_finished, METH_VARARGS, NULL}, + { (char *)"x509_check_ca", _wrap_x509_check_ca, METH_VARARGS, NULL}, + { (char *)"x509_new", _wrap_x509_new, METH_VARARGS, NULL}, + { (char *)"x509_dup", _wrap_x509_dup, METH_VARARGS, NULL}, + { (char *)"x509_free", _wrap_x509_free, METH_VARARGS, NULL}, + { (char *)"x509_crl_free", _wrap_x509_crl_free, METH_VARARGS, NULL}, + { (char *)"x509_crl_new", _wrap_x509_crl_new, METH_VARARGS, NULL}, + { (char *)"x509_print", _wrap_x509_print, METH_VARARGS, NULL}, + { (char *)"x509_crl_print", _wrap_x509_crl_print, METH_VARARGS, NULL}, + { (char *)"x509_get_serial_number", _wrap_x509_get_serial_number, METH_VARARGS, NULL}, + { (char *)"x509_set_serial_number", _wrap_x509_set_serial_number, METH_VARARGS, NULL}, + { (char *)"x509_get_pubkey", _wrap_x509_get_pubkey, METH_VARARGS, NULL}, + { (char *)"x509_set_pubkey", _wrap_x509_set_pubkey, METH_VARARGS, NULL}, + { (char *)"x509_get_issuer_name", _wrap_x509_get_issuer_name, METH_VARARGS, NULL}, + { (char *)"x509_set_issuer_name", _wrap_x509_set_issuer_name, METH_VARARGS, NULL}, + { (char *)"x509_get_subject_name", _wrap_x509_get_subject_name, METH_VARARGS, NULL}, + { (char *)"x509_set_subject_name", _wrap_x509_set_subject_name, METH_VARARGS, NULL}, + { (char *)"x509_cmp_current_time", _wrap_x509_cmp_current_time, METH_VARARGS, NULL}, + { (char *)"x509_check_purpose", _wrap_x509_check_purpose, METH_VARARGS, NULL}, + { (char *)"x509_check_trust", _wrap_x509_check_trust, METH_VARARGS, NULL}, + { (char *)"x509_write_pem", _wrap_x509_write_pem, METH_VARARGS, NULL}, + { (char *)"x509_write_pem_file", _wrap_x509_write_pem_file, METH_VARARGS, NULL}, + { (char *)"x509_verify", _wrap_x509_verify, METH_VARARGS, NULL}, + { (char *)"x509_get_verify_error", _wrap_x509_get_verify_error, METH_VARARGS, NULL}, + { (char *)"x509_add_ext", _wrap_x509_add_ext, METH_VARARGS, NULL}, + { (char *)"x509_get_ext_count", _wrap_x509_get_ext_count, METH_VARARGS, NULL}, + { (char *)"x509_get_ext", _wrap_x509_get_ext, METH_VARARGS, NULL}, + { (char *)"x509_ext_print", _wrap_x509_ext_print, METH_VARARGS, NULL}, + { (char *)"x509_name_new", _wrap_x509_name_new, METH_VARARGS, NULL}, + { (char *)"x509_name_free", _wrap_x509_name_free, METH_VARARGS, NULL}, + { (char *)"x509_name_print", _wrap_x509_name_print, METH_VARARGS, NULL}, + { (char *)"x509_name_get_entry", _wrap_x509_name_get_entry, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_count", _wrap_x509_name_entry_count, METH_VARARGS, NULL}, + { (char *)"x509_name_delete_entry", _wrap_x509_name_delete_entry, METH_VARARGS, NULL}, + { (char *)"x509_name_add_entry", _wrap_x509_name_add_entry, METH_VARARGS, NULL}, + { (char *)"x509_name_add_entry_by_obj", _wrap_x509_name_add_entry_by_obj, METH_VARARGS, NULL}, + { (char *)"x509_name_add_entry_by_nid", _wrap_x509_name_add_entry_by_nid, METH_VARARGS, NULL}, + { (char *)"x509_name_print_ex", _wrap_x509_name_print_ex, METH_VARARGS, NULL}, + { (char *)"x509_name_hash", _wrap_x509_name_hash, METH_VARARGS, NULL}, + { (char *)"x509_name_get_index_by_nid", _wrap_x509_name_get_index_by_nid, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_new", _wrap_x509_name_entry_new, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_free", _wrap_x509_name_entry_free, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_create_by_nid", _wrap_x509_name_entry_create_by_nid, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_set_object", _wrap_x509_name_entry_set_object, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_get_object", _wrap_x509_name_entry_get_object, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_get_data", _wrap_x509_name_entry_get_data, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_set_data", _wrap_x509_name_entry_set_data, METH_VARARGS, NULL}, + { (char *)"x509_req_new", _wrap_x509_req_new, METH_VARARGS, NULL}, + { (char *)"x509_req_free", _wrap_x509_req_free, METH_VARARGS, NULL}, + { (char *)"x509_req_print", _wrap_x509_req_print, METH_VARARGS, NULL}, + { (char *)"x509_req_get_pubkey", _wrap_x509_req_get_pubkey, METH_VARARGS, NULL}, + { (char *)"x509_req_set_pubkey", _wrap_x509_req_set_pubkey, METH_VARARGS, NULL}, + { (char *)"x509_req_set_subject_name", _wrap_x509_req_set_subject_name, METH_VARARGS, NULL}, + { (char *)"x509_req_verify", _wrap_x509_req_verify, METH_VARARGS, NULL}, + { (char *)"x509_req_sign", _wrap_x509_req_sign, METH_VARARGS, NULL}, + { (char *)"i2d_x509_bio", _wrap_i2d_x509_bio, METH_VARARGS, NULL}, + { (char *)"i2d_x509_req_bio", _wrap_i2d_x509_req_bio, METH_VARARGS, NULL}, + { (char *)"x509_store_new", _wrap_x509_store_new, METH_VARARGS, NULL}, + { (char *)"x509_store_free", _wrap_x509_store_free, METH_VARARGS, NULL}, + { (char *)"x509_store_add_cert", _wrap_x509_store_add_cert, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_get_current_cert", _wrap_x509_store_ctx_get_current_cert, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_get_error", _wrap_x509_store_ctx_get_error, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_get_error_depth", _wrap_x509_store_ctx_get_error_depth, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_free", _wrap_x509_store_ctx_free, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_get1_chain", _wrap_x509_store_ctx_get1_chain, METH_VARARGS, NULL}, + { (char *)"x509_extension_get_critical", _wrap_x509_extension_get_critical, METH_VARARGS, NULL}, + { (char *)"x509_extension_set_critical", _wrap_x509_extension_set_critical, METH_VARARGS, NULL}, + { (char *)"x509_store_set_flags", _wrap_x509_store_set_flags, METH_VARARGS, NULL}, + { (char *)"x509_read_pem", _wrap_x509_read_pem, METH_VARARGS, NULL}, + { (char *)"d2i_x509", _wrap_d2i_x509, METH_VARARGS, NULL}, + { (char *)"x509_init", _wrap_x509_init, METH_VARARGS, NULL}, + { (char *)"d2i_x509_req", _wrap_d2i_x509_req, METH_VARARGS, NULL}, + { (char *)"x509_req_read_pem", _wrap_x509_req_read_pem, METH_VARARGS, NULL}, + { (char *)"i2d_x509", _wrap_i2d_x509, METH_VARARGS, NULL}, + { (char *)"x509_req_write_pem", _wrap_x509_req_write_pem, METH_VARARGS, NULL}, + { (char *)"x509_crl_read_pem", _wrap_x509_crl_read_pem, METH_VARARGS, NULL}, + { (char *)"x509_set_version", _wrap_x509_set_version, METH_VARARGS, NULL}, + { (char *)"x509_get_version", _wrap_x509_get_version, METH_VARARGS, NULL}, + { (char *)"x509_set_not_before", _wrap_x509_set_not_before, METH_VARARGS, NULL}, + { (char *)"x509_get_not_before", _wrap_x509_get_not_before, METH_VARARGS, NULL}, + { (char *)"x509_set_not_after", _wrap_x509_set_not_after, METH_VARARGS, NULL}, + { (char *)"x509_get_not_after", _wrap_x509_get_not_after, METH_VARARGS, NULL}, + { (char *)"x509_sign", _wrap_x509_sign, METH_VARARGS, NULL}, + { (char *)"x509_gmtime_adj", _wrap_x509_gmtime_adj, METH_VARARGS, NULL}, + { (char *)"x509_name_by_nid", _wrap_x509_name_by_nid, METH_VARARGS, NULL}, + { (char *)"x509_name_set_by_nid", _wrap_x509_name_set_by_nid, METH_VARARGS, NULL}, + { (char *)"x509_name_add_entry_by_txt", _wrap_x509_name_add_entry_by_txt, METH_VARARGS, NULL}, + { (char *)"x509_name_get_der", _wrap_x509_name_get_der, METH_VARARGS, NULL}, + { (char *)"sk_x509_free", _wrap_sk_x509_free, METH_VARARGS, NULL}, + { (char *)"sk_x509_push", _wrap_sk_x509_push, METH_VARARGS, NULL}, + { (char *)"sk_x509_pop", _wrap_sk_x509_pop, METH_VARARGS, NULL}, + { (char *)"x509_store_load_locations", _wrap_x509_store_load_locations, METH_VARARGS, NULL}, + { (char *)"x509_type_check", _wrap_x509_type_check, METH_VARARGS, NULL}, + { (char *)"x509_name_type_check", _wrap_x509_name_type_check, METH_VARARGS, NULL}, + { (char *)"x509_req_get_subject_name", _wrap_x509_req_get_subject_name, METH_VARARGS, NULL}, + { (char *)"x509_req_get_version", _wrap_x509_req_get_version, METH_VARARGS, NULL}, + { (char *)"x509_req_set_version", _wrap_x509_req_set_version, METH_VARARGS, NULL}, + { (char *)"x509_req_add_extensions", _wrap_x509_req_add_extensions, METH_VARARGS, NULL}, + { (char *)"x509_name_entry_create_by_txt", _wrap_x509_name_entry_create_by_txt, METH_VARARGS, NULL}, + { (char *)"x509v3_set_nconf", _wrap_x509v3_set_nconf, METH_VARARGS, NULL}, + { (char *)"x509v3_ext_conf", _wrap_x509v3_ext_conf, METH_VARARGS, NULL}, + { (char *)"x509_extension_free", _wrap_x509_extension_free, METH_VARARGS, NULL}, + { (char *)"x509_extension_get_name", _wrap_x509_extension_get_name, METH_VARARGS, NULL}, + { (char *)"sk_x509_extension_new_null", _wrap_sk_x509_extension_new_null, METH_VARARGS, NULL}, + { (char *)"sk_x509_extension_free", _wrap_sk_x509_extension_free, METH_VARARGS, NULL}, + { (char *)"sk_x509_extension_push", _wrap_sk_x509_extension_push, METH_VARARGS, NULL}, + { (char *)"sk_x509_extension_pop", _wrap_sk_x509_extension_pop, METH_VARARGS, NULL}, + { (char *)"sk_x509_extension_num", _wrap_sk_x509_extension_num, METH_VARARGS, NULL}, + { (char *)"sk_x509_extension_value", _wrap_sk_x509_extension_value, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_get_app_data", _wrap_x509_store_ctx_get_app_data, METH_VARARGS, NULL}, + { (char *)"x509_store_ctx_get_ex_data", _wrap_x509_store_ctx_get_ex_data, METH_VARARGS, NULL}, + { (char *)"x509_store_set_verify_cb", _wrap_x509_store_set_verify_cb, METH_VARARGS, NULL}, + { (char *)"make_stack_from_der_sequence", _wrap_make_stack_from_der_sequence, METH_VARARGS, NULL}, + { (char *)"sk_x509_new_null", _wrap_sk_x509_new_null, METH_VARARGS, NULL}, + { (char *)"get_der_encoding_stack", _wrap_get_der_encoding_stack, METH_VARARGS, NULL}, + { (char *)"x509_name_oneline", _wrap_x509_name_oneline, METH_VARARGS, NULL}, + { (char *)"asn1_object_new", _wrap_asn1_object_new, METH_VARARGS, NULL}, + { (char *)"asn1_object_create", _wrap_asn1_object_create, METH_VARARGS, NULL}, + { (char *)"asn1_object_free", _wrap_asn1_object_free, METH_VARARGS, NULL}, + { (char *)"i2d_asn1_object", _wrap_i2d_asn1_object, METH_VARARGS, NULL}, + { (char *)"d2i_asn1_object", _wrap_d2i_asn1_object, METH_VARARGS, NULL}, + { (char *)"asn1_bit_string_new", _wrap_asn1_bit_string_new, METH_VARARGS, NULL}, + { (char *)"asn1_string_new", _wrap_asn1_string_new, METH_VARARGS, NULL}, + { (char *)"asn1_string_free", _wrap_asn1_string_free, METH_VARARGS, NULL}, + { (char *)"asn1_string_set", _wrap_asn1_string_set, METH_VARARGS, NULL}, + { (char *)"asn1_string_print", _wrap_asn1_string_print, METH_VARARGS, NULL}, + { (char *)"asn1_string_print_ex", _wrap_asn1_string_print_ex, METH_VARARGS, NULL}, + { (char *)"asn1_time_new", _wrap_asn1_time_new, METH_VARARGS, NULL}, + { (char *)"asn1_time_free", _wrap_asn1_time_free, METH_VARARGS, NULL}, + { (char *)"asn1_time_check", _wrap_asn1_time_check, METH_VARARGS, NULL}, + { (char *)"asn1_time_set", _wrap_asn1_time_set, METH_VARARGS, NULL}, + { (char *)"asn1_time_set_string", _wrap_asn1_time_set_string, METH_VARARGS, NULL}, + { (char *)"asn1_time_print", _wrap_asn1_time_print, METH_VARARGS, NULL}, + { (char *)"asn1_integer_new", _wrap_asn1_integer_new, METH_VARARGS, NULL}, + { (char *)"asn1_integer_free", _wrap_asn1_integer_free, METH_VARARGS, NULL}, + { (char *)"asn1_integer_cmp", _wrap_asn1_integer_cmp, METH_VARARGS, NULL}, + { (char *)"asn1_time_type_check", _wrap_asn1_time_type_check, METH_VARARGS, NULL}, + { (char *)"asn1_integer_get", _wrap_asn1_integer_get, METH_VARARGS, NULL}, + { (char *)"asn1_integer_set", _wrap_asn1_integer_set, METH_VARARGS, NULL}, + { (char *)"pkcs7_new", _wrap_pkcs7_new, METH_VARARGS, NULL}, + { (char *)"pkcs7_free", _wrap_pkcs7_free, METH_VARARGS, NULL}, + { (char *)"pkcs7_add_certificate", _wrap_pkcs7_add_certificate, METH_VARARGS, NULL}, + { (char *)"pkcs7_init", _wrap_pkcs7_init, METH_VARARGS, NULL}, + { (char *)"smime_init", _wrap_smime_init, METH_VARARGS, NULL}, + { (char *)"pkcs7_decrypt", _wrap_pkcs7_decrypt, METH_VARARGS, NULL}, + { (char *)"pkcs7_encrypt", _wrap_pkcs7_encrypt, METH_VARARGS, NULL}, + { (char *)"pkcs7_sign1", _wrap_pkcs7_sign1, METH_VARARGS, NULL}, + { (char *)"pkcs7_sign0", _wrap_pkcs7_sign0, METH_VARARGS, NULL}, + { (char *)"pkcs7_read_bio", _wrap_pkcs7_read_bio, METH_VARARGS, NULL}, + { (char *)"pkcs7_read_bio_der", _wrap_pkcs7_read_bio_der, METH_VARARGS, NULL}, + { (char *)"pkcs7_verify1", _wrap_pkcs7_verify1, METH_VARARGS, NULL}, + { (char *)"pkcs7_verify0", _wrap_pkcs7_verify0, METH_VARARGS, NULL}, + { (char *)"smime_write_pkcs7_multi", _wrap_smime_write_pkcs7_multi, METH_VARARGS, NULL}, + { (char *)"smime_write_pkcs7", _wrap_smime_write_pkcs7, METH_VARARGS, NULL}, + { (char *)"smime_read_pkcs7", _wrap_smime_read_pkcs7, METH_VARARGS, NULL}, + { (char *)"pkcs7_write_bio", _wrap_pkcs7_write_bio, METH_VARARGS, NULL}, + { (char *)"pkcs7_write_bio_der", _wrap_pkcs7_write_bio_der, METH_VARARGS, NULL}, + { (char *)"pkcs7_type_nid", _wrap_pkcs7_type_nid, METH_VARARGS, NULL}, + { (char *)"pkcs7_type_sn", _wrap_pkcs7_type_sn, METH_VARARGS, NULL}, + { (char *)"smime_crlf_copy", _wrap_smime_crlf_copy, METH_VARARGS, NULL}, + { (char *)"pkcs7_get0_signers", _wrap_pkcs7_get0_signers, METH_VARARGS, NULL}, + { (char *)"util_init", _wrap_util_init, METH_VARARGS, NULL}, + { (char *)"util_hex_to_string", _wrap_util_hex_to_string, METH_VARARGS, NULL}, + { (char *)"util_string_to_hex", _wrap_util_string_to_hex, METH_VARARGS, NULL}, + { (char *)"ec_key_new", _wrap_ec_key_new, METH_VARARGS, NULL}, + { (char *)"ec_key_free", _wrap_ec_key_free, METH_VARARGS, NULL}, + { (char *)"ec_key_size", _wrap_ec_key_size, METH_VARARGS, NULL}, + { (char *)"ec_key_gen_key", _wrap_ec_key_gen_key, METH_VARARGS, NULL}, + { (char *)"ec_key_check_key", _wrap_ec_key_check_key, METH_VARARGS, NULL}, + { (char *)"ec_init", _wrap_ec_init, METH_VARARGS, NULL}, + { (char *)"ec_get_builtin_curves", _wrap_ec_get_builtin_curves, METH_VARARGS, NULL}, + { (char *)"ec_key_new_by_curve_name", _wrap_ec_key_new_by_curve_name, METH_VARARGS, NULL}, + { (char *)"ec_key_get_public_der", _wrap_ec_key_get_public_der, METH_VARARGS, NULL}, + { (char *)"ec_key_get_public_key", _wrap_ec_key_get_public_key, METH_VARARGS, NULL}, + { (char *)"ec_key_read_pubkey", _wrap_ec_key_read_pubkey, METH_VARARGS, NULL}, + { (char *)"ec_key_write_pubkey", _wrap_ec_key_write_pubkey, METH_VARARGS, NULL}, + { (char *)"ec_key_read_bio", _wrap_ec_key_read_bio, METH_VARARGS, NULL}, + { (char *)"ec_key_write_bio", _wrap_ec_key_write_bio, METH_VARARGS, NULL}, + { (char *)"ec_key_write_bio_no_cipher", _wrap_ec_key_write_bio_no_cipher, METH_VARARGS, NULL}, + { (char *)"ecdsa_sig_get_r", _wrap_ecdsa_sig_get_r, METH_VARARGS, NULL}, + { (char *)"ecdsa_sig_get_s", _wrap_ecdsa_sig_get_s, METH_VARARGS, NULL}, + { (char *)"ecdsa_sign", _wrap_ecdsa_sign, METH_VARARGS, NULL}, + { (char *)"ecdsa_verify", _wrap_ecdsa_verify, METH_VARARGS, NULL}, + { (char *)"ecdsa_sign_asn1", _wrap_ecdsa_sign_asn1, METH_VARARGS, NULL}, + { (char *)"ecdsa_verify_asn1", _wrap_ecdsa_verify_asn1, METH_VARARGS, NULL}, + { (char *)"ecdh_compute_key", _wrap_ecdh_compute_key, METH_VARARGS, NULL}, + { (char *)"ec_key_from_pubkey_der", _wrap_ec_key_from_pubkey_der, METH_VARARGS, NULL}, + { (char *)"ec_key_from_pubkey_params", _wrap_ec_key_from_pubkey_params, METH_VARARGS, NULL}, + { (char *)"ec_key_keylen", _wrap_ec_key_keylen, METH_VARARGS, NULL}, + { (char *)"ec_key_type_check", _wrap_ec_key_type_check, METH_VARARGS, NULL}, + { (char *)"engine_load_builtin_engines", _wrap_engine_load_builtin_engines, METH_VARARGS, NULL}, + { (char *)"engine_load_dynamic", _wrap_engine_load_dynamic, METH_VARARGS, NULL}, + { (char *)"engine_load_openssl", _wrap_engine_load_openssl, METH_VARARGS, NULL}, + { (char *)"engine_cleanup", _wrap_engine_cleanup, METH_VARARGS, NULL}, + { (char *)"engine_new", _wrap_engine_new, METH_VARARGS, NULL}, + { (char *)"engine_by_id", _wrap_engine_by_id, METH_VARARGS, NULL}, + { (char *)"engine_free", _wrap_engine_free, METH_VARARGS, NULL}, + { (char *)"engine_init", _wrap_engine_init, METH_VARARGS, NULL}, + { (char *)"engine_finish", _wrap_engine_finish, METH_VARARGS, NULL}, + { (char *)"engine_get_id", _wrap_engine_get_id, METH_VARARGS, NULL}, + { (char *)"engine_get_name", _wrap_engine_get_name, METH_VARARGS, NULL}, + { (char *)"engine_ctrl_cmd_string", _wrap_engine_ctrl_cmd_string, METH_VARARGS, NULL}, + { (char *)"ui_openssl", _wrap_ui_openssl, METH_VARARGS, NULL}, + { (char *)"engine_pkcs11_data_new", _wrap_engine_pkcs11_data_new, METH_VARARGS, NULL}, + { (char *)"engine_pkcs11_data_free", _wrap_engine_pkcs11_data_free, METH_VARARGS, NULL}, + { (char *)"engine_load_private_key", _wrap_engine_load_private_key, METH_VARARGS, NULL}, + { (char *)"engine_load_public_key", _wrap_engine_load_public_key, METH_VARARGS, NULL}, + { (char *)"engine_init_error", _wrap_engine_init_error, METH_VARARGS, NULL}, + { (char *)"engine_load_certificate", _wrap_engine_load_certificate, METH_VARARGS, NULL}, + { (char *)"engine_set_default", _wrap_engine_set_default, METH_VARARGS, NULL}, + { (char *)"obj_nid2obj", _wrap_obj_nid2obj, METH_VARARGS, NULL}, + { (char *)"obj_nid2ln", _wrap_obj_nid2ln, METH_VARARGS, NULL}, + { (char *)"obj_nid2sn", _wrap_obj_nid2sn, METH_VARARGS, NULL}, + { (char *)"obj_obj2nid", _wrap_obj_obj2nid, METH_VARARGS, NULL}, + { (char *)"obj_ln2nid", _wrap_obj_ln2nid, METH_VARARGS, NULL}, + { (char *)"obj_sn2nid", _wrap_obj_sn2nid, METH_VARARGS, NULL}, + { (char *)"obj_txt2nid", _wrap_obj_txt2nid, METH_VARARGS, NULL}, + { (char *)"obj_txt2obj", _wrap_obj_txt2obj, METH_VARARGS, NULL}, + { (char *)"_obj_obj2txt", _wrap__obj_obj2txt, METH_VARARGS, NULL}, + { (char *)"obj_obj2txt", _wrap_obj_obj2txt, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete__STACK) +static SwigPyGetSet _STACK_num_alloc_getset = { _wrap__STACK_num_alloc_get, _wrap__STACK_num_alloc_set }; +static SwigPyGetSet _STACK_data_getset = { _wrap__STACK_data_get, _wrap__STACK_data_set }; +static SwigPyGetSet _STACK_comp_getset = { _wrap__STACK_comp_get, _wrap__STACK_comp_set }; +static SwigPyGetSet _STACK_sorted_getset = { _wrap__STACK_sorted_get, _wrap__STACK_sorted_set }; +static SwigPyGetSet _STACK_num_getset = { _wrap__STACK_num_get, _wrap__STACK_num_set }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__stack_st_getset[] = { + { (char*) "num_alloc", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st.num_alloc", (void*) &_STACK_num_alloc_getset } +, + { (char*) "data", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st.data", (void*) &_STACK_data_getset } +, + { (char*) "comp", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st.comp", (void*) &_STACK_comp_getset } +, + { (char*) "sorted", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st.sorted", (void*) &_STACK_sorted_getset } +, + { (char*) "num", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st.num", (void*) &_STACK_num_getset } +, + {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ +}; -SWIGINTERN PyObject *_wrap__cbd_t_prompt_set(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - _cbd_t *arg1 = (_cbd_t *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_prompt_set" "', argument " "1"" of type '" "_cbd_t *""'"); - } - arg1 = (_cbd_t *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_cbd_t_prompt_set" "', argument " "2"" of type '" "char *""'"); - } - arg2 = (char *)(buf2); - if (arg1->prompt) free((char*)arg1->prompt); - if (arg2) { - size_t size = strlen((const char *)(arg2)) + 1; - arg1->prompt = (char *)(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); - } else { - arg1->prompt = 0; +SWIGINTERN PyObject * +SwigPyBuiltin__stack_st_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; + Py_DECREF(tuple); + return result; } +SWIGINTERN PyMethodDef SwigPyBuiltin__stack_st_methods[] = { + { NULL, NULL, 0, NULL } /* Sentinel */ +}; -SWIGINTERN PyObject *_wrap__cbd_t_prompt_get(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - _cbd_t *arg1 = (_cbd_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "_cbd_t_prompt_get", 0, 0, 0)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_cbd_t_prompt_get" "', argument " "1"" of type '" "_cbd_t *""'"); - } - arg1 = (_cbd_t *)(argp1); - result = (char *) ((arg1)->prompt); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN int _wrap_new__cbd_t(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - _cbd_t *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new__cbd_t")) SWIG_fail; - if (!SWIG_Python_UnpackTuple(args, "new__cbd_t", 0, 0, 0)) SWIG_fail; - result = (_cbd_t *)calloc(1, sizeof(_cbd_t)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__cbd_t, SWIG_BUILTIN_INIT | 0 ); - return resultobj == Py_None ? -1 : 0; -fail: - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete__cbd_t(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - _cbd_t *arg1 = (_cbd_t *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!SWIG_Python_UnpackTuple(args, "delete__cbd_t", 0, 0, 0)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__cbd_t, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete__cbd_t" "', argument " "1"" of type '" "_cbd_t *""'"); - } - arg1 = (_cbd_t *)(argp1); - free((char *) arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete__cbd_t) /* defines _wrap_delete__cbd_t_destructor_closure */ - -SWIGINTERN PyObject *_wrap_engine_pkcs11_data_new(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject *swig_obj[1] ; - void *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_pkcs11_data_new" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - result = (void *)engine_pkcs11_data_new((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_pkcs11_data_free(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - void *arg1 = (void *) 0 ; - int res1 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0],SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_pkcs11_data_free" "', argument " "1"" of type '" "void *""'"); - } - engine_pkcs11_data_free(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_load_private_key(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - char *arg2 = (char *) 0 ; - UI_METHOD *arg3 = (UI_METHOD *) 0 ; - void *arg4 = (void *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int res4 ; - PyObject *swig_obj[4] ; - EVP_PKEY *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "engine_load_private_key", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_load_private_key" "', argument " "1"" of type '" "ENGINE *""'"); - } - arg1 = (ENGINE *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_load_private_key" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_UI_METHOD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "engine_load_private_key" "', argument " "3"" of type '" "UI_METHOD *""'"); - } - arg3 = (UI_METHOD *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3],SWIG_as_voidptrptr(&arg4), 0, 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "engine_load_private_key" "', argument " "4"" of type '" "void *""'"); - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } +static PyHeapTypeObject SwigPyBuiltin__stack_st_type = { { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (EVP_PKEY *)ENGINE_load_private_key(arg1,(char const *)arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_load_public_key(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - char *arg2 = (char *) 0 ; - UI_METHOD *arg3 = (UI_METHOD *) 0 ; - void *arg4 = (void *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int res4 ; - PyObject *swig_obj[4] ; - EVP_PKEY *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "engine_load_public_key", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_load_public_key" "', argument " "1"" of type '" "ENGINE *""'"); - } - arg1 = (ENGINE *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_load_public_key" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_UI_METHOD, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "engine_load_public_key" "', argument " "3"" of type '" "UI_METHOD *""'"); - } - arg3 = (UI_METHOD *)(argp3); - res4 = SWIG_ConvertPtr(swig_obj[3],SWIG_as_voidptrptr(&arg4), 0, 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "engine_load_public_key" "', argument " "4"" of type '" "void *""'"); - } - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (EVP_PKEY *)ENGINE_load_public_key(arg1,(char const *)arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EVP_PKEY, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN int Swig_var__engine_err_set(PyObject *_val) { - { - void *argp = 0; - int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_PyObject, 0 ); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_engine_err""' of type '""PyObject *""'"); - } - _engine_err = (PyObject *)(argp); - } - return 0; -fail: - return 1; -} - - -SWIGINTERN PyObject *Swig_var__engine_err_get(void) { - PyObject *pyobj = 0; - PyObject *self = 0; - - (void)self; - pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(_engine_err), SWIGTYPE_p_PyObject, 0 ); - return pyobj; -} - - -SWIGINTERN PyObject *_wrap_engine_init_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - PyObject *arg1 = (PyObject *) 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - arg1=swig_obj[0]; - } - engine_init_error(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_load_certificate(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject *swig_obj[2] ; - X509 *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "engine_load_certificate", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_load_certificate" "', argument " "1"" of type '" "ENGINE *""'"); - } - arg1 = (ENGINE *)(argp1); - res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "engine_load_certificate" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "_STACK", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) _wrap_delete__STACK_closure, /* tp_dealloc */ + (printfunc) 0, /* tp_print */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__stack_st_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__stack_st_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__stack_st_type.as_mapping, /* tp_as_mapping */ + (hashfunc) 0, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__stack_st_type.as_buffer, /* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "::stack_st", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + (richcmpfunc) SwigPyBuiltin__stack_st_richcompare, /* feature:python:tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__stack_st_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__stack_st_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + (size_t)(((char*)&((SwigPyObject *) 64L)->dict) - (char*) 64L), /* tp_dictoffset */ + (initproc) _wrap_new__STACK, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject*) 0, /* tp_bases */ + (PyObject*) 0, /* tp_mro */ + (PyObject*) 0, /* tp_cache */ + (PyObject*) 0, /* tp_subclasses */ + (PyObject*) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ +#if PY_VERSION_HEX >= 0x02060000 + (int) 0, /* tp_version_tag */ +#endif + }, { - if (!arg2) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (X509 *)engine_load_certificate(arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_X509, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_engine_set_default(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ENGINE *arg1 = (ENGINE *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "engine_set_default", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ENGINE, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "engine_set_default" "', argument " "1"" of type '" "ENGINE *""'"); - } - arg1 = (ENGINE *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "engine_set_default" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ +#if PY_VERSION_HEX >= 0x02050000 + (unaryfunc) 0, /* nb_index */ +#endif + }, { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)ENGINE_set_default(arg1,arg2); + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_obj_nid2obj(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - ASN1_OBJECT *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "obj_nid2obj" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (ASN1_OBJECT *)OBJ_nid2obj(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ +#endif + }, + (PyObject*) 0, /* ht_name */ + (PyObject*) 0, /* ht_slots */ +}; -SWIGINTERN PyObject *_wrap_obj_nid2ln(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "obj_nid2ln" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (char *)OBJ_nid2ln(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} +SWIGINTERN SwigPyClientData SwigPyBuiltin__stack_st_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__stack_st_type}; +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_stack_st_OPENSSL_STRING) +static SwigPyGetSet stack_st_OPENSSL_STRING_stack_getset = { _wrap_stack_st_OPENSSL_STRING_stack_get, _wrap_stack_st_OPENSSL_STRING_stack_set }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__stack_st_OPENSSL_STRING_getset[] = { + { (char*) "stack", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st_OPENSSL_STRING.stack", (void*) &stack_st_OPENSSL_STRING_stack_getset } +, + {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ +}; -SWIGINTERN PyObject *_wrap_obj_nid2sn(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject *swig_obj[1] ; - char *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "obj_nid2sn" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); - result = (char *)OBJ_nid2sn(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; +SWIGINTERN PyObject * +SwigPyBuiltin__stack_st_OPENSSL_STRING_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; } +SWIGINTERN PyMethodDef SwigPyBuiltin__stack_st_OPENSSL_STRING_methods[] = { + { NULL, NULL, 0, NULL } /* Sentinel */ +}; -SWIGINTERN PyObject *_wrap_obj_obj2nid(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_obj2nid" "', argument " "1"" of type '" "ASN1_OBJECT const *""'"); - } - arg1 = (ASN1_OBJECT *)(argp1); +static PyHeapTypeObject SwigPyBuiltin__stack_st_OPENSSL_STRING_type = { { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)OBJ_obj2nid((ASN1_OBJECT const *)arg1); +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "stack_st_OPENSSL_STRING", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) _wrap_delete_stack_st_OPENSSL_STRING_closure, /* tp_dealloc */ + (printfunc) 0, /* tp_print */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__stack_st_OPENSSL_STRING_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__stack_st_OPENSSL_STRING_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__stack_st_OPENSSL_STRING_type.as_mapping, /* tp_as_mapping */ + (hashfunc) 0, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__stack_st_OPENSSL_STRING_type.as_buffer, /* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "::stack_st_OPENSSL_STRING", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + (richcmpfunc) SwigPyBuiltin__stack_st_OPENSSL_STRING_richcompare, /* feature:python:tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__stack_st_OPENSSL_STRING_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__stack_st_OPENSSL_STRING_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + (size_t)(((char*)&((SwigPyObject *) 64L)->dict) - (char*) 64L), /* tp_dictoffset */ + (initproc) _wrap_new_stack_st_OPENSSL_STRING, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject*) 0, /* tp_bases */ + (PyObject*) 0, /* tp_mro */ + (PyObject*) 0, /* tp_cache */ + (PyObject*) 0, /* tp_subclasses */ + (PyObject*) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ +#if PY_VERSION_HEX >= 0x02060000 + (int) 0, /* tp_version_tag */ +#endif + }, + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ +#if PY_VERSION_HEX >= 0x02050000 + (unaryfunc) 0, /* nb_index */ +#endif + }, { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_obj_ln2nid(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_ln2nid" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)OBJ_ln2nid((char const *)arg1); + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ +#endif + }, + (PyObject*) 0, /* ht_name */ + (PyObject*) 0, /* ht_slots */ +}; -SWIGINTERN PyObject *_wrap_obj_sn2nid(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_sn2nid" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)OBJ_sn2nid((char const *)arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} +SWIGINTERN SwigPyClientData SwigPyBuiltin__stack_st_OPENSSL_STRING_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__stack_st_OPENSSL_STRING_type}; +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_stack_st_OPENSSL_BLOCK) +static SwigPyGetSet stack_st_OPENSSL_BLOCK_stack_getset = { _wrap_stack_st_OPENSSL_BLOCK_stack_get, _wrap_stack_st_OPENSSL_BLOCK_stack_set }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__stack_st_OPENSSL_BLOCK_getset[] = { + { (char*) "stack", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"stack_st_OPENSSL_BLOCK.stack", (void*) &stack_st_OPENSSL_BLOCK_stack_getset } +, + {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ +}; -SWIGINTERN PyObject *_wrap_obj_txt2nid(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_txt2nid" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); +SWIGINTERN PyObject * +SwigPyBuiltin__stack_st_OPENSSL_BLOCK_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); } } - result = (int)OBJ_txt2nid((char const *)arg1); - { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; + Py_DECREF(tuple); + return result; } +SWIGINTERN PyMethodDef SwigPyBuiltin__stack_st_OPENSSL_BLOCK_methods[] = { + { NULL, NULL, 0, NULL } /* Sentinel */ +}; -SWIGINTERN PyObject *_wrap_obj_txt2obj(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int arg2 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - ASN1_OBJECT *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "obj_txt2obj", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_txt2obj" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "obj_txt2obj" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); +static PyHeapTypeObject SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type = { { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (ASN1_OBJECT *)OBJ_txt2obj((char const *)arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap__obj_obj2txt(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int arg2 ; - ASN1_OBJECT *arg3 = (ASN1_OBJECT *) 0 ; - int arg4 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject *swig_obj[4] ; - int result; - - if (!SWIG_Python_UnpackTuple(args, "_obj_obj2txt", 4, 4, swig_obj)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_obj_obj2txt" "', argument " "1"" of type '" "char *""'"); - } - arg1 = (char *)(buf1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_obj_obj2txt" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_obj_obj2txt" "', argument " "3"" of type '" "ASN1_OBJECT const *""'"); - } - arg3 = (ASN1_OBJECT *)(argp3); - ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_obj_obj2txt" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "stack_st_OPENSSL_BLOCK", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) _wrap_delete_stack_st_OPENSSL_BLOCK_closure, /* tp_dealloc */ + (printfunc) 0, /* tp_print */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type.as_mapping, /* tp_as_mapping */ + (hashfunc) 0, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type.as_buffer, /* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "::stack_st_OPENSSL_BLOCK", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + (richcmpfunc) SwigPyBuiltin__stack_st_OPENSSL_BLOCK_richcompare, /* feature:python:tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__stack_st_OPENSSL_BLOCK_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__stack_st_OPENSSL_BLOCK_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + (size_t)(((char*)&((SwigPyObject *) 64L)->dict) - (char*) 64L), /* tp_dictoffset */ + (initproc) _wrap_new_stack_st_OPENSSL_BLOCK, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject*) 0, /* tp_bases */ + (PyObject*) 0, /* tp_mro */ + (PyObject*) 0, /* tp_cache */ + (PyObject*) 0, /* tp_subclasses */ + (PyObject*) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ +#if PY_VERSION_HEX >= 0x02060000 + (int) 0, /* tp_version_tag */ +#endif + }, { - if (!arg3) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (int)OBJ_obj2txt(arg1,arg2,(ASN1_OBJECT const *)arg3,arg4); + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ +#if PY_VERSION_HEX >= 0x02050000 + (unaryfunc) 0, /* nb_index */ +#endif + }, { - resultobj=PyLong_FromLong(result); - if (PyErr_Occurred()) SWIG_fail; - } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_obj_obj2txt(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - ASN1_OBJECT *arg1 = (ASN1_OBJECT *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - PyObject *result = 0 ; - - if (!SWIG_Python_UnpackTuple(args, "obj_obj2txt", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ASN1_OBJECT, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj_obj2txt" "', argument " "1"" of type '" "ASN1_OBJECT const *""'"); - } - arg1 = (ASN1_OBJECT *)(argp1); - ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "obj_obj2txt" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, { - if (!arg1) { - SWIG_exception(SWIG_ValueError,"Received a NULL pointer."); - } - } - result = (PyObject *)obj_obj2txt((ASN1_OBJECT const *)arg1,arg2); + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void*) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, { - resultobj=result; - } - return resultobj; -fail: - return NULL; -} - - -static PyMethodDef SwigMethods[] = { - { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, - { "OPENSSL_sk_num", _wrap_OPENSSL_sk_num, METH_O, NULL}, - { "OPENSSL_sk_value", _wrap_OPENSSL_sk_value, METH_VARARGS, NULL}, - { "OPENSSL_sk_set", _wrap_OPENSSL_sk_set, METH_VARARGS, NULL}, - { "OPENSSL_sk_new", _wrap_OPENSSL_sk_new, METH_O, NULL}, - { "OPENSSL_sk_new_null", _wrap_OPENSSL_sk_new_null, METH_NOARGS, NULL}, - { "OPENSSL_sk_new_reserve", _wrap_OPENSSL_sk_new_reserve, METH_VARARGS, NULL}, - { "OPENSSL_sk_reserve", _wrap_OPENSSL_sk_reserve, METH_VARARGS, NULL}, - { "OPENSSL_sk_free", _wrap_OPENSSL_sk_free, METH_O, NULL}, - { "OPENSSL_sk_pop_free", _wrap_OPENSSL_sk_pop_free, METH_VARARGS, NULL}, - { "OPENSSL_sk_deep_copy", _wrap_OPENSSL_sk_deep_copy, METH_VARARGS, NULL}, - { "OPENSSL_sk_insert", _wrap_OPENSSL_sk_insert, METH_VARARGS, NULL}, - { "OPENSSL_sk_delete", _wrap_OPENSSL_sk_delete, METH_VARARGS, NULL}, - { "OPENSSL_sk_delete_ptr", _wrap_OPENSSL_sk_delete_ptr, METH_VARARGS, NULL}, - { "OPENSSL_sk_find", _wrap_OPENSSL_sk_find, METH_VARARGS, NULL}, - { "OPENSSL_sk_find_ex", _wrap_OPENSSL_sk_find_ex, METH_VARARGS, NULL}, - { "OPENSSL_sk_push", _wrap_OPENSSL_sk_push, METH_VARARGS, NULL}, - { "OPENSSL_sk_unshift", _wrap_OPENSSL_sk_unshift, METH_VARARGS, NULL}, - { "OPENSSL_sk_shift", _wrap_OPENSSL_sk_shift, METH_O, NULL}, - { "OPENSSL_sk_pop", _wrap_OPENSSL_sk_pop, METH_O, NULL}, - { "OPENSSL_sk_zero", _wrap_OPENSSL_sk_zero, METH_O, NULL}, - { "OPENSSL_sk_set_cmp_func", _wrap_OPENSSL_sk_set_cmp_func, METH_VARARGS, NULL}, - { "OPENSSL_sk_dup", _wrap_OPENSSL_sk_dup, METH_O, NULL}, - { "OPENSSL_sk_sort", _wrap_OPENSSL_sk_sort, METH_O, NULL}, - { "OPENSSL_sk_is_sorted", _wrap_OPENSSL_sk_is_sorted, METH_O, NULL}, - { "sk_OPENSSL_STRING_num", _wrap_sk_OPENSSL_STRING_num, METH_O, NULL}, - { "sk_OPENSSL_STRING_value", _wrap_sk_OPENSSL_STRING_value, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_new", _wrap_sk_OPENSSL_STRING_new, METH_O, NULL}, - { "sk_OPENSSL_STRING_new_null", _wrap_sk_OPENSSL_STRING_new_null, METH_NOARGS, NULL}, - { "sk_OPENSSL_STRING_new_reserve", _wrap_sk_OPENSSL_STRING_new_reserve, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_reserve", _wrap_sk_OPENSSL_STRING_reserve, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_free", _wrap_sk_OPENSSL_STRING_free, METH_O, NULL}, - { "sk_OPENSSL_STRING_zero", _wrap_sk_OPENSSL_STRING_zero, METH_O, NULL}, - { "sk_OPENSSL_STRING_delete", _wrap_sk_OPENSSL_STRING_delete, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_delete_ptr", _wrap_sk_OPENSSL_STRING_delete_ptr, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_push", _wrap_sk_OPENSSL_STRING_push, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_unshift", _wrap_sk_OPENSSL_STRING_unshift, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_pop", _wrap_sk_OPENSSL_STRING_pop, METH_O, NULL}, - { "sk_OPENSSL_STRING_shift", _wrap_sk_OPENSSL_STRING_shift, METH_O, NULL}, - { "sk_OPENSSL_STRING_pop_free", _wrap_sk_OPENSSL_STRING_pop_free, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_insert", _wrap_sk_OPENSSL_STRING_insert, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_set", _wrap_sk_OPENSSL_STRING_set, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_find", _wrap_sk_OPENSSL_STRING_find, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_find_ex", _wrap_sk_OPENSSL_STRING_find_ex, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_sort", _wrap_sk_OPENSSL_STRING_sort, METH_O, NULL}, - { "sk_OPENSSL_STRING_is_sorted", _wrap_sk_OPENSSL_STRING_is_sorted, METH_O, NULL}, - { "sk_OPENSSL_STRING_dup", _wrap_sk_OPENSSL_STRING_dup, METH_O, NULL}, - { "sk_OPENSSL_STRING_deep_copy", _wrap_sk_OPENSSL_STRING_deep_copy, METH_VARARGS, NULL}, - { "sk_OPENSSL_STRING_set_cmp_func", _wrap_sk_OPENSSL_STRING_set_cmp_func, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_num", _wrap_sk_OPENSSL_CSTRING_num, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_value", _wrap_sk_OPENSSL_CSTRING_value, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_new", _wrap_sk_OPENSSL_CSTRING_new, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_new_null", _wrap_sk_OPENSSL_CSTRING_new_null, METH_NOARGS, NULL}, - { "sk_OPENSSL_CSTRING_new_reserve", _wrap_sk_OPENSSL_CSTRING_new_reserve, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_reserve", _wrap_sk_OPENSSL_CSTRING_reserve, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_free", _wrap_sk_OPENSSL_CSTRING_free, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_zero", _wrap_sk_OPENSSL_CSTRING_zero, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_delete", _wrap_sk_OPENSSL_CSTRING_delete, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_delete_ptr", _wrap_sk_OPENSSL_CSTRING_delete_ptr, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_push", _wrap_sk_OPENSSL_CSTRING_push, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_unshift", _wrap_sk_OPENSSL_CSTRING_unshift, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_pop", _wrap_sk_OPENSSL_CSTRING_pop, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_shift", _wrap_sk_OPENSSL_CSTRING_shift, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_pop_free", _wrap_sk_OPENSSL_CSTRING_pop_free, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_insert", _wrap_sk_OPENSSL_CSTRING_insert, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_set", _wrap_sk_OPENSSL_CSTRING_set, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_find", _wrap_sk_OPENSSL_CSTRING_find, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_find_ex", _wrap_sk_OPENSSL_CSTRING_find_ex, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_sort", _wrap_sk_OPENSSL_CSTRING_sort, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_is_sorted", _wrap_sk_OPENSSL_CSTRING_is_sorted, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_dup", _wrap_sk_OPENSSL_CSTRING_dup, METH_O, NULL}, - { "sk_OPENSSL_CSTRING_deep_copy", _wrap_sk_OPENSSL_CSTRING_deep_copy, METH_VARARGS, NULL}, - { "sk_OPENSSL_CSTRING_set_cmp_func", _wrap_sk_OPENSSL_CSTRING_set_cmp_func, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_num", _wrap_sk_OPENSSL_BLOCK_num, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_value", _wrap_sk_OPENSSL_BLOCK_value, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_new", _wrap_sk_OPENSSL_BLOCK_new, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_new_null", _wrap_sk_OPENSSL_BLOCK_new_null, METH_NOARGS, NULL}, - { "sk_OPENSSL_BLOCK_new_reserve", _wrap_sk_OPENSSL_BLOCK_new_reserve, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_reserve", _wrap_sk_OPENSSL_BLOCK_reserve, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_free", _wrap_sk_OPENSSL_BLOCK_free, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_zero", _wrap_sk_OPENSSL_BLOCK_zero, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_delete", _wrap_sk_OPENSSL_BLOCK_delete, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_delete_ptr", _wrap_sk_OPENSSL_BLOCK_delete_ptr, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_push", _wrap_sk_OPENSSL_BLOCK_push, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_unshift", _wrap_sk_OPENSSL_BLOCK_unshift, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_pop", _wrap_sk_OPENSSL_BLOCK_pop, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_shift", _wrap_sk_OPENSSL_BLOCK_shift, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_pop_free", _wrap_sk_OPENSSL_BLOCK_pop_free, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_insert", _wrap_sk_OPENSSL_BLOCK_insert, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_set", _wrap_sk_OPENSSL_BLOCK_set, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_find", _wrap_sk_OPENSSL_BLOCK_find, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_find_ex", _wrap_sk_OPENSSL_BLOCK_find_ex, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_sort", _wrap_sk_OPENSSL_BLOCK_sort, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_is_sorted", _wrap_sk_OPENSSL_BLOCK_is_sorted, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_dup", _wrap_sk_OPENSSL_BLOCK_dup, METH_O, NULL}, - { "sk_OPENSSL_BLOCK_deep_copy", _wrap_sk_OPENSSL_BLOCK_deep_copy, METH_VARARGS, NULL}, - { "sk_OPENSSL_BLOCK_set_cmp_func", _wrap_sk_OPENSSL_BLOCK_set_cmp_func, METH_VARARGS, NULL}, - { "threading_init", _wrap_threading_init, METH_NOARGS, NULL}, - { "threading_cleanup", _wrap_threading_cleanup, METH_NOARGS, NULL}, - { "lib_init", _wrap_lib_init, METH_NOARGS, NULL}, - { "bn_to_mpi", _wrap_bn_to_mpi, METH_O, NULL}, - { "mpi_to_bn", _wrap_mpi_to_bn, METH_O, NULL}, - { "bn_to_bin", _wrap_bn_to_bin, METH_O, NULL}, - { "bin_to_bn", _wrap_bin_to_bn, METH_O, NULL}, - { "bn_to_hex", _wrap_bn_to_hex, METH_O, NULL}, - { "hex_to_bn", _wrap_hex_to_bn, METH_O, NULL}, - { "dec_to_bn", _wrap_dec_to_bn, METH_O, NULL}, - { "err_print_errors", _wrap_err_print_errors, METH_O, NULL}, - { "err_get_error", _wrap_err_get_error, METH_NOARGS, NULL}, - { "err_peek_error", _wrap_err_peek_error, METH_NOARGS, NULL}, - { "err_lib_error_string", _wrap_err_lib_error_string, METH_O, NULL}, - { "err_func_error_string", _wrap_err_func_error_string, METH_O, NULL}, - { "err_reason_error_string", _wrap_err_reason_error_string, METH_O, NULL}, - { "bio_s_bio", _wrap_bio_s_bio, METH_NOARGS, NULL}, - { "bio_s_mem", _wrap_bio_s_mem, METH_NOARGS, NULL}, - { "bio_s_socket", _wrap_bio_s_socket, METH_NOARGS, NULL}, - { "bio_f_ssl", _wrap_bio_f_ssl, METH_NOARGS, NULL}, - { "bio_f_buffer", _wrap_bio_f_buffer, METH_NOARGS, NULL}, - { "bio_f_cipher", _wrap_bio_f_cipher, METH_NOARGS, NULL}, - { "bio_new", _wrap_bio_new, METH_O, NULL}, - { "bio_new_socket", _wrap_bio_new_socket, METH_VARARGS, NULL}, - { "bio_free_all", _wrap_bio_free_all, METH_O, NULL}, - { "bio_dup_chain", _wrap_bio_dup_chain, METH_O, NULL}, - { "bio_push", _wrap_bio_push, METH_VARARGS, NULL}, - { "bio_pop", _wrap_bio_pop, METH_O, NULL}, - { "bio_eof", _wrap_bio_eof, METH_O, NULL}, - { "pyfd_init", _wrap_pyfd_init, METH_NOARGS, NULL}, - { "bio_init", _wrap_bio_init, METH_O, NULL}, - { "bio_free", _wrap_bio_free, METH_O, NULL}, - { "bio_new_file", _wrap_bio_new_file, METH_VARARGS, NULL}, - { "bio_new_pyfile", _wrap_bio_new_pyfile, METH_VARARGS, NULL}, - { "bio_read", _wrap_bio_read, METH_VARARGS, NULL}, - { "bio_gets", _wrap_bio_gets, METH_VARARGS, NULL}, - { "bio_write", _wrap_bio_write, METH_VARARGS, NULL}, - { "bio_ctrl_pending", _wrap_bio_ctrl_pending, METH_O, NULL}, - { "bio_ctrl_wpending", _wrap_bio_ctrl_wpending, METH_O, NULL}, - { "bio_ctrl_get_write_guarantee", _wrap_bio_ctrl_get_write_guarantee, METH_O, NULL}, - { "bio_reset", _wrap_bio_reset, METH_O, NULL}, - { "bio_flush", _wrap_bio_flush, METH_O, NULL}, - { "bio_seek", _wrap_bio_seek, METH_VARARGS, NULL}, - { "bio_tell", _wrap_bio_tell, METH_O, NULL}, - { "bio_set_flags", _wrap_bio_set_flags, METH_VARARGS, NULL}, - { "bio_get_flags", _wrap_bio_get_flags, METH_O, NULL}, - { "bio_set_cipher", _wrap_bio_set_cipher, METH_VARARGS, NULL}, - { "bio_set_mem_eof_return", _wrap_bio_set_mem_eof_return, METH_VARARGS, NULL}, - { "bio_get_fd", _wrap_bio_get_fd, METH_O, NULL}, - { "bio_do_handshake", _wrap_bio_do_handshake, METH_O, NULL}, - { "bio_make_bio_pair", _wrap_bio_make_bio_pair, METH_VARARGS, NULL}, - { "bio_set_write_buf_size", _wrap_bio_set_write_buf_size, METH_VARARGS, NULL}, - { "bio_should_retry", _wrap_bio_should_retry, METH_O, NULL}, - { "bio_should_read", _wrap_bio_should_read, METH_O, NULL}, - { "bio_should_write", _wrap_bio_should_write, METH_O, NULL}, - { "pyfd_write", _wrap_pyfd_write, METH_VARARGS, NULL}, - { "pyfd_read", _wrap_pyfd_read, METH_VARARGS, NULL}, - { "pyfd_puts", _wrap_pyfd_puts, METH_VARARGS, NULL}, - { "pyfd_gets", _wrap_pyfd_gets, METH_VARARGS, NULL}, - { "pyfd_new", _wrap_pyfd_new, METH_O, NULL}, - { "pyfd_free", _wrap_pyfd_free, METH_O, NULL}, - { "pyfd_ctrl", _wrap_pyfd_ctrl, METH_VARARGS, NULL}, - { "bio_new_pyfd", _wrap_bio_new_pyfd, METH_VARARGS, NULL}, - { "bn_rand", _wrap_bn_rand, METH_VARARGS, NULL}, - { "bn_rand_range", _wrap_bn_rand_range, METH_O, NULL}, - { "rand_load_file", _wrap_rand_load_file, METH_VARARGS, NULL}, - { "rand_save_file", _wrap_rand_save_file, METH_O, NULL}, - { "rand_poll", _wrap_rand_poll, METH_NOARGS, NULL}, - { "rand_status", _wrap_rand_status, METH_NOARGS, NULL}, - { "rand_cleanup", _wrap_rand_cleanup, METH_NOARGS, NULL}, - { "rand_init", _wrap_rand_init, METH_O, NULL}, - { "rand_seed", _wrap_rand_seed, METH_O, NULL}, - { "rand_add", _wrap_rand_add, METH_VARARGS, NULL}, - { "rand_bytes", _wrap_rand_bytes, METH_O, NULL}, - { "rand_pseudo_bytes", _wrap_rand_pseudo_bytes, METH_O, NULL}, - { "rand_file_name", _wrap_rand_file_name, METH_VARARGS, NULL}, - { "rand_screen", _wrap_rand_screen, METH_NOARGS, NULL}, - { "rand_win32_event", _wrap_rand_win32_event, METH_VARARGS, NULL}, - { "md5", _wrap_md5, METH_NOARGS, NULL}, - { "sha1", _wrap_sha1, METH_NOARGS, NULL}, - { "ripemd160", _wrap_ripemd160, METH_NOARGS, NULL}, - { "sha224", _wrap_sha224, METH_NOARGS, NULL}, - { "sha256", _wrap_sha256, METH_NOARGS, NULL}, - { "sha384", _wrap_sha384, METH_NOARGS, NULL}, - { "sha512", _wrap_sha512, METH_NOARGS, NULL}, - { "digest_init", _wrap_digest_init, METH_VARARGS, NULL}, - { "des_ecb", _wrap_des_ecb, METH_NOARGS, NULL}, - { "des_ede_ecb", _wrap_des_ede_ecb, METH_NOARGS, NULL}, - { "des_ede3_ecb", _wrap_des_ede3_ecb, METH_NOARGS, NULL}, - { "des_cbc", _wrap_des_cbc, METH_NOARGS, NULL}, - { "des_ede_cbc", _wrap_des_ede_cbc, METH_NOARGS, NULL}, - { "des_ede3_cbc", _wrap_des_ede3_cbc, METH_NOARGS, NULL}, - { "des_cfb", _wrap_des_cfb, METH_NOARGS, NULL}, - { "des_ede_cfb", _wrap_des_ede_cfb, METH_NOARGS, NULL}, - { "des_ede3_cfb", _wrap_des_ede3_cfb, METH_NOARGS, NULL}, - { "des_ofb", _wrap_des_ofb, METH_NOARGS, NULL}, - { "des_ede_ofb", _wrap_des_ede_ofb, METH_NOARGS, NULL}, - { "des_ede3_ofb", _wrap_des_ede3_ofb, METH_NOARGS, NULL}, - { "bf_ecb", _wrap_bf_ecb, METH_NOARGS, NULL}, - { "bf_cbc", _wrap_bf_cbc, METH_NOARGS, NULL}, - { "bf_cfb", _wrap_bf_cfb, METH_NOARGS, NULL}, - { "bf_ofb", _wrap_bf_ofb, METH_NOARGS, NULL}, - { "cast5_ecb", _wrap_cast5_ecb, METH_NOARGS, NULL}, - { "cast5_cbc", _wrap_cast5_cbc, METH_NOARGS, NULL}, - { "cast5_cfb", _wrap_cast5_cfb, METH_NOARGS, NULL}, - { "cast5_ofb", _wrap_cast5_ofb, METH_NOARGS, NULL}, - { "rc4", _wrap_rc4, METH_NOARGS, NULL}, - { "rc2_40_cbc", _wrap_rc2_40_cbc, METH_NOARGS, NULL}, - { "aes_128_ecb", _wrap_aes_128_ecb, METH_NOARGS, NULL}, - { "aes_128_cbc", _wrap_aes_128_cbc, METH_NOARGS, NULL}, - { "aes_128_cfb", _wrap_aes_128_cfb, METH_NOARGS, NULL}, - { "aes_128_ofb", _wrap_aes_128_ofb, METH_NOARGS, NULL}, - { "aes_128_ctr", _wrap_aes_128_ctr, METH_NOARGS, NULL}, - { "aes_192_ecb", _wrap_aes_192_ecb, METH_NOARGS, NULL}, - { "aes_192_cbc", _wrap_aes_192_cbc, METH_NOARGS, NULL}, - { "aes_192_cfb", _wrap_aes_192_cfb, METH_NOARGS, NULL}, - { "aes_192_ofb", _wrap_aes_192_ofb, METH_NOARGS, NULL}, - { "aes_192_ctr", _wrap_aes_192_ctr, METH_NOARGS, NULL}, - { "aes_256_ecb", _wrap_aes_256_ecb, METH_NOARGS, NULL}, - { "aes_256_cbc", _wrap_aes_256_cbc, METH_NOARGS, NULL}, - { "aes_256_cfb", _wrap_aes_256_cfb, METH_NOARGS, NULL}, - { "aes_256_ofb", _wrap_aes_256_ofb, METH_NOARGS, NULL}, - { "aes_256_ctr", _wrap_aes_256_ctr, METH_NOARGS, NULL}, - { "cipher_set_padding", _wrap_cipher_set_padding, METH_VARARGS, NULL}, - { "pkey_free", _wrap_pkey_free, METH_O, NULL}, - { "pkey_assign", _wrap_pkey_assign, METH_VARARGS, NULL}, - { "pkey_assign_ec", _wrap_pkey_assign_ec, METH_VARARGS, NULL}, - { "pkey_set1_rsa", _wrap_pkey_set1_rsa, METH_VARARGS, NULL}, - { "sign_init", _wrap_sign_init, METH_VARARGS, NULL}, - { "verify_init", _wrap_verify_init, METH_VARARGS, NULL}, - { "pkey_size", _wrap_pkey_size, METH_O, NULL}, - { "evp_init", _wrap_evp_init, METH_O, NULL}, - { "pkey_get1_rsa", _wrap_pkey_get1_rsa, METH_O, NULL}, - { "pkcs5_pbkdf2_hmac_sha1", _wrap_pkcs5_pbkdf2_hmac_sha1, METH_VARARGS, NULL}, - { "md_ctx_new", _wrap_md_ctx_new, METH_NOARGS, NULL}, - { "md_ctx_free", _wrap_md_ctx_free, METH_O, NULL}, - { "digest_update", _wrap_digest_update, METH_VARARGS, NULL}, - { "digest_final", _wrap_digest_final, METH_O, NULL}, - { "hmac_ctx_new", _wrap_hmac_ctx_new, METH_NOARGS, NULL}, - { "hmac_ctx_free", _wrap_hmac_ctx_free, METH_O, NULL}, - { "hmac_init", _wrap_hmac_init, METH_VARARGS, NULL}, - { "hmac_update", _wrap_hmac_update, METH_VARARGS, NULL}, - { "hmac_final", _wrap_hmac_final, METH_O, NULL}, - { "hmac", _wrap_hmac, METH_VARARGS, NULL}, - { "cipher_ctx_new", _wrap_cipher_ctx_new, METH_NOARGS, NULL}, - { "cipher_ctx_free", _wrap_cipher_ctx_free, METH_O, NULL}, - { "bytes_to_key", _wrap_bytes_to_key, METH_VARARGS, NULL}, - { "cipher_init", _wrap_cipher_init, METH_VARARGS, NULL}, - { "cipher_update", _wrap_cipher_update, METH_VARARGS, NULL}, - { "cipher_final", _wrap_cipher_final, METH_O, NULL}, - { "sign_update", _wrap_sign_update, METH_VARARGS, NULL}, - { "sign_final", _wrap_sign_final, METH_VARARGS, NULL}, - { "verify_update", _wrap_verify_update, METH_VARARGS, NULL}, - { "verify_final", _wrap_verify_final, METH_VARARGS, NULL}, - { "digest_sign_init", _wrap_digest_sign_init, METH_VARARGS, NULL}, - { "digest_sign_update", _wrap_digest_sign_update, METH_VARARGS, NULL}, - { "digest_sign_final", _wrap_digest_sign_final, METH_O, NULL}, - { "digest_sign", _wrap_digest_sign, METH_VARARGS, NULL}, - { "digest_verify_init", _wrap_digest_verify_init, METH_VARARGS, NULL}, - { "digest_verify_update", _wrap_digest_verify_update, METH_VARARGS, NULL}, - { "digest_verify_final", _wrap_digest_verify_final, METH_VARARGS, NULL}, - { "digest_verify", _wrap_digest_verify, METH_VARARGS, NULL}, - { "get_digestbyname", _wrap_get_digestbyname, METH_O, NULL}, - { "pkey_write_pem_no_cipher", _wrap_pkey_write_pem_no_cipher, METH_VARARGS, NULL}, - { "pkey_write_pem", _wrap_pkey_write_pem, METH_VARARGS, NULL}, - { "pkey_new", _wrap_pkey_new, METH_NOARGS, NULL}, - { "pkey_read_pem", _wrap_pkey_read_pem, METH_VARARGS, NULL}, - { "pkey_read_pem_pubkey", _wrap_pkey_read_pem_pubkey, METH_VARARGS, NULL}, - { "pkey_assign_rsa", _wrap_pkey_assign_rsa, METH_VARARGS, NULL}, - { "pkey_as_der", _wrap_pkey_as_der, METH_O, NULL}, - { "pkey_get_modulus", _wrap_pkey_get_modulus, METH_O, NULL}, - { "aes_new", _wrap_aes_new, METH_NOARGS, NULL}, - { "AES_free", _wrap_AES_free, METH_O, NULL}, - { "AES_set_key", _wrap_AES_set_key, METH_VARARGS, NULL}, - { "AES_crypt", _wrap_AES_crypt, METH_VARARGS, NULL}, - { "AES_type_check", _wrap_AES_type_check, METH_O, NULL}, - { "rc4_new", _wrap_rc4_new, METH_NOARGS, NULL}, - { "rc4_free", _wrap_rc4_free, METH_O, NULL}, - { "rc4_set_key", _wrap_rc4_set_key, METH_VARARGS, NULL}, - { "rc4_update", _wrap_rc4_update, METH_VARARGS, NULL}, - { "rc4_type_check", _wrap_rc4_type_check, METH_O, NULL}, - { "dh_new", _wrap_dh_new, METH_NOARGS, NULL}, - { "dh_free", _wrap_dh_free, METH_O, NULL}, - { "dh_size", _wrap_dh_size, METH_O, NULL}, - { "dh_generate_key", _wrap_dh_generate_key, METH_O, NULL}, - { "dhparams_print", _wrap_dhparams_print, METH_VARARGS, NULL}, - { "dh_init", _wrap_dh_init, METH_O, NULL}, - { "dh_type_check", _wrap_dh_type_check, METH_O, NULL}, - { "dh_read_parameters", _wrap_dh_read_parameters, METH_O, NULL}, - { "dh_generate_parameters", _wrap_dh_generate_parameters, METH_VARARGS, NULL}, - { "dh_check", _wrap_dh_check, METH_O, NULL}, - { "dh_compute_key", _wrap_dh_compute_key, METH_VARARGS, NULL}, - { "dh_get_p", _wrap_dh_get_p, METH_O, NULL}, - { "dh_get_g", _wrap_dh_get_g, METH_O, NULL}, - { "dh_get_pub", _wrap_dh_get_pub, METH_O, NULL}, - { "dh_get_priv", _wrap_dh_get_priv, METH_O, NULL}, - { "dh_set_pg", _wrap_dh_set_pg, METH_VARARGS, NULL}, - { "rsa_size", _wrap_rsa_size, METH_O, NULL}, - { "rsa_new", _wrap_rsa_new, METH_NOARGS, NULL}, - { "rsa_free", _wrap_rsa_free, METH_O, NULL}, - { "rsa_check_key", _wrap_rsa_check_key, METH_O, NULL}, - { "rsa_init", _wrap_rsa_init, METH_O, NULL}, - { "rsa_read_key", _wrap_rsa_read_key, METH_VARARGS, NULL}, - { "rsa_write_key", _wrap_rsa_write_key, METH_VARARGS, NULL}, - { "rsa_write_key_no_cipher", _wrap_rsa_write_key_no_cipher, METH_VARARGS, NULL}, - { "rsa_read_pub_key", _wrap_rsa_read_pub_key, METH_O, NULL}, - { "rsa_write_pub_key", _wrap_rsa_write_pub_key, METH_VARARGS, NULL}, - { "rsa_get_e", _wrap_rsa_get_e, METH_O, NULL}, - { "rsa_get_n", _wrap_rsa_get_n, METH_O, NULL}, - { "rsa_set_e", _wrap_rsa_set_e, METH_VARARGS, NULL}, - { "rsa_set_n", _wrap_rsa_set_n, METH_VARARGS, NULL}, - { "rsa_set_en", _wrap_rsa_set_en, METH_VARARGS, NULL}, - { "PyObject_Bin_AsBIGNUM", _wrap_PyObject_Bin_AsBIGNUM, METH_O, NULL}, - { "rsa_set_en_bin", _wrap_rsa_set_en_bin, METH_VARARGS, NULL}, - { "rsa_private_encrypt", _wrap_rsa_private_encrypt, METH_VARARGS, NULL}, - { "rsa_public_decrypt", _wrap_rsa_public_decrypt, METH_VARARGS, NULL}, - { "rsa_public_encrypt", _wrap_rsa_public_encrypt, METH_VARARGS, NULL}, - { "rsa_private_decrypt", _wrap_rsa_private_decrypt, METH_VARARGS, NULL}, - { "rsa_padding_add_pkcs1_pss", _wrap_rsa_padding_add_pkcs1_pss, METH_VARARGS, NULL}, - { "rsa_verify_pkcs1_pss", _wrap_rsa_verify_pkcs1_pss, METH_VARARGS, NULL}, - { "rsa_sign", _wrap_rsa_sign, METH_VARARGS, NULL}, - { "rsa_verify", _wrap_rsa_verify, METH_VARARGS, NULL}, - { "rsa_generate_key", _wrap_rsa_generate_key, METH_VARARGS, NULL}, - { "rsa_type_check", _wrap_rsa_type_check, METH_O, NULL}, - { "rsa_check_pub_key", _wrap_rsa_check_pub_key, METH_O, NULL}, - { "rsa_write_key_der", _wrap_rsa_write_key_der, METH_VARARGS, NULL}, - { "dsa_new", _wrap_dsa_new, METH_NOARGS, NULL}, - { "dsa_free", _wrap_dsa_free, METH_O, NULL}, - { "dsa_size", _wrap_dsa_size, METH_O, NULL}, - { "dsa_gen_key", _wrap_dsa_gen_key, METH_O, NULL}, - { "dsa_init", _wrap_dsa_init, METH_O, NULL}, - { "dsa_generate_parameters", _wrap_dsa_generate_parameters, METH_VARARGS, NULL}, - { "dsa_read_params", _wrap_dsa_read_params, METH_VARARGS, NULL}, - { "dsa_read_key", _wrap_dsa_read_key, METH_VARARGS, NULL}, - { "dsa_read_pub_key", _wrap_dsa_read_pub_key, METH_VARARGS, NULL}, - { "dsa_get_p", _wrap_dsa_get_p, METH_O, NULL}, - { "dsa_get_q", _wrap_dsa_get_q, METH_O, NULL}, - { "dsa_get_g", _wrap_dsa_get_g, METH_O, NULL}, - { "dsa_get_pub", _wrap_dsa_get_pub, METH_O, NULL}, - { "dsa_get_priv", _wrap_dsa_get_priv, METH_O, NULL}, - { "dsa_set_pqg", _wrap_dsa_set_pqg, METH_VARARGS, NULL}, - { "dsa_set_pub", _wrap_dsa_set_pub, METH_VARARGS, NULL}, - { "dsa_write_params_bio", _wrap_dsa_write_params_bio, METH_VARARGS, NULL}, - { "dsa_write_key_bio", _wrap_dsa_write_key_bio, METH_VARARGS, NULL}, - { "dsa_write_key_bio_no_cipher", _wrap_dsa_write_key_bio_no_cipher, METH_VARARGS, NULL}, - { "dsa_write_pub_key_bio", _wrap_dsa_write_pub_key_bio, METH_VARARGS, NULL}, - { "dsa_sign", _wrap_dsa_sign, METH_VARARGS, NULL}, - { "dsa_verify", _wrap_dsa_verify, METH_VARARGS, NULL}, - { "dsa_sign_asn1", _wrap_dsa_sign_asn1, METH_VARARGS, NULL}, - { "dsa_verify_asn1", _wrap_dsa_verify_asn1, METH_VARARGS, NULL}, - { "dsa_check_key", _wrap_dsa_check_key, METH_O, NULL}, - { "dsa_check_pub_key", _wrap_dsa_check_pub_key, METH_O, NULL}, - { "dsa_keylen", _wrap_dsa_keylen, METH_O, NULL}, - { "dsa_type_check", _wrap_dsa_type_check, METH_O, NULL}, - { "ssl_get_ciphers", _wrap_ssl_get_ciphers, METH_O, NULL}, - { "ssl_get_version", _wrap_ssl_get_version, METH_O, NULL}, - { "ssl_get_error", _wrap_ssl_get_error, METH_VARARGS, NULL}, - { "ssl_get_state", _wrap_ssl_get_state, METH_O, NULL}, - { "ssl_get_state_v", _wrap_ssl_get_state_v, METH_O, NULL}, - { "ssl_get_alert_type", _wrap_ssl_get_alert_type, METH_O, NULL}, - { "ssl_get_alert_type_v", _wrap_ssl_get_alert_type_v, METH_O, NULL}, - { "ssl_get_alert_desc", _wrap_ssl_get_alert_desc, METH_O, NULL}, - { "ssl_get_alert_desc_v", _wrap_ssl_get_alert_desc_v, METH_O, NULL}, - { "sslv23_method", _wrap_sslv23_method, METH_NOARGS, NULL}, - { "ssl_ctx_new", _wrap_ssl_ctx_new, METH_O, NULL}, - { "ssl_ctx_free", _wrap_ssl_ctx_free, METH_O, NULL}, - { "ssl_ctx_set_verify_depth", _wrap_ssl_ctx_set_verify_depth, METH_VARARGS, NULL}, - { "ssl_ctx_get_verify_depth", _wrap_ssl_ctx_get_verify_depth, METH_O, NULL}, - { "ssl_ctx_get_verify_mode", _wrap_ssl_ctx_get_verify_mode, METH_O, NULL}, - { "ssl_ctx_set_cipher_list", _wrap_ssl_ctx_set_cipher_list, METH_VARARGS, NULL}, - { "ssl_ctx_add_session", _wrap_ssl_ctx_add_session, METH_VARARGS, NULL}, - { "ssl_ctx_remove_session", _wrap_ssl_ctx_remove_session, METH_VARARGS, NULL}, - { "ssl_ctx_set_session_timeout", _wrap_ssl_ctx_set_session_timeout, METH_VARARGS, NULL}, - { "ssl_ctx_get_session_timeout", _wrap_ssl_ctx_get_session_timeout, METH_O, NULL}, - { "ssl_ctx_get_cert_store", _wrap_ssl_ctx_get_cert_store, METH_O, NULL}, - { "ssl_ctx_set_default_verify_paths", _wrap_ssl_ctx_set_default_verify_paths, METH_O, NULL}, - { "ssl_get_ex_data_x509_store_ctx_idx", _wrap_ssl_get_ex_data_x509_store_ctx_idx, METH_NOARGS, NULL}, - { "bio_new_ssl", _wrap_bio_new_ssl, METH_VARARGS, NULL}, - { "ssl_new", _wrap_ssl_new, METH_O, NULL}, - { "ssl_free", _wrap_ssl_free, METH_O, NULL}, - { "ssl_dup", _wrap_ssl_dup, METH_O, NULL}, - { "ssl_set_bio", _wrap_ssl_set_bio, METH_VARARGS, NULL}, - { "ssl_set_accept_state", _wrap_ssl_set_accept_state, METH_O, NULL}, - { "ssl_set_connect_state", _wrap_ssl_set_connect_state, METH_O, NULL}, - { "ssl_get_shutdown", _wrap_ssl_get_shutdown, METH_O, NULL}, - { "ssl_set_shutdown", _wrap_ssl_set_shutdown, METH_VARARGS, NULL}, - { "ssl_shutdown", _wrap_ssl_shutdown, METH_O, NULL}, - { "ssl_clear", _wrap_ssl_clear, METH_O, NULL}, - { "ssl_do_handshake", _wrap_ssl_do_handshake, METH_O, NULL}, - { "ssl_renegotiate", _wrap_ssl_renegotiate, METH_O, NULL}, - { "ssl_pending", _wrap_ssl_pending, METH_O, NULL}, - { "ssl_get_peer_cert", _wrap_ssl_get_peer_cert, METH_O, NULL}, - { "ssl_get_current_cipher", _wrap_ssl_get_current_cipher, METH_O, NULL}, - { "ssl_get_verify_mode", _wrap_ssl_get_verify_mode, METH_O, NULL}, - { "ssl_get_verify_depth", _wrap_ssl_get_verify_depth, METH_O, NULL}, - { "ssl_get_verify_result", _wrap_ssl_get_verify_result, METH_O, NULL}, - { "ssl_get_ssl_ctx", _wrap_ssl_get_ssl_ctx, METH_O, NULL}, - { "ssl_get_default_session_timeout", _wrap_ssl_get_default_session_timeout, METH_O, NULL}, - { "ssl_set_cipher_list", _wrap_ssl_set_cipher_list, METH_VARARGS, NULL}, - { "ssl_get_cipher_list", _wrap_ssl_get_cipher_list, METH_VARARGS, NULL}, - { "ssl_cipher_get_name", _wrap_ssl_cipher_get_name, METH_O, NULL}, - { "ssl_cipher_get_version", _wrap_ssl_cipher_get_version, METH_O, NULL}, - { "ssl_get_session", _wrap_ssl_get_session, METH_O, NULL}, - { "ssl_get1_session", _wrap_ssl_get1_session, METH_O, NULL}, - { "ssl_set_session", _wrap_ssl_set_session, METH_VARARGS, NULL}, - { "ssl_session_free", _wrap_ssl_session_free, METH_O, NULL}, - { "ssl_session_print", _wrap_ssl_session_print, METH_VARARGS, NULL}, - { "ssl_session_set_timeout", _wrap_ssl_session_set_timeout, METH_VARARGS, NULL}, - { "ssl_session_get_timeout", _wrap_ssl_session_get_timeout, METH_O, NULL}, - { "ssl_accept", _wrap_ssl_accept, METH_VARARGS, NULL}, - { "ssl_connect", _wrap_ssl_connect, METH_VARARGS, NULL}, - { "ssl_read", _wrap_ssl_read, METH_VARARGS, NULL}, - { "ssl_write", _wrap_ssl_write, METH_VARARGS, NULL}, - { "ssl_init", _wrap_ssl_init, METH_VARARGS, NULL}, - { "tlsv1_method", _wrap_tlsv1_method, METH_NOARGS, NULL}, - { "ssl_ctx_passphrase_callback", _wrap_ssl_ctx_passphrase_callback, METH_VARARGS, NULL}, - { "ssl_ctx_use_x509", _wrap_ssl_ctx_use_x509, METH_VARARGS, NULL}, - { "ssl_ctx_use_cert", _wrap_ssl_ctx_use_cert, METH_VARARGS, NULL}, - { "ssl_ctx_use_cert_chain", _wrap_ssl_ctx_use_cert_chain, METH_VARARGS, NULL}, - { "ssl_ctx_use_privkey", _wrap_ssl_ctx_use_privkey, METH_VARARGS, NULL}, - { "ssl_ctx_use_rsa_privkey", _wrap_ssl_ctx_use_rsa_privkey, METH_VARARGS, NULL}, - { "ssl_ctx_use_pkey_privkey", _wrap_ssl_ctx_use_pkey_privkey, METH_VARARGS, NULL}, - { "ssl_ctx_check_privkey", _wrap_ssl_ctx_check_privkey, METH_O, NULL}, - { "ssl_ctx_set_client_CA_list_from_file", _wrap_ssl_ctx_set_client_CA_list_from_file, METH_VARARGS, NULL}, - { "ssl_ctx_set_verify_default", _wrap_ssl_ctx_set_verify_default, METH_VARARGS, NULL}, - { "ssl_ctx_set_verify", _wrap_ssl_ctx_set_verify, METH_VARARGS, NULL}, - { "ssl_ctx_set_session_id_context", _wrap_ssl_ctx_set_session_id_context, METH_VARARGS, NULL}, - { "ssl_ctx_set_info_callback", _wrap_ssl_ctx_set_info_callback, METH_VARARGS, NULL}, - { "ssl_ctx_set_tmp_dh", _wrap_ssl_ctx_set_tmp_dh, METH_VARARGS, NULL}, - { "ssl_ctx_set_tmp_dh_callback", _wrap_ssl_ctx_set_tmp_dh_callback, METH_VARARGS, NULL}, - { "ssl_ctx_set_tmp_rsa", _wrap_ssl_ctx_set_tmp_rsa, METH_VARARGS, NULL}, - { "ssl_ctx_set_tmp_rsa_callback", _wrap_ssl_ctx_set_tmp_rsa_callback, METH_VARARGS, NULL}, - { "ssl_ctx_load_verify_locations", _wrap_ssl_ctx_load_verify_locations, METH_VARARGS, NULL}, - { "ssl_ctx_set_options", _wrap_ssl_ctx_set_options, METH_VARARGS, NULL}, - { "bio_set_ssl", _wrap_bio_set_ssl, METH_VARARGS, NULL}, - { "ssl_set_mode", _wrap_ssl_set_mode, METH_VARARGS, NULL}, - { "ssl_get_mode", _wrap_ssl_get_mode, METH_O, NULL}, - { "ssl_set_tlsext_host_name", _wrap_ssl_set_tlsext_host_name, METH_VARARGS, NULL}, - { "ssl_set_client_CA_list_from_file", _wrap_ssl_set_client_CA_list_from_file, METH_VARARGS, NULL}, - { "ssl_set_client_CA_list_from_context", _wrap_ssl_set_client_CA_list_from_context, METH_VARARGS, NULL}, - { "ssl_set_session_id_context", _wrap_ssl_set_session_id_context, METH_VARARGS, NULL}, - { "ssl_set_fd", _wrap_ssl_set_fd, METH_VARARGS, NULL}, - { "ssl_set_shutdown1", _wrap_ssl_set_shutdown1, METH_VARARGS, NULL}, - { "ssl_read_nbio", _wrap_ssl_read_nbio, METH_VARARGS, NULL}, - { "ssl_write_nbio", _wrap_ssl_write_nbio, METH_VARARGS, NULL}, - { "ssl_cipher_get_bits", _wrap_ssl_cipher_get_bits, METH_O, NULL}, - { "sk_ssl_cipher_num", _wrap_sk_ssl_cipher_num, METH_O, NULL}, - { "sk_ssl_cipher_value", _wrap_sk_ssl_cipher_value, METH_VARARGS, NULL}, - { "ssl_get_peer_cert_chain", _wrap_ssl_get_peer_cert_chain, METH_O, NULL}, - { "sk_x509_num", _wrap_sk_x509_num, METH_O, NULL}, - { "sk_x509_value", _wrap_sk_x509_value, METH_VARARGS, NULL}, - { "i2d_ssl_session", _wrap_i2d_ssl_session, METH_VARARGS, NULL}, - { "ssl_session_read_pem", _wrap_ssl_session_read_pem, METH_O, NULL}, - { "ssl_session_write_pem", _wrap_ssl_session_write_pem, METH_VARARGS, NULL}, - { "ssl_ctx_set_session_cache_mode", _wrap_ssl_ctx_set_session_cache_mode, METH_VARARGS, NULL}, - { "ssl_ctx_get_session_cache_mode", _wrap_ssl_ctx_get_session_cache_mode, METH_O, NULL}, - { "ssl_ctx_set_cache_size", _wrap_ssl_ctx_set_cache_size, METH_VARARGS, NULL}, - { "ssl_is_init_finished", _wrap_ssl_is_init_finished, METH_O, NULL}, - { "x509_check_ca", _wrap_x509_check_ca, METH_O, NULL}, - { "x509_new", _wrap_x509_new, METH_NOARGS, NULL}, - { "x509_dup", _wrap_x509_dup, METH_O, NULL}, - { "x509_free", _wrap_x509_free, METH_O, NULL}, - { "x509_crl_free", _wrap_x509_crl_free, METH_O, NULL}, - { "x509_crl_new", _wrap_x509_crl_new, METH_NOARGS, NULL}, - { "x509_print", _wrap_x509_print, METH_VARARGS, NULL}, - { "x509_crl_print", _wrap_x509_crl_print, METH_VARARGS, NULL}, - { "x509_get_serial_number", _wrap_x509_get_serial_number, METH_O, NULL}, - { "x509_set_serial_number", _wrap_x509_set_serial_number, METH_VARARGS, NULL}, - { "x509_get_pubkey", _wrap_x509_get_pubkey, METH_O, NULL}, - { "x509_set_pubkey", _wrap_x509_set_pubkey, METH_VARARGS, NULL}, - { "x509_get_issuer_name", _wrap_x509_get_issuer_name, METH_O, NULL}, - { "x509_set_issuer_name", _wrap_x509_set_issuer_name, METH_VARARGS, NULL}, - { "x509_get_subject_name", _wrap_x509_get_subject_name, METH_O, NULL}, - { "x509_set_subject_name", _wrap_x509_set_subject_name, METH_VARARGS, NULL}, - { "x509_cmp_current_time", _wrap_x509_cmp_current_time, METH_O, NULL}, - { "x509_check_purpose", _wrap_x509_check_purpose, METH_VARARGS, NULL}, - { "x509_check_trust", _wrap_x509_check_trust, METH_VARARGS, NULL}, - { "x509_write_pem", _wrap_x509_write_pem, METH_VARARGS, NULL}, - { "x509_write_pem_file", _wrap_x509_write_pem_file, METH_VARARGS, NULL}, - { "x509_verify", _wrap_x509_verify, METH_VARARGS, NULL}, - { "x509_get_verify_error", _wrap_x509_get_verify_error, METH_O, NULL}, - { "x509_add_ext", _wrap_x509_add_ext, METH_VARARGS, NULL}, - { "x509_get_ext_count", _wrap_x509_get_ext_count, METH_O, NULL}, - { "x509_get_ext", _wrap_x509_get_ext, METH_VARARGS, NULL}, - { "x509_ext_print", _wrap_x509_ext_print, METH_VARARGS, NULL}, - { "x509_name_new", _wrap_x509_name_new, METH_NOARGS, NULL}, - { "x509_name_free", _wrap_x509_name_free, METH_O, NULL}, - { "x509_name_print", _wrap_x509_name_print, METH_VARARGS, NULL}, - { "x509_name_get_entry", _wrap_x509_name_get_entry, METH_VARARGS, NULL}, - { "x509_name_entry_count", _wrap_x509_name_entry_count, METH_O, NULL}, - { "x509_name_delete_entry", _wrap_x509_name_delete_entry, METH_VARARGS, NULL}, - { "x509_name_add_entry", _wrap_x509_name_add_entry, METH_VARARGS, NULL}, - { "x509_name_add_entry_by_obj", _wrap_x509_name_add_entry_by_obj, METH_VARARGS, NULL}, - { "x509_name_add_entry_by_nid", _wrap_x509_name_add_entry_by_nid, METH_VARARGS, NULL}, - { "x509_name_print_ex", _wrap_x509_name_print_ex, METH_VARARGS, NULL}, - { "x509_name_hash", _wrap_x509_name_hash, METH_O, NULL}, - { "x509_name_get_index_by_nid", _wrap_x509_name_get_index_by_nid, METH_VARARGS, NULL}, - { "x509_name_entry_new", _wrap_x509_name_entry_new, METH_NOARGS, NULL}, - { "x509_name_entry_free", _wrap_x509_name_entry_free, METH_O, NULL}, - { "x509_name_entry_create_by_nid", _wrap_x509_name_entry_create_by_nid, METH_VARARGS, NULL}, - { "x509_name_entry_set_object", _wrap_x509_name_entry_set_object, METH_VARARGS, NULL}, - { "x509_name_entry_get_object", _wrap_x509_name_entry_get_object, METH_O, NULL}, - { "x509_name_entry_get_data", _wrap_x509_name_entry_get_data, METH_O, NULL}, - { "x509_name_entry_set_data", _wrap_x509_name_entry_set_data, METH_VARARGS, NULL}, - { "x509_req_new", _wrap_x509_req_new, METH_NOARGS, NULL}, - { "x509_req_free", _wrap_x509_req_free, METH_O, NULL}, - { "x509_req_print", _wrap_x509_req_print, METH_VARARGS, NULL}, - { "x509_req_get_pubkey", _wrap_x509_req_get_pubkey, METH_O, NULL}, - { "x509_req_set_pubkey", _wrap_x509_req_set_pubkey, METH_VARARGS, NULL}, - { "x509_req_set_subject_name", _wrap_x509_req_set_subject_name, METH_VARARGS, NULL}, - { "x509_req_verify", _wrap_x509_req_verify, METH_VARARGS, NULL}, - { "x509_req_sign", _wrap_x509_req_sign, METH_VARARGS, NULL}, - { "i2d_x509_bio", _wrap_i2d_x509_bio, METH_VARARGS, NULL}, - { "i2d_x509_req_bio", _wrap_i2d_x509_req_bio, METH_VARARGS, NULL}, - { "x509_store_new", _wrap_x509_store_new, METH_NOARGS, NULL}, - { "x509_store_free", _wrap_x509_store_free, METH_O, NULL}, - { "x509_store_add_cert", _wrap_x509_store_add_cert, METH_VARARGS, NULL}, - { "x509_store_ctx_get_current_cert", _wrap_x509_store_ctx_get_current_cert, METH_O, NULL}, - { "x509_store_ctx_get_error", _wrap_x509_store_ctx_get_error, METH_O, NULL}, - { "x509_store_ctx_get_error_depth", _wrap_x509_store_ctx_get_error_depth, METH_O, NULL}, - { "x509_store_ctx_free", _wrap_x509_store_ctx_free, METH_O, NULL}, - { "x509_store_ctx_get1_chain", _wrap_x509_store_ctx_get1_chain, METH_O, NULL}, - { "x509_extension_get_critical", _wrap_x509_extension_get_critical, METH_O, NULL}, - { "x509_extension_set_critical", _wrap_x509_extension_set_critical, METH_VARARGS, NULL}, - { "x509_store_set_flags", _wrap_x509_store_set_flags, METH_VARARGS, NULL}, - { "x509_read_pem", _wrap_x509_read_pem, METH_O, NULL}, - { "d2i_x509", _wrap_d2i_x509, METH_O, NULL}, - { "x509_init", _wrap_x509_init, METH_O, NULL}, - { "d2i_x509_req", _wrap_d2i_x509_req, METH_O, NULL}, - { "x509_req_read_pem", _wrap_x509_req_read_pem, METH_O, NULL}, - { "i2d_x509", _wrap_i2d_x509, METH_O, NULL}, - { "x509_req_write_pem", _wrap_x509_req_write_pem, METH_VARARGS, NULL}, - { "x509_crl_read_pem", _wrap_x509_crl_read_pem, METH_O, NULL}, - { "x509_set_version", _wrap_x509_set_version, METH_VARARGS, NULL}, - { "x509_get_version", _wrap_x509_get_version, METH_O, NULL}, - { "x509_set_not_before", _wrap_x509_set_not_before, METH_VARARGS, NULL}, - { "x509_get_not_before", _wrap_x509_get_not_before, METH_O, NULL}, - { "x509_set_not_after", _wrap_x509_set_not_after, METH_VARARGS, NULL}, - { "x509_get_not_after", _wrap_x509_get_not_after, METH_O, NULL}, - { "x509_sign", _wrap_x509_sign, METH_VARARGS, NULL}, - { "x509_gmtime_adj", _wrap_x509_gmtime_adj, METH_VARARGS, NULL}, - { "x509_name_by_nid", _wrap_x509_name_by_nid, METH_VARARGS, NULL}, - { "x509_name_set_by_nid", _wrap_x509_name_set_by_nid, METH_VARARGS, NULL}, - { "x509_name_add_entry_by_txt", _wrap_x509_name_add_entry_by_txt, METH_VARARGS, NULL}, - { "x509_name_get_der", _wrap_x509_name_get_der, METH_O, NULL}, - { "sk_x509_free", _wrap_sk_x509_free, METH_O, NULL}, - { "sk_x509_push", _wrap_sk_x509_push, METH_VARARGS, NULL}, - { "sk_x509_pop", _wrap_sk_x509_pop, METH_O, NULL}, - { "x509_store_load_locations", _wrap_x509_store_load_locations, METH_VARARGS, NULL}, - { "x509_type_check", _wrap_x509_type_check, METH_O, NULL}, - { "x509_name_type_check", _wrap_x509_name_type_check, METH_O, NULL}, - { "x509_req_get_subject_name", _wrap_x509_req_get_subject_name, METH_O, NULL}, - { "x509_req_get_version", _wrap_x509_req_get_version, METH_O, NULL}, - { "x509_req_set_version", _wrap_x509_req_set_version, METH_VARARGS, NULL}, - { "x509_req_add_extensions", _wrap_x509_req_add_extensions, METH_VARARGS, NULL}, - { "x509_name_entry_create_by_txt", _wrap_x509_name_entry_create_by_txt, METH_VARARGS, NULL}, - { "x509v3_set_nconf", _wrap_x509v3_set_nconf, METH_NOARGS, NULL}, - { "x509v3_ext_conf", _wrap_x509v3_ext_conf, METH_VARARGS, NULL}, - { "x509_extension_free", _wrap_x509_extension_free, METH_O, NULL}, - { "x509_extension_get_name", _wrap_x509_extension_get_name, METH_O, NULL}, - { "sk_x509_extension_new_null", _wrap_sk_x509_extension_new_null, METH_NOARGS, NULL}, - { "sk_x509_extension_free", _wrap_sk_x509_extension_free, METH_O, NULL}, - { "sk_x509_extension_push", _wrap_sk_x509_extension_push, METH_VARARGS, NULL}, - { "sk_x509_extension_pop", _wrap_sk_x509_extension_pop, METH_O, NULL}, - { "sk_x509_extension_num", _wrap_sk_x509_extension_num, METH_O, NULL}, - { "sk_x509_extension_value", _wrap_sk_x509_extension_value, METH_VARARGS, NULL}, - { "x509_store_ctx_get_app_data", _wrap_x509_store_ctx_get_app_data, METH_O, NULL}, - { "x509_store_ctx_get_ex_data", _wrap_x509_store_ctx_get_ex_data, METH_VARARGS, NULL}, - { "x509_store_set_verify_cb", _wrap_x509_store_set_verify_cb, METH_VARARGS, NULL}, - { "make_stack_from_der_sequence", _wrap_make_stack_from_der_sequence, METH_O, NULL}, - { "sk_x509_new_null", _wrap_sk_x509_new_null, METH_NOARGS, NULL}, - { "get_der_encoding_stack", _wrap_get_der_encoding_stack, METH_O, NULL}, - { "x509_name_oneline", _wrap_x509_name_oneline, METH_O, NULL}, - { "asn1_object_new", _wrap_asn1_object_new, METH_NOARGS, NULL}, - { "asn1_object_create", _wrap_asn1_object_create, METH_VARARGS, NULL}, - { "asn1_object_free", _wrap_asn1_object_free, METH_O, NULL}, - { "i2d_asn1_object", _wrap_i2d_asn1_object, METH_VARARGS, NULL}, - { "d2i_asn1_object", _wrap_d2i_asn1_object, METH_VARARGS, NULL}, - { "asn1_bit_string_new", _wrap_asn1_bit_string_new, METH_NOARGS, NULL}, - { "asn1_string_new", _wrap_asn1_string_new, METH_NOARGS, NULL}, - { "asn1_string_free", _wrap_asn1_string_free, METH_O, NULL}, - { "asn1_string_set", _wrap_asn1_string_set, METH_VARARGS, NULL}, - { "asn1_string_print", _wrap_asn1_string_print, METH_VARARGS, NULL}, - { "asn1_string_print_ex", _wrap_asn1_string_print_ex, METH_VARARGS, NULL}, - { "asn1_time_new", _wrap_asn1_time_new, METH_NOARGS, NULL}, - { "asn1_time_free", _wrap_asn1_time_free, METH_O, NULL}, - { "asn1_time_check", _wrap_asn1_time_check, METH_O, NULL}, - { "asn1_time_set", _wrap_asn1_time_set, METH_VARARGS, NULL}, - { "asn1_time_set_string", _wrap_asn1_time_set_string, METH_VARARGS, NULL}, - { "asn1_time_print", _wrap_asn1_time_print, METH_VARARGS, NULL}, - { "asn1_integer_new", _wrap_asn1_integer_new, METH_NOARGS, NULL}, - { "asn1_integer_free", _wrap_asn1_integer_free, METH_O, NULL}, - { "asn1_integer_cmp", _wrap_asn1_integer_cmp, METH_VARARGS, NULL}, - { "asn1_time_type_check", _wrap_asn1_time_type_check, METH_O, NULL}, - { "asn1_integer_get", _wrap_asn1_integer_get, METH_O, NULL}, - { "asn1_integer_set", _wrap_asn1_integer_set, METH_VARARGS, NULL}, - { "pkcs7_new", _wrap_pkcs7_new, METH_NOARGS, NULL}, - { "pkcs7_free", _wrap_pkcs7_free, METH_O, NULL}, - { "pkcs7_add_certificate", _wrap_pkcs7_add_certificate, METH_VARARGS, NULL}, - { "pkcs7_init", _wrap_pkcs7_init, METH_O, NULL}, - { "smime_init", _wrap_smime_init, METH_O, NULL}, - { "pkcs7_decrypt", _wrap_pkcs7_decrypt, METH_VARARGS, NULL}, - { "pkcs7_encrypt", _wrap_pkcs7_encrypt, METH_VARARGS, NULL}, - { "pkcs7_sign1", _wrap_pkcs7_sign1, METH_VARARGS, NULL}, - { "pkcs7_sign0", _wrap_pkcs7_sign0, METH_VARARGS, NULL}, - { "pkcs7_read_bio", _wrap_pkcs7_read_bio, METH_O, NULL}, - { "pkcs7_read_bio_der", _wrap_pkcs7_read_bio_der, METH_O, NULL}, - { "pkcs7_verify1", _wrap_pkcs7_verify1, METH_VARARGS, NULL}, - { "pkcs7_verify0", _wrap_pkcs7_verify0, METH_VARARGS, NULL}, - { "smime_write_pkcs7_multi", _wrap_smime_write_pkcs7_multi, METH_VARARGS, NULL}, - { "smime_write_pkcs7", _wrap_smime_write_pkcs7, METH_VARARGS, NULL}, - { "smime_read_pkcs7", _wrap_smime_read_pkcs7, METH_O, NULL}, - { "pkcs7_write_bio", _wrap_pkcs7_write_bio, METH_VARARGS, NULL}, - { "pkcs7_write_bio_der", _wrap_pkcs7_write_bio_der, METH_VARARGS, NULL}, - { "pkcs7_type_nid", _wrap_pkcs7_type_nid, METH_O, NULL}, - { "pkcs7_type_sn", _wrap_pkcs7_type_sn, METH_O, NULL}, - { "smime_crlf_copy", _wrap_smime_crlf_copy, METH_VARARGS, NULL}, - { "pkcs7_get0_signers", _wrap_pkcs7_get0_signers, METH_VARARGS, NULL}, - { "util_init", _wrap_util_init, METH_O, NULL}, - { "util_hex_to_string", _wrap_util_hex_to_string, METH_O, NULL}, - { "util_string_to_hex", _wrap_util_string_to_hex, METH_O, NULL}, - { "ec_key_new", _wrap_ec_key_new, METH_NOARGS, NULL}, - { "ec_key_free", _wrap_ec_key_free, METH_O, NULL}, - { "ec_key_size", _wrap_ec_key_size, METH_O, NULL}, - { "ec_key_gen_key", _wrap_ec_key_gen_key, METH_O, NULL}, - { "ec_key_check_key", _wrap_ec_key_check_key, METH_O, NULL}, - { "ec_init", _wrap_ec_init, METH_O, NULL}, - { "ec_get_builtin_curves", _wrap_ec_get_builtin_curves, METH_NOARGS, NULL}, - { "ec_key_new_by_curve_name", _wrap_ec_key_new_by_curve_name, METH_O, NULL}, - { "ec_key_get_public_der", _wrap_ec_key_get_public_der, METH_O, NULL}, - { "ec_key_get_public_key", _wrap_ec_key_get_public_key, METH_O, NULL}, - { "ec_key_read_pubkey", _wrap_ec_key_read_pubkey, METH_O, NULL}, - { "ec_key_write_pubkey", _wrap_ec_key_write_pubkey, METH_VARARGS, NULL}, - { "ec_key_read_bio", _wrap_ec_key_read_bio, METH_VARARGS, NULL}, - { "ec_key_write_bio", _wrap_ec_key_write_bio, METH_VARARGS, NULL}, - { "ec_key_write_bio_no_cipher", _wrap_ec_key_write_bio_no_cipher, METH_VARARGS, NULL}, - { "ecdsa_sig_get_r", _wrap_ecdsa_sig_get_r, METH_O, NULL}, - { "ecdsa_sig_get_s", _wrap_ecdsa_sig_get_s, METH_O, NULL}, - { "ecdsa_sign", _wrap_ecdsa_sign, METH_VARARGS, NULL}, - { "ecdsa_verify", _wrap_ecdsa_verify, METH_VARARGS, NULL}, - { "ecdsa_sign_asn1", _wrap_ecdsa_sign_asn1, METH_VARARGS, NULL}, - { "ecdsa_verify_asn1", _wrap_ecdsa_verify_asn1, METH_VARARGS, NULL}, - { "ecdh_compute_key", _wrap_ecdh_compute_key, METH_VARARGS, NULL}, - { "ec_key_from_pubkey_der", _wrap_ec_key_from_pubkey_der, METH_O, NULL}, - { "ec_key_from_pubkey_params", _wrap_ec_key_from_pubkey_params, METH_VARARGS, NULL}, - { "ec_key_keylen", _wrap_ec_key_keylen, METH_O, NULL}, - { "ec_key_type_check", _wrap_ec_key_type_check, METH_O, NULL}, - { "engine_load_builtin_engines", _wrap_engine_load_builtin_engines, METH_NOARGS, NULL}, - { "engine_load_dynamic", _wrap_engine_load_dynamic, METH_NOARGS, NULL}, - { "engine_load_openssl", _wrap_engine_load_openssl, METH_NOARGS, NULL}, - { "engine_cleanup", _wrap_engine_cleanup, METH_NOARGS, NULL}, - { "engine_new", _wrap_engine_new, METH_NOARGS, NULL}, - { "engine_by_id", _wrap_engine_by_id, METH_O, NULL}, - { "engine_free", _wrap_engine_free, METH_O, NULL}, - { "engine_init", _wrap_engine_init, METH_O, NULL}, - { "engine_finish", _wrap_engine_finish, METH_O, NULL}, - { "engine_get_id", _wrap_engine_get_id, METH_O, NULL}, - { "engine_get_name", _wrap_engine_get_name, METH_O, NULL}, - { "engine_ctrl_cmd_string", _wrap_engine_ctrl_cmd_string, METH_VARARGS, NULL}, - { "ui_openssl", _wrap_ui_openssl, METH_NOARGS, NULL}, - { "engine_pkcs11_data_new", _wrap_engine_pkcs11_data_new, METH_O, NULL}, - { "engine_pkcs11_data_free", _wrap_engine_pkcs11_data_free, METH_O, NULL}, - { "engine_load_private_key", _wrap_engine_load_private_key, METH_VARARGS, NULL}, - { "engine_load_public_key", _wrap_engine_load_public_key, METH_VARARGS, NULL}, - { "engine_init_error", _wrap_engine_init_error, METH_O, NULL}, - { "engine_load_certificate", _wrap_engine_load_certificate, METH_VARARGS, NULL}, - { "engine_set_default", _wrap_engine_set_default, METH_VARARGS, NULL}, - { "obj_nid2obj", _wrap_obj_nid2obj, METH_O, NULL}, - { "obj_nid2ln", _wrap_obj_nid2ln, METH_O, NULL}, - { "obj_nid2sn", _wrap_obj_nid2sn, METH_O, NULL}, - { "obj_obj2nid", _wrap_obj_obj2nid, METH_O, NULL}, - { "obj_ln2nid", _wrap_obj_ln2nid, METH_O, NULL}, - { "obj_sn2nid", _wrap_obj_sn2nid, METH_O, NULL}, - { "obj_txt2nid", _wrap_obj_txt2nid, METH_O, NULL}, - { "obj_txt2obj", _wrap_obj_txt2obj, METH_VARARGS, NULL}, - { "_obj_obj2txt", _wrap__obj_obj2txt, METH_VARARGS, NULL}, - { "obj_obj2txt", _wrap_obj_obj2txt, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ +#endif + }, + (PyObject*) 0, /* ht_name */ + (PyObject*) 0, /* ht_slots */ }; -static PyMethodDef SwigMethods_proxydocs[] = { - { NULL, NULL, 0, NULL } -}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__stack_st_OPENSSL_BLOCK_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type}; -static SwigPyGetSet BIO_PYFD_CTX___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_BIO_PYFD_CTX) static SwigPyGetSet BIO_PYFD_CTX_fd_getset = { _wrap_BIO_PYFD_CTX_fd_get, _wrap_BIO_PYFD_CTX_fd_set }; SWIGINTERN PyGetSetDef SwigPyBuiltin__pyfd_struct_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"", &BIO_PYFD_CTX___dict___getset }, - { (char *)"fd", SwigPyBuiltin_FunpackGetterClosure, SwigPyBuiltin_FunpackSetterClosure, (char *)"", &BIO_PYFD_CTX_fd_getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ + { (char*) "fd", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"pyfd_struct.fd", (void*) &BIO_PYFD_CTX_fd_getset } +, + {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; SWIGINTERN PyObject * SwigPyBuiltin__pyfd_struct_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); if (!result) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); @@ -32640,6 +31499,7 @@ SwigPyBuiltin__pyfd_struct_richcompare(PyObject *self, PyObject *other, int op) Py_INCREF(result); } } + Py_DECREF(tuple); return result; } @@ -32655,10 +31515,10 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "m2crypto.BIO_PYFD_CTX", /* tp_name */ + "BIO_PYFD_CTX", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_BIO_PYFD_CTX_destructor_closure, /* tp_dealloc */ + (destructor) _wrap_delete_BIO_PYFD_CTX_closure, /* tp_dealloc */ (printfunc) 0, /* tp_print */ (getattrfunc) 0, /* tp_getattr */ (setattrfunc) 0, /* tp_setattr */ @@ -32668,15 +31528,15 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__pyfd_struct_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__pyfd_struct_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__pyfd_struct_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ + &SwigPyBuiltin__pyfd_struct_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__pyfd_struct_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__pyfd_struct_type.as_mapping, /* tp_as_mapping */ + (hashfunc) 0, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__pyfd_struct_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__pyfd_struct_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else @@ -32685,7 +31545,7 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { "::pyfd_struct", /* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__pyfd_struct_richcompare, /* tp_richcompare */ + (richcmpfunc) SwigPyBuiltin__pyfd_struct_richcompare, /* feature:python:tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ @@ -32696,43 +31556,22 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_BIO_PYFD_CTX, /* tp_init */ + (size_t)(((char*)&((SwigPyObject *) 64L)->dict) - (char*) 64L), /* tp_dictoffset */ + (initproc) _wrap_new_BIO_PYFD_CTX, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ + (PyObject*) 0, /* tp_bases */ + (PyObject*) 0, /* tp_mro */ + (PyObject*) 0, /* tp_cache */ + (PyObject*) 0, /* tp_subclasses */ + (PyObject*) 0, /* tp_weaklist */ (destructor) 0, /* tp_del */ +#if PY_VERSION_HEX >= 0x02060000 (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ #endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ }, -#endif { (binaryfunc) 0, /* nb_add */ (binaryfunc) 0, /* nb_subtract */ @@ -32758,7 +31597,7 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { #endif (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void*) 0, /* nb_reserved */ #else (unaryfunc) 0, /* nb_long */ #endif @@ -32784,10 +31623,8 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { (binaryfunc) 0, /* nb_true_divide */ (binaryfunc) 0, /* nb_inplace_floor_divide */ (binaryfunc) 0, /* nb_inplace_true_divide */ +#if PY_VERSION_HEX >= 0x02050000 (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { @@ -32801,13 +31638,13 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void*) 0, /* was_sq_slice */ #else (ssizessizeargfunc) 0, /* sq_slice */ #endif (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void*) 0, /* was_sq_ass_slice */ #else (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif @@ -32822,32 +31659,35 @@ static PyHeapTypeObject SwigPyBuiltin__pyfd_struct_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif +#if PY_VERSION_HEX >= 0x02060000 (getbufferproc) 0, /* bf_getbuffer */ (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ #endif + }, + (PyObject*) 0, /* ht_name */ + (PyObject*) 0, /* ht_slots */ }; SWIGINTERN SwigPyClientData SwigPyBuiltin__pyfd_struct_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__pyfd_struct_type}; -static SwigPyGetSet _cbd_t___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete__cbd_t) static SwigPyGetSet _cbd_t_password_getset = { _wrap__cbd_t_password_get, _wrap__cbd_t_password_set }; static SwigPyGetSet _cbd_t_prompt_getset = { _wrap__cbd_t_prompt_get, _wrap__cbd_t_prompt_set }; SWIGINTERN PyGetSetDef SwigPyBuiltin___cbd_t_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"", &_cbd_t___dict___getset }, - { (char *)"password", SwigPyBuiltin_FunpackGetterClosure, SwigPyBuiltin_FunpackSetterClosure, (char *)"", &_cbd_t_password_getset }, - { (char *)"prompt", SwigPyBuiltin_FunpackGetterClosure, SwigPyBuiltin_FunpackSetterClosure, (char *)"", &_cbd_t_prompt_getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ + { (char*) "password", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"_cbd_t.password", (void*) &_cbd_t_password_getset } +, + { (char*) "prompt", (getter) SwigPyBuiltin_GetterClosure, (setter) SwigPyBuiltin_SetterClosure, (char*)"_cbd_t.prompt", (void*) &_cbd_t_prompt_getset } +, + {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; SWIGINTERN PyObject * SwigPyBuiltin___cbd_t_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); if (!result) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); @@ -32856,6 +31696,7 @@ SwigPyBuiltin___cbd_t_richcompare(PyObject *self, PyObject *other, int op) { Py_INCREF(result); } } + Py_DECREF(tuple); return result; } @@ -32871,10 +31712,10 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "m2crypto._cbd_t", /* tp_name */ + "_cbd_t", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete__cbd_t_destructor_closure, /* tp_dealloc */ + (destructor) _wrap_delete__cbd_t_closure, /* tp_dealloc */ (printfunc) 0, /* tp_print */ (getattrfunc) 0, /* tp_getattr */ (setattrfunc) 0, /* tp_setattr */ @@ -32884,15 +31725,15 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin___cbd_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin___cbd_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin___cbd_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ + &SwigPyBuiltin___cbd_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin___cbd_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin___cbd_t_type.as_mapping, /* tp_as_mapping */ + (hashfunc) 0, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin___cbd_t_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin___cbd_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else @@ -32901,7 +31742,7 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { "::_cbd_t", /* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin___cbd_t_richcompare, /* tp_richcompare */ + (richcmpfunc) SwigPyBuiltin___cbd_t_richcompare, /* feature:python:tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ @@ -32912,43 +31753,22 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new__cbd_t, /* tp_init */ + (size_t)(((char*)&((SwigPyObject *) 64L)->dict) - (char*) 64L), /* tp_dictoffset */ + (initproc) _wrap_new__cbd_t, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ + (PyObject*) 0, /* tp_bases */ + (PyObject*) 0, /* tp_mro */ + (PyObject*) 0, /* tp_cache */ + (PyObject*) 0, /* tp_subclasses */ + (PyObject*) 0, /* tp_weaklist */ (destructor) 0, /* tp_del */ +#if PY_VERSION_HEX >= 0x02060000 (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ #endif }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ - }, -#endif { (binaryfunc) 0, /* nb_add */ (binaryfunc) 0, /* nb_subtract */ @@ -32974,7 +31794,7 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { #endif (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void*) 0, /* nb_reserved */ #else (unaryfunc) 0, /* nb_long */ #endif @@ -33000,10 +31820,8 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { (binaryfunc) 0, /* nb_true_divide */ (binaryfunc) 0, /* nb_inplace_floor_divide */ (binaryfunc) 0, /* nb_inplace_true_divide */ +#if PY_VERSION_HEX >= 0x02050000 (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { @@ -33017,13 +31835,13 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void*) 0, /* was_sq_slice */ #else (ssizessizeargfunc) 0, /* sq_slice */ #endif (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void*) 0, /* was_sq_ass_slice */ #else (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif @@ -33038,15 +31856,13 @@ static PyHeapTypeObject SwigPyBuiltin___cbd_t_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif +#if PY_VERSION_HEX >= 0x02060000 (getbufferproc) 0, /* bf_getbuffer */ (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ #endif + }, + (PyObject*) 0, /* ht_name */ + (PyObject*) 0, /* ht_slots */ }; SWIGINTERN SwigPyClientData SwigPyBuiltin___cbd_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin___cbd_t_type}; @@ -33095,43 +31911,21 @@ static swig_type_info _swigt__p_X509_NAME_ENTRY = {"_p_X509_NAME_ENTRY", "X509_N static swig_type_info _swigt__p_X509_REQ = {"_p_X509_REQ", "X509_REQ *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_X509_STORE = {"_p_X509_STORE", "X509_STORE *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_X509_STORE_CTX = {"_p_X509_STORE_CTX", "X509_STORE_CTX *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INTMAX_TYPE__ = {"_p___INTMAX_TYPE__", "__INTMAX_TYPE__ *|intmax_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_FAST16_TYPE__ = {"_p___INT_FAST16_TYPE__", "__INT_FAST16_TYPE__ *|int_fast16_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_FAST32_TYPE__ = {"_p___INT_FAST32_TYPE__", "__INT_FAST32_TYPE__ *|int_fast32_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_FAST64_TYPE__ = {"_p___INT_FAST64_TYPE__", "__INT_FAST64_TYPE__ *|int_fast64_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_FAST8_TYPE__ = {"_p___INT_FAST8_TYPE__", "__INT_FAST8_TYPE__ *|int_fast8_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_LEAST16_TYPE__ = {"_p___INT_LEAST16_TYPE__", "__INT_LEAST16_TYPE__ *|int_least16_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_LEAST32_TYPE__ = {"_p___INT_LEAST32_TYPE__", "__INT_LEAST32_TYPE__ *|int_least32_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_LEAST64_TYPE__ = {"_p___INT_LEAST64_TYPE__", "__INT_LEAST64_TYPE__ *|int_least64_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___INT_LEAST8_TYPE__ = {"_p___INT_LEAST8_TYPE__", "__INT_LEAST8_TYPE__ *|int_least8_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINTMAX_TYPE__ = {"_p___UINTMAX_TYPE__", "__UINTMAX_TYPE__ *|uintmax_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_FAST16_TYPE__ = {"_p___UINT_FAST16_TYPE__", "__UINT_FAST16_TYPE__ *|uint_fast16_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_FAST32_TYPE__ = {"_p___UINT_FAST32_TYPE__", "__UINT_FAST32_TYPE__ *|uint_fast32_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_FAST64_TYPE__ = {"_p___UINT_FAST64_TYPE__", "__UINT_FAST64_TYPE__ *|uint_fast64_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_FAST8_TYPE__ = {"_p___UINT_FAST8_TYPE__", "__UINT_FAST8_TYPE__ *|uint_fast8_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_LEAST16_TYPE__ = {"_p___UINT_LEAST16_TYPE__", "__UINT_LEAST16_TYPE__ *|uint_least16_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_LEAST32_TYPE__ = {"_p___UINT_LEAST32_TYPE__", "__UINT_LEAST32_TYPE__ *|uint_least32_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_LEAST64_TYPE__ = {"_p___UINT_LEAST64_TYPE__", "__UINT_LEAST64_TYPE__ *|uint_least64_t *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p___UINT_LEAST8_TYPE__ = {"_p___UINT_LEAST8_TYPE__", "__UINT_LEAST8_TYPE__ *|uint_least8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p__cbd_t = {"_p__cbd_t", "_cbd_t *", 0, 0, (void*)&SwigPyBuiltin___cbd_t_clientdata, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_int_p_X509_STORE_CTX__int = {"_p_f_int_p_X509_STORE_CTX__int", "int (*)(int,X509_STORE_CTX *)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_char__void = {"_p_f_p_char__void", "void (*)(char *)|sk_OPENSSL_STRING_freefunc|sk_OPENSSL_CSTRING_freefunc", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_q_const__char__p_char = {"_p_f_p_q_const__char__p_char", "char *(*)(char const *)|sk_OPENSSL_STRING_copyfunc|sk_OPENSSL_CSTRING_copyfunc", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int = {"_p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int", "int (*)(char const *const *,char const *const *)|sk_OPENSSL_STRING_compfunc|sk_OPENSSL_CSTRING_compfunc", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int = {"_p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int", "int (*)(void const *const *,void const *const *)|sk_OPENSSL_BLOCK_compfunc", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_q_const__void__p_void = {"_p_f_p_q_const__void__p_void", "void *(*)(void const *)|OPENSSL_sk_copyfunc|sk_OPENSSL_BLOCK_copyfunc", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_q_const__void_p_q_const__void__int = {"_p_f_p_q_const__void_p_q_const__void__int", "int (*)(void const *,void const *)|OPENSSL_sk_compfunc", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "OPENSSL_sk_freefunc|sk_OPENSSL_BLOCK_freefunc|void (*)(void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__void_p_q_const__void__int = {"_p_f_p_q_const__void_p_q_const__void__int", "int (*)(void const *,void const *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_void__p_void = {"_p_f_p_void__p_void", "void *(*)(void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_ASN1_OBJECT = {"_p_p_ASN1_OBJECT", "ASN1_OBJECT **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_EVP_PKEY_CTX = {"_p_p_EVP_PKEY_CTX", "EVP_PKEY_CTX **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_X509_NAME_ENTRY = {"_p_p_X509_NAME_ENTRY", "X509_NAME_ENTRY **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_unsigned_char = {"_p_p_unsigned_char", "unsigned char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pyfd_struct = {"_p_pyfd_struct", "BIO_PYFD_CTX *|struct pyfd_struct *|pyfd_struct *", 0, 0, (void*)&SwigPyBuiltin__pyfd_struct_clientdata, 0}; -static swig_type_info _swigt__p_stack_st = {"_p_stack_st", "struct stack_st *|OPENSSL_STACK *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_stack_st_OPENSSL_BLOCK = {"_p_stack_st_OPENSSL_BLOCK", "struct stack_st_OPENSSL_BLOCK *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_stack_st_OPENSSL_CSTRING = {"_p_stack_st_OPENSSL_CSTRING", "struct stack_st_OPENSSL_CSTRING *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_stack_st_OPENSSL_STRING = {"_p_stack_st_OPENSSL_STRING", "struct stack_st_OPENSSL_STRING *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_stack_st = {"_p_stack_st", "struct stack_st *|stack_st *|_STACK *", 0, 0, (void*)&SwigPyBuiltin__stack_st_clientdata, 0}; +static swig_type_info _swigt__p_stack_st_OPENSSL_BLOCK = {"_p_stack_st_OPENSSL_BLOCK", "struct stack_st_OPENSSL_BLOCK *|stack_st_OPENSSL_BLOCK *", 0, 0, (void*)&SwigPyBuiltin__stack_st_OPENSSL_BLOCK_clientdata, 0}; +static swig_type_info _swigt__p_stack_st_OPENSSL_STRING = {"_p_stack_st_OPENSSL_STRING", "struct stack_st_OPENSSL_STRING *|stack_st_OPENSSL_STRING *", 0, 0, (void*)&SwigPyBuiltin__stack_st_OPENSSL_STRING_clientdata, 0}; static swig_type_info _swigt__p_stack_st_SSL_CIPHER = {"_p_stack_st_SSL_CIPHER", "struct stack_st_SSL_CIPHER *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_stack_st_X509 = {"_p_stack_st_X509", "struct stack_st_X509 *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_stack_st_X509_EXTENSION = {"_p_stack_st_X509_EXTENSION", "struct stack_st_X509_EXTENSION *", 0, 0, (void*)0, 0}; @@ -33180,42 +31974,20 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_X509_REQ, &_swigt__p_X509_STORE, &_swigt__p_X509_STORE_CTX, - &_swigt__p___INTMAX_TYPE__, - &_swigt__p___INT_FAST16_TYPE__, - &_swigt__p___INT_FAST32_TYPE__, - &_swigt__p___INT_FAST64_TYPE__, - &_swigt__p___INT_FAST8_TYPE__, - &_swigt__p___INT_LEAST16_TYPE__, - &_swigt__p___INT_LEAST32_TYPE__, - &_swigt__p___INT_LEAST64_TYPE__, - &_swigt__p___INT_LEAST8_TYPE__, - &_swigt__p___UINTMAX_TYPE__, - &_swigt__p___UINT_FAST16_TYPE__, - &_swigt__p___UINT_FAST32_TYPE__, - &_swigt__p___UINT_FAST64_TYPE__, - &_swigt__p___UINT_FAST8_TYPE__, - &_swigt__p___UINT_LEAST16_TYPE__, - &_swigt__p___UINT_LEAST32_TYPE__, - &_swigt__p___UINT_LEAST64_TYPE__, - &_swigt__p___UINT_LEAST8_TYPE__, &_swigt__p__cbd_t, &_swigt__p_char, &_swigt__p_f_int_p_X509_STORE_CTX__int, - &_swigt__p_f_p_char__void, - &_swigt__p_f_p_q_const__char__p_char, - &_swigt__p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int, - &_swigt__p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int, - &_swigt__p_f_p_q_const__void__p_void, &_swigt__p_f_p_q_const__void_p_q_const__void__int, + &_swigt__p_f_p_void__p_void, &_swigt__p_f_p_void__void, &_swigt__p_p_ASN1_OBJECT, &_swigt__p_p_EVP_PKEY_CTX, &_swigt__p_p_X509_NAME_ENTRY, + &_swigt__p_p_char, &_swigt__p_p_unsigned_char, &_swigt__p_pyfd_struct, &_swigt__p_stack_st, &_swigt__p_stack_st_OPENSSL_BLOCK, - &_swigt__p_stack_st_OPENSSL_CSTRING, &_swigt__p_stack_st_OPENSSL_STRING, &_swigt__p_stack_st_SSL_CIPHER, &_swigt__p_stack_st_X509, @@ -33265,42 +32037,20 @@ static swig_cast_info _swigc__p_X509_NAME_ENTRY[] = { {&_swigt__p_X509_NAME_ENT static swig_cast_info _swigc__p_X509_REQ[] = { {&_swigt__p_X509_REQ, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_X509_STORE[] = { {&_swigt__p_X509_STORE, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_X509_STORE_CTX[] = { {&_swigt__p_X509_STORE_CTX, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INTMAX_TYPE__[] = { {&_swigt__p___INTMAX_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_FAST16_TYPE__[] = { {&_swigt__p___INT_FAST16_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_FAST32_TYPE__[] = { {&_swigt__p___INT_FAST32_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_FAST64_TYPE__[] = { {&_swigt__p___INT_FAST64_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_FAST8_TYPE__[] = { {&_swigt__p___INT_FAST8_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_LEAST16_TYPE__[] = { {&_swigt__p___INT_LEAST16_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_LEAST32_TYPE__[] = { {&_swigt__p___INT_LEAST32_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_LEAST64_TYPE__[] = { {&_swigt__p___INT_LEAST64_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___INT_LEAST8_TYPE__[] = { {&_swigt__p___INT_LEAST8_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINTMAX_TYPE__[] = { {&_swigt__p___UINTMAX_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_FAST16_TYPE__[] = { {&_swigt__p___UINT_FAST16_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_FAST32_TYPE__[] = { {&_swigt__p___UINT_FAST32_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_FAST64_TYPE__[] = { {&_swigt__p___UINT_FAST64_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_FAST8_TYPE__[] = { {&_swigt__p___UINT_FAST8_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_LEAST16_TYPE__[] = { {&_swigt__p___UINT_LEAST16_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_LEAST32_TYPE__[] = { {&_swigt__p___UINT_LEAST32_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_LEAST64_TYPE__[] = { {&_swigt__p___UINT_LEAST64_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p___UINT_LEAST8_TYPE__[] = { {&_swigt__p___UINT_LEAST8_TYPE__, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p__cbd_t[] = { {&_swigt__p__cbd_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_int_p_X509_STORE_CTX__int[] = { {&_swigt__p_f_int_p_X509_STORE_CTX__int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_char__void[] = { {&_swigt__p_f_p_char__void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_q_const__char__p_char[] = { {&_swigt__p_f_p_q_const__char__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int[] = { {&_swigt__p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int[] = { {&_swigt__p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_p_q_const__void__p_void[] = { {&_swigt__p_f_p_q_const__void__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_q_const__void_p_q_const__void__int[] = { {&_swigt__p_f_p_q_const__void_p_q_const__void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_void__p_void[] = { {&_swigt__p_f_p_void__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_ASN1_OBJECT[] = { {&_swigt__p_p_ASN1_OBJECT, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_EVP_PKEY_CTX[] = { {&_swigt__p_p_EVP_PKEY_CTX, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_X509_NAME_ENTRY[] = { {&_swigt__p_p_X509_NAME_ENTRY, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_unsigned_char[] = { {&_swigt__p_p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pyfd_struct[] = { {&_swigt__p_pyfd_struct, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_stack_st[] = { {&_swigt__p_stack_st, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_stack_st_OPENSSL_BLOCK[] = { {&_swigt__p_stack_st_OPENSSL_BLOCK, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_stack_st_OPENSSL_CSTRING[] = { {&_swigt__p_stack_st_OPENSSL_CSTRING, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_stack_st_OPENSSL_STRING[] = { {&_swigt__p_stack_st_OPENSSL_STRING, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_stack_st_SSL_CIPHER[] = { {&_swigt__p_stack_st_SSL_CIPHER, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_stack_st_X509[] = { {&_swigt__p_stack_st_X509, 0, 0, 0},{0, 0, 0, 0}}; @@ -33350,42 +32100,20 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_X509_REQ, _swigc__p_X509_STORE, _swigc__p_X509_STORE_CTX, - _swigc__p___INTMAX_TYPE__, - _swigc__p___INT_FAST16_TYPE__, - _swigc__p___INT_FAST32_TYPE__, - _swigc__p___INT_FAST64_TYPE__, - _swigc__p___INT_FAST8_TYPE__, - _swigc__p___INT_LEAST16_TYPE__, - _swigc__p___INT_LEAST32_TYPE__, - _swigc__p___INT_LEAST64_TYPE__, - _swigc__p___INT_LEAST8_TYPE__, - _swigc__p___UINTMAX_TYPE__, - _swigc__p___UINT_FAST16_TYPE__, - _swigc__p___UINT_FAST32_TYPE__, - _swigc__p___UINT_FAST64_TYPE__, - _swigc__p___UINT_FAST8_TYPE__, - _swigc__p___UINT_LEAST16_TYPE__, - _swigc__p___UINT_LEAST32_TYPE__, - _swigc__p___UINT_LEAST64_TYPE__, - _swigc__p___UINT_LEAST8_TYPE__, _swigc__p__cbd_t, _swigc__p_char, _swigc__p_f_int_p_X509_STORE_CTX__int, - _swigc__p_f_p_char__void, - _swigc__p_f_p_q_const__char__p_char, - _swigc__p_f_p_q_const__p_q_const__char_p_q_const__p_q_const__char__int, - _swigc__p_f_p_q_const__p_q_const__void_p_q_const__p_q_const__void__int, - _swigc__p_f_p_q_const__void__p_void, _swigc__p_f_p_q_const__void_p_q_const__void__int, + _swigc__p_f_p_void__p_void, _swigc__p_f_p_void__void, _swigc__p_p_ASN1_OBJECT, _swigc__p_p_EVP_PKEY_CTX, _swigc__p_p_X509_NAME_ENTRY, + _swigc__p_p_char, _swigc__p_p_unsigned_char, _swigc__p_pyfd_struct, _swigc__p_stack_st, _swigc__p_stack_st_OPENSSL_BLOCK, - _swigc__p_stack_st_OPENSSL_CSTRING, _swigc__p_stack_st_OPENSSL_STRING, _swigc__p_stack_st_SSL_CIPHER, _swigc__p_stack_st_X509, @@ -33407,18 +32135,18 @@ static PyTypeObject *builtin_bases[2]; /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned statically to an initial + * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the @@ -33428,17 +32156,17 @@ static PyTypeObject *builtin_bases[2]; * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -33462,7 +32190,7 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; - int init; + int found, init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { @@ -33481,23 +32209,27 @@ SWIG_InitializeModule(void *clientdata) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; iter=module_head; do { if (iter==&swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; + found=1; + break; } iter=iter->next; } while (iter!= module_head); - /* otherwise we must add our module into the list */ + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } - /* When multiple interpreters are used, a module could have already been initialized in + /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ @@ -33505,7 +32237,7 @@ SWIG_InitializeModule(void *clientdata) { /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); + printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; @@ -33513,7 +32245,7 @@ SWIG_InitializeModule(void *clientdata) { swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ @@ -33588,7 +32320,7 @@ SWIG_InitializeModule(void *clientdata) { for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; @@ -33710,6 +32442,17 @@ extern "C" { return str; } + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + char *tmp; + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + SWIG_Python_str_DelForPy3(tmp); + Py_DECREF(str); + return 0; + } + SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; @@ -33733,7 +32476,7 @@ extern "C" { var = var->next; } if (res == NULL && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } @@ -33750,7 +32493,7 @@ extern "C" { var = var->next; } if (res == 1 && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } @@ -33762,17 +32505,18 @@ extern "C" { static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "swigvarlink", /* tp_name */ + (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ - 0, /* tp_print */ + (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ @@ -33792,30 +32536,27 @@ extern "C" { 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ #endif -#if PY_VERSION_HEX >= 0x03080000 - 0, /* tp_vectorcall */ +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ #endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0 /* tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + varlink_type.ob_type = &PyType_Type; +#else if (PyType_Ready(&varlink_type) < 0) return NULL; +#endif } return &varlink_type; } @@ -33831,14 +32572,14 @@ extern "C" { } SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { - memcpy(gv->name, name, size); + strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; @@ -33849,11 +32590,9 @@ extern "C" { SWIGINTERN PyObject * SWIG_globals(void) { - static PyObject *globals = 0; - if (!globals) { - globals = SWIG_newvarlink(); - } - return globals; + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; } /* ----------------------------------------------------------------------------- @@ -33896,9 +32635,7 @@ extern "C" { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; - if (!c) continue; - c = strstr(c, "swig_ptr: "); - if (c) { + if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; @@ -33919,9 +32656,9 @@ extern "C" { char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; - memcpy(buff, methods[i].ml_doc, ldoc); + strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; - memcpy(buff, "swig_ptr: ", 10); + strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; @@ -33932,64 +32669,6 @@ extern "C" { } } - /* ----------------------------------------------------------------------------- - * Method creation and docstring support functions - * ----------------------------------------------------------------------------- */ - - /* ----------------------------------------------------------------------------- - * Function to find the method definition with the correct docstring for the - * proxy module as opposed to the low-level API - * ----------------------------------------------------------------------------- */ - - SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { - /* Find the function in the modified method table */ - size_t offset = 0; - int found = 0; - while (SwigMethods_proxydocs[offset].ml_meth != NULL) { - if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { - found = 1; - break; - } - offset++; - } - /* Use the copy with the modified docstring if available */ - return found ? &SwigMethods_proxydocs[offset] : NULL; - } - - /* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ - - SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { - if (PyCFunction_Check(func)) { - PyCFunctionObject *funcobj = (PyCFunctionObject *)func; - PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); - if (ml) - func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); - } -#if PY_VERSION_HEX >= 0x03000000 - return PyInstanceMethod_New(func); -#else - return PyMethod_New(func, NULL, NULL); -#endif - } - - /* ----------------------------------------------------------------------------- - * Wrapper of PyStaticMethod_New() - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ - - SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { - if (PyCFunction_Check(func)) { - PyCFunctionObject *funcobj = (PyCFunctionObject *)func; - PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); - if (ml) - func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); - } - return PyStaticMethod_New(func); - } - #ifdef __cplusplus } #endif @@ -34009,12 +32688,20 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d, *md, *globals; - + PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { +# if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, - SWIG_name, +# else + { + PyObject_HEAD_INIT(NULL) + NULL, /* m_init */ + 0, /* m_index */ + NULL, /* m_copy */ + }, +# endif + (char *) SWIG_name, NULL, -1, SwigMethods, @@ -34033,24 +32720,23 @@ SWIG_init(void) { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { - SwigPyObject_own, - SwigPyObject_own + (PyCFunction) SwigPyObject_own, + (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; + PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; - PyTypeObject *swigpyobject; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; - PyObject *self = 0; int i; (void)builtin_pytype; @@ -34058,21 +32744,15 @@ SWIG_init(void) { (void)builtin_basetype; (void)tuple; (void)static_getset; - (void)self; - /* Metaclass is used to implement static member variables */ - metatype = SwigPyObjectType(); + /* metatype is used to implement static member variables. */ + metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); + assert(metatype_args); + metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); -#endif - - (void)globals; - - /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ - SWIG_This(); - SWIG_Python_TypeCache(); - SwigPyPacked_type(); -#ifndef SWIGPYTHON_BUILTIN - SwigPyObject_type(); + Py_DECREF(metatype_args); + metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; + assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ @@ -34081,24 +32761,21 @@ SWIG_init(void) { #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else - m = Py_InitModule(SWIG_name, SwigMethods); + m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif - md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN - swigpyobject = SwigPyObject_TypeOnce(); - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = swigpyobject; - } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); + } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; @@ -34129,14 +32806,80 @@ SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_VERSION_NUMBER",SWIG_From_long((long)(0x1010108fL))); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_VERSION_TEXT",SWIG_FromCharPtr("OpenSSL 1.1.1h 22 Sep 2020")); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_VERSION_NUMBER",SWIG_From_long((long)(0x100020bfL))); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_VERSION_TEXT",SWIG_FromCharPtr("OpenSSL 1.0.2k 26 Jan 2017")); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_VERSION_PTEXT",SWIG_FromCharPtr(" part of OpenSSL 1.0.2k 26 Jan 2017")); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "SHLIB_VERSION_HISTORY",SWIG_FromCharPtr("")); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "SHLIB_VERSION_NUMBER",SWIG_FromCharPtr("1.1")); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_FILE",SWIG_FromCharPtr("/usr/include/openssl/opensslconf.h")); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_LINE",SWIG_From_int((int)(134))); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_MIN_API",SWIG_From_int((int)(0))); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_API_COMPAT",SWIG_From_int((int)(0))); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "SHLIB_VERSION_NUMBER",SWIG_FromCharPtr("1.0.2k")); + + /* type '::stack_st' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__stack_st_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type '_STACK'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "_STACK", (PyObject*) builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "_STACK"); + d = md; + + /* type '::stack_st_OPENSSL_STRING' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__stack_st_OPENSSL_STRING_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'stack_st_OPENSSL_STRING'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "stack_st_OPENSSL_STRING", (PyObject*) builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "stack_st_OPENSSL_STRING"); + d = md; + + /* type '::stack_st_OPENSSL_BLOCK' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__stack_st_OPENSSL_BLOCK_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'stack_st_OPENSSL_BLOCK'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "stack_st_OPENSSL_BLOCK", (PyObject*) builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "stack_st_OPENSSL_BLOCK"); + d = md; SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "bio_noclose",SWIG_From_int((int)(BIO_NOCLOSE))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "bio_close",SWIG_From_int((int)(BIO_CLOSE))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "BIO_FLAGS_READ",SWIG_From_int((int)(0x01))); @@ -34145,19 +32888,9 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "BIO_FLAGS_RWS",SWIG_From_int((int)((BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "BIO_FLAGS_SHOULD_RETRY",SWIG_From_int((int)(0x08))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "BIO_FLAGS_MEM_RDONLY",SWIG_From_int((int)(0x200))); - globals = SWIG_globals(); - if (!globals) { - PyErr_SetString(PyExc_TypeError, "Failure to create SWIG globals."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - PyDict_SetItemString(md, "cvar", globals); - Py_DECREF(globals); + PyDict_SetItemString(md,(char*)"cvar", SWIG_globals()); SwigPyBuiltin_AddPublicSymbol(public_interface, "cvar"); - SWIG_addvarlink(globals, "_bio_err", Swig_var__bio_err_get, Swig_var__bio_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_bio_err",Swig_var__bio_err_get, Swig_var__bio_err_set); /* type '::pyfd_struct' */ builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__pyfd_struct_type; @@ -34178,13 +32911,13 @@ SWIG_init(void) { #endif } Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "BIO_PYFD_CTX", (PyObject *)builtin_pytype); + PyModule_AddObject(m, "BIO_PYFD_CTX", (PyObject*) builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "BIO_PYFD_CTX"); d = md; - SWIG_addvarlink(globals, "methods_fdp", Swig_var_methods_fdp_get, Swig_var_methods_fdp_set); - SWIG_addvarlink(globals, "_rand_err", Swig_var__rand_err_get, Swig_var__rand_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"methods_fdp",Swig_var_methods_fdp_get, Swig_var_methods_fdp_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_rand_err",Swig_var__rand_err_get, Swig_var__rand_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PKCS5_SALT_LEN",SWIG_From_int((int)(8))); - SWIG_addvarlink(globals, "_evp_err", Swig_var__evp_err_get, Swig_var__evp_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_evp_err",Swig_var__evp_err_get, Swig_var__evp_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "AES_BLOCK_SIZE",SWIG_From_int((int)(AES_BLOCK_SIZE))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_NO_RC4",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "dh_check_ok",SWIG_From_int((int)(0))); @@ -34194,7 +32927,7 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "dh_check_bad_g",SWIG_From_int((int)(DH_NOT_SUITABLE_GENERATOR))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "DH_GENERATOR_2",SWIG_From_int((int)(2))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "DH_GENERATOR_5",SWIG_From_int((int)(5))); - SWIG_addvarlink(globals, "_dh_err", Swig_var__dh_err_get, Swig_var__dh_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_dh_err",Swig_var__dh_err_get, Swig_var__dh_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "no_padding",SWIG_From_int((int)(RSA_NO_PADDING))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "pkcs1_padding",SWIG_From_int((int)(RSA_PKCS1_PADDING))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "pkcs1_oaep_padding",SWIG_From_int((int)(RSA_PKCS1_OAEP_PADDING))); @@ -34205,8 +32938,8 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_sha512",SWIG_From_int((int)(NID_sha512))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_md5",SWIG_From_int((int)(NID_md5))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_ripemd160",SWIG_From_int((int)(NID_ripemd160))); - SWIG_addvarlink(globals, "_rsa_err", Swig_var__rsa_err_get, Swig_var__rsa_err_set); - SWIG_addvarlink(globals, "_dsa_err", Swig_var__dsa_err_get, Swig_var__dsa_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_rsa_err",Swig_var__rsa_err_get, Swig_var__rsa_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_dsa_err",Swig_var__dsa_err_get, Swig_var__dsa_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ssl_error_none",SWIG_From_int((int)(SSL_ERROR_NONE))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ssl_error_ssl",SWIG_From_int((int)(SSL_ERROR_SSL))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ssl_error_want_read",SWIG_From_int((int)(SSL_ERROR_WANT_READ))); @@ -34255,8 +32988,8 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "SSL_MODE_ENABLE_PARTIAL_WRITE",SWIG_From_int((int)(SSL_MODE_ENABLE_PARTIAL_WRITE))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER",SWIG_From_int((int)(SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "SSL_MODE_AUTO_RETRY",SWIG_From_int((int)(SSL_MODE_AUTO_RETRY))); - SWIG_addvarlink(globals, "_ssl_err", Swig_var__ssl_err_get, Swig_var__ssl_err_set); - SWIG_addvarlink(globals, "_ssl_timeout_err", Swig_var__ssl_timeout_err_get, Swig_var__ssl_timeout_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_ssl_err",Swig_var__ssl_err_get, Swig_var__ssl_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_ssl_timeout_err",Swig_var__ssl_timeout_err_get, Swig_var__ssl_timeout_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "X509_TRUST_DEFAULT",SWIG_From_int((int)(-1))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "X509_TRUST_COMPAT",SWIG_From_int((int)(1))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "X509_TRUST_SSL_CLIENT",SWIG_From_int((int)(2))); @@ -34336,7 +33069,7 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "XN_FLAG_RFC2253",SWIG_From_int((int)((ASN1_STRFLGS_RFC2253|XN_FLAG_SEP_COMMA_PLUS|XN_FLAG_DN_REV|XN_FLAG_DUMP_UNKNOWN_FIELDS)))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "RSA_3",SWIG_From_int((int)(0x3L))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "RSA_F4",SWIG_From_int((int)(0x10001L))); - SWIG_addvarlink(globals, "_x509_err", Swig_var__x509_err_get, Swig_var__x509_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_x509_err",Swig_var__x509_err_get, Swig_var__x509_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ASN1_STRFLGS_ESC_2253",SWIG_From_int((int)(1))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ASN1_STRFLGS_ESC_CTRL",SWIG_From_int((int)(2))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ASN1_STRFLGS_ESC_MSB",SWIG_From_int((int)(4))); @@ -34361,9 +33094,9 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PKCS7_ENVELOPED",SWIG_From_int((int)(NID_pkcs7_enveloped))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PKCS7_SIGNED_ENVELOPED",SWIG_From_int((int)(NID_pkcs7_signedAndEnveloped))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PKCS7_DATA",SWIG_From_int((int)(NID_pkcs7_data))); - SWIG_addvarlink(globals, "_pkcs7_err", Swig_var__pkcs7_err_get, Swig_var__pkcs7_err_set); - SWIG_addvarlink(globals, "_smime_err", Swig_var__smime_err_get, Swig_var__smime_err_set); - SWIG_addvarlink(globals, "_util_err", Swig_var__util_err_get, Swig_var__util_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_pkcs7_err",Swig_var__pkcs7_err_get, Swig_var__pkcs7_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_smime_err",Swig_var__smime_err_get, Swig_var__smime_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_util_err",Swig_var__util_err_get, Swig_var__util_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "OPENSSL_NO_EC",SWIG_From_int((int)(0))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_secp112r1",SWIG_From_int((int)(NID_secp112r1))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_secp112r2",SWIG_From_int((int)(NID_secp112r2))); @@ -34432,7 +33165,7 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_wap_wsg_idm_ecid_wtls12",SWIG_From_int((int)(NID_wap_wsg_idm_ecid_wtls12))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_ipsec3",SWIG_From_int((int)(NID_ipsec3))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "NID_ipsec4",SWIG_From_int((int)(NID_ipsec4))); - SWIG_addvarlink(globals, "_ec_err", Swig_var__ec_err_get, Swig_var__ec_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_ec_err",Swig_var__ec_err_get, Swig_var__ec_err_set); /* type '::_cbd_t' */ builtin_pytype = (PyTypeObject *)&SwigPyBuiltin___cbd_t_type; @@ -34453,10 +33186,10 @@ SWIG_init(void) { #endif } Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "_cbd_t", (PyObject *)builtin_pytype); + PyModule_AddObject(m, "_cbd_t", (PyObject*) builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "_cbd_t"); d = md; - SWIG_addvarlink(globals, "_engine_err", Swig_var__engine_err_get, Swig_var__engine_err_set); + SWIG_addvarlink(SWIG_globals(),(char*)"_engine_err",Swig_var__engine_err_get, Swig_var__engine_err_set); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ENGINE_METHOD_RSA",SWIG_From_int((int)(0x0001))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ENGINE_METHOD_DSA",SWIG_From_int((int)(0x0002))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ENGINE_METHOD_DH",SWIG_From_int((int)(0x0004))); -- cgit v1.2.1