-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathopenssl.c
37 lines (33 loc) · 908 Bytes
/
openssl.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* $Id$
*
* PyXMLSec - Python bindings for XML Security library (XMLSec)
*
* Copyright (C) 2003-2013 Easter-eggs, Valery Febvre
* http://pyxmlsec.labs.libre-entreprise.org
*
* Author: Valery Febvre <[email protected]>
*
* This is free software; see COPYING file in the source
* distribution for preciese wording.
*/
#include "wrap_objs.h"
#include "openssl.h"
PyObject *xmlsec_OpenSSLAppInit(PyObject *self, PyObject *args) {
char *config;
int result;
if (!PyArg_ParseTuple(args, "z:openSSLAppInit", &config))
return NULL;
result = xmlSecOpenSSLAppInit(config);
if (result < 0) {
PyErr_SetFromErrno(xmlsec_error);
}
return Py_BuildValue("i", result);
}
PyObject *xmlsec_OpenSSLInit(PyObject *self, PyObject *args) {
int result;
result = xmlSecOpenSSLInit();
if (result < 0) {
PyErr_SetFromErrno(xmlsec_error);
}
return Py_BuildValue("i", result);
}