Skip to content

Commit 88fb4b7

Browse files
brennanneohayakael
authored andcommitted
Add compatibility with xmlsec 1.3.3 (#4)
* src/constants.c: use KeyDataEc rather than KetDataEcdsa * Use xmlSecCryptoAppKeyLoadEx instead of xmlSecCryptoAppKeyLoad --------- Co-authored-by: Antoine Martin <dev@ayakael.net>
1 parent ef0e742 commit 88fb4b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/constants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ int PyXmlSec_ConstantsModule_Init(PyObject* package) {
445445
#endif
446446
#if XMLSEC_VERSION_HEX > 0x10212
447447
// from version 1.2.19
448-
PYXMLSEC_ADD_KEYDATA_CONSTANT(KeyDataEcdsa, "ECDSA")
448+
PYXMLSEC_ADD_KEYDATA_CONSTANT(KeyDataEc, "ECDSA")
449449
#endif
450450
PYXMLSEC_ADD_KEYDATA_CONSTANT(KeyDataHmac, "HMAC")
451451
PYXMLSEC_ADD_KEYDATA_CONSTANT(KeyDataRsa, "RSA")

src/keys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static PyObject* PyXmlSec_KeyFromFile(PyObject* self, PyObject* args, PyObject*
163163
if (is_content) {
164164
key->handle = xmlSecCryptoAppKeyLoadMemory((const xmlSecByte*)data, (xmlSecSize)data_size, format, password, NULL, NULL);
165165
} else {
166-
key->handle = xmlSecCryptoAppKeyLoad(data, format, password, NULL, NULL);
166+
key->handle = xmlSecCryptoAppKeyLoadEx(data, xmlSecKeyDataTypePrivate, format, password, NULL, NULL);
167167
}
168168
Py_END_ALLOW_THREADS;
169169

0 commit comments

Comments
 (0)