python-pkcs11 0.8.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.github/workflows/tests.yml +1 -3
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/PKG-INFO +1 -1
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/load_module.c +8 -3
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/python_pkcs11.egg-info/PKG-INFO +1 -1
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_slots_and_tokens.py +4 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.github/actions/install-softhsm/action.yml +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.github/release-template.md +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.github/workflows/quality.yml +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.github/workflows/release.yml +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.gitignore +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.python-version +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/.readthedocs.yaml +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/Dockerfile +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/LICENSE +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/MANIFEST.in +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/README.rst +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/Makefile +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/api.rst +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/applied.rst +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/concurrency.rst +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/conf.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/index.rst +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/make.bat +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/docs/opensc.rst +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/.gitignore +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/cryptoki.h +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/load_module.h +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/pkcs11.h +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/pkcs11f.h +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/extern/pkcs11t.h +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/__init__.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/_pkcs11.pxd +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/_pkcs11.pyx +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/constants.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/defaults.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/exceptions.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/mechanisms.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/types.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/util/__init__.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/util/dh.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/util/dsa.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/util/ec.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/util/rsa.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pkcs11/util/x509.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/pyproject.toml +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/python_pkcs11.egg-info/SOURCES.txt +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/python_pkcs11.egg-info/dependency_links.txt +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/python_pkcs11.egg-info/requires.txt +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/python_pkcs11.egg-info/top_level.txt +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/setup.cfg +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/__init__.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_aes.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_des.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_dh.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_digest.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_dsa.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_ecc.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_iterators.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_public_key_external.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_rsa.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_sessions.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_threading.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/tests/test_x509.py +0 -0
- {python_pkcs11-0.8.0 → python_pkcs11-0.8.1}/uv.lock +0 -0
|
@@ -17,9 +17,12 @@ static PyObject* p11_error() {
|
|
|
17
17
|
NULL);
|
|
18
18
|
PyObject* errmsg = PyUnicode_FromWideChar(msgbuffer, l);
|
|
19
19
|
LocalFree(msgbuffer);
|
|
20
|
+
if (errmsg == NULL) {
|
|
21
|
+
Py_RETURN_NONE;
|
|
22
|
+
}
|
|
20
23
|
return errmsg;
|
|
21
24
|
} else {
|
|
22
|
-
|
|
25
|
+
Py_RETURN_NONE;
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
|
|
@@ -57,11 +60,13 @@ static PyObject* p11_error() {
|
|
|
57
60
|
char* error = dlerror();
|
|
58
61
|
|
|
59
62
|
if (error == NULL) {
|
|
60
|
-
|
|
63
|
+
Py_RETURN_NONE;
|
|
61
64
|
}
|
|
62
65
|
int len = strlen(error);
|
|
63
66
|
PyObject* result = PyUnicode_DecodeUTF8(error, len, NULL);
|
|
64
|
-
|
|
67
|
+
if (result == NULL) {
|
|
68
|
+
Py_RETURN_NONE;
|
|
69
|
+
}
|
|
65
70
|
return result;
|
|
66
71
|
}
|
|
67
72
|
|
|
@@ -14,6 +14,10 @@ class SlotsAndTokensTests(unittest.TestCase):
|
|
|
14
14
|
self.assertIsNotNone(pkcs11.lib(LIB))
|
|
15
15
|
self.assertIsNotNone(pkcs11.lib(LIB))
|
|
16
16
|
|
|
17
|
+
def test_nonexistent_lib(self):
|
|
18
|
+
with self.assertRaises(RuntimeError):
|
|
19
|
+
pkcs11.lib("thislibdoesntexist.so")
|
|
20
|
+
|
|
17
21
|
def test_double_initialise_different_libs(self):
|
|
18
22
|
self.assertIsNotNone(pkcs11.lib(LIB))
|
|
19
23
|
with self.assertRaises(pkcs11.AlreadyInitialized):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|