Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-PyKCS11 for openSUSE:Factory checked in at 2024-05-27 11:54:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-PyKCS11 (Old) and /work/SRC/openSUSE:Factory/.python-PyKCS11.new.24587 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyKCS11" Mon May 27 11:54:28 2024 rev:3 rq:1176770 version:1.5.16 Changes: -------- --- /work/SRC/openSUSE:Factory/python-PyKCS11/python-PyKCS11.changes 2024-05-17 20:07:06.303593223 +0200 +++ /work/SRC/openSUSE:Factory/.python-PyKCS11.new.24587/python-PyKCS11.changes 2024-05-27 12:02:32.408626029 +0200 @@ -1,0 +2,7 @@ +Fri May 24 16:22:04 UTC 2024 - Richard Rahl <rra...@disroot.org> + +- update to 1.5.16: + * add support of CKA_MODIFIABLE and CKA_DESTROYABLE attributes + * minor improvments + +------------------------------------------------------------------- Old: ---- python-PyKCS11-1.5.15.tar.gz New: ---- python-PyKCS11-1.5.16.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-PyKCS11.spec ++++++ --- /var/tmp/diff_new_pack.EFivFG/_old 2024-05-27 12:02:32.872643065 +0200 +++ /var/tmp/diff_new_pack.EFivFG/_new 2024-05-27 12:02:32.876643212 +0200 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-PyKCS11 -Version: 1.5.15 +Version: 1.5.16 Release: 0 Summary: A Full PKCS#11 wrapper for Python License: GPL-2.0-or-later ++++++ python-PyKCS11-1.5.15.tar.gz -> python-PyKCS11-1.5.16.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/.github/workflows/windows.yml new/PyKCS11-1.5.16/.github/workflows/windows.yml --- old/PyKCS11-1.5.15/.github/workflows/windows.yml 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/.github/workflows/windows.yml 2024-05-24 17:40:19.000000000 +0200 @@ -16,7 +16,7 @@ - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.windows-arch }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/Changes.txt new/PyKCS11-1.5.16/Changes.txt --- old/PyKCS11-1.5.15/Changes.txt 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/Changes.txt 2024-05-24 17:40:19.000000000 +0200 @@ -1,6 +1,10 @@ History ======= +1.5.16 - May 2024, Ludovic Rousseau + - add support of CKA_MODIFIABLE and CKA_DESTROYABLE attributes + - minor improvements + 1.5.15 - April 2024, Ludovic Rousseau - fix problems when PYKCS11LIB has incorrect values - fix a problem with swig and "pip install ..." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/PyKCS11/__init__.py new/PyKCS11-1.5.16/PyKCS11/__init__.py --- old/PyKCS11-1.5.15/PyKCS11/__init__.py 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/PyKCS11/__init__.py 2024-05-24 17:40:19.000000000 +0200 @@ -1395,6 +1395,8 @@ CKA_HAS_RESET, CKA_LOCAL, CKA_MODIFIABLE, + CKA_COPYABLE, + CKA_DESTROYABLE, CKA_NEVER_EXTRACTABLE, CKA_PRIVATE, CKA_RESET_ON_INIT, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/docs/conf.py new/PyKCS11-1.5.16/docs/conf.py --- old/PyKCS11-1.5.15/docs/conf.py 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/docs/conf.py 2024-05-24 17:40:19.000000000 +0200 @@ -26,7 +26,7 @@ # The short X.Y version version = '1.5' # The full version, including alpha/beta/rc tags -release = '1.5.15' +release = '1.5.16' # -- General configuration --------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/docs/index.rst new/PyKCS11-1.5.16/docs/index.rst --- old/PyKCS11-1.5.15/docs/index.rst 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/docs/index.rst 2024-05-24 17:40:19.000000000 +0200 @@ -3,8 +3,8 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to PyKCS11's documentation! -=================================== +Welcome to PyKCS11's documentation +================================== Download ******** @@ -24,6 +24,8 @@ Report patches as `github pull requests <https://github.com/LudovicRousseau/PyKCS11/pulls>`_ +API Documentation +***************** .. toctree:: :maxdepth: 4 @@ -37,5 +39,4 @@ ================== * :ref:`genindex` -* :ref:`modindex` * :ref:`search` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/get_PYKCS11LIB.py new/PyKCS11-1.5.16/get_PYKCS11LIB.py --- old/PyKCS11-1.5.15/get_PYKCS11LIB.py 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/get_PYKCS11LIB.py 2024-05-24 17:40:19.000000000 +0200 @@ -16,6 +16,7 @@ LIBS = [ "/usr/local/lib/pkcs11-spy.so", # macOS or local build "/usr/lib/x86_64-linux-gnu/pkcs11-spy.so", # Debian amd64 + "/usr/lib64/pkcs11/pkcs11-spy.so", # Fedora Linux ] else: if sys.maxsize > 2 ** 32: @@ -27,10 +28,12 @@ # use SoftHSM2 or SoftHSM1 LIBS = [ "/usr/local/lib/softhsm/libsofthsm2.so", # macOS or local build + "/opt/homebrew/lib/softhsm/libsofthsm2.so", # macOS arm64 "/usr/lib/softhsm/libsofthsm2.so", # Debian libsofthsm2 "/usr/lib/softhsm/libsofthsm.so", # Debian libsofthsm "/usr/lib/libsofthsm.so", # Ubuntu 12.04 libsofthsm "/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so", # Ubuntu 16.04 libsofthsm2 + "/usr/lib64/pkcs11/libsofthsm2.so", # Fedora Linux WINDOWS_SOFTHSM, # Windows ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/setup.py new/PyKCS11-1.5.16/setup.py --- old/PyKCS11-1.5.15/setup.py 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/setup.py 2024-05-24 17:40:19.000000000 +0200 @@ -74,7 +74,7 @@ setup( name="PyKCS11", - version="1.5.15", + version="1.5.16", description="A Full PKCS#11 wrapper for Python", keywords="crypto,pki,pkcs11,c++", classifiers=classifiers, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/src/ck_attribute_smart.cpp new/PyKCS11-1.5.16/src/ck_attribute_smart.cpp --- old/PyKCS11-1.5.15/src/ck_attribute_smart.cpp 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/src/ck_attribute_smart.cpp 2024-05-24 17:40:19.000000000 +0200 @@ -102,6 +102,8 @@ case CKA_HAS_RESET: case CKA_LOCAL: case CKA_MODIFIABLE: + case CKA_COPYABLE: + case CKA_DESTROYABLE: case CKA_NEVER_EXTRACTABLE: case CKA_PRIVATE: case CKA_RESET_ON_INIT: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/src/opensc/pkcs11.h new/PyKCS11-1.5.16/src/opensc/pkcs11.h --- old/PyKCS11-1.5.15/src/opensc/pkcs11.h 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/src/opensc/pkcs11.h 2024-05-24 17:40:19.000000000 +0200 @@ -429,6 +429,8 @@ #define CKA_ALWAYS_SENSITIVE (0x165) #define CKA_KEY_GEN_MECHANISM (0x166) #define CKA_MODIFIABLE (0x170) +#define CKA_COPYABLE (0x171) +#define CKA_DESTROYABLE (0x172) #define CKA_ECDSA_PARAMS (0x180) #define CKA_EC_PARAMS (0x180) #define CKA_EC_POINT (0x181) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/src/pykcs11.i new/PyKCS11-1.5.16/src/pykcs11.i --- old/PyKCS11-1.5.15/src/pykcs11.i 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/src/pykcs11.i 2024-05-24 17:40:19.000000000 +0200 @@ -101,7 +101,7 @@ PyKCS11String GetLibraryVersion() { char szVal[10]; - sprintf(szVal, "%d.%d", self->libraryVersion.major, self->libraryVersion.minor); + snprintf(szVal, sizeof szVal, "%d.%d", self->libraryVersion.major, self->libraryVersion.minor); return PyKCS11String(szVal); } }; @@ -129,13 +129,13 @@ PyKCS11String GetHardwareVersion() { char szVal[10]; - sprintf(szVal, "%d.%02d", self->hardwareVersion.major, self->hardwareVersion.minor); + snprintf(szVal, sizeof szVal, "%d.%02d", self->hardwareVersion.major, self->hardwareVersion.minor); return PyKCS11String(szVal); } PyKCS11String GetFirmwareVersion() { char szVal[10]; - sprintf(szVal, "%d.%02d", self->firmwareVersion.major, self->firmwareVersion.minor); + snprintf(szVal, sizeof szVal, "%d.%02d", self->firmwareVersion.major, self->firmwareVersion.minor); return PyKCS11String(szVal); } }; @@ -184,7 +184,7 @@ PyKCS11String GetFirmwareVersion() { char szVal[10]; - sprintf(szVal, "%d.%02d", self->firmwareVersion.major, self->firmwareVersion.minor); + snprintf(szVal, sizeof szVal, "%d.%02d", self->firmwareVersion.major, self->firmwareVersion.minor); return PyKCS11String(szVal); } PyKCS11String GetUtcTime() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyKCS11-1.5.15/test/test_objects.py new/PyKCS11-1.5.16/test/test_objects.py --- old/PyKCS11-1.5.15/test/test_objects.py 2024-04-17 14:07:16.000000000 +0200 +++ new/PyKCS11-1.5.16/test/test_objects.py 2024-05-24 17:40:19.000000000 +0200 @@ -93,6 +93,41 @@ template = [(PyKCS11.CKA_HW_FEATURE_TYPE, PyKCS11.CKH_USER_INTERFACE)] o = self.session.findObjects(template) + def test_BoolAttributes(self): + # dictionary of attributes expected to be bool and their expected values + boolAttributes = { + PyKCS11.CKA_TOKEN : PyKCS11.CK_FALSE, + PyKCS11.CKA_PRIVATE : PyKCS11.CK_FALSE, + # The attributes below are defaulted to CK_TRUE + # ( according to the PKCS#11 standard ) + PyKCS11.CKA_MODIFIABLE : PyKCS11.CK_TRUE, + PyKCS11.CKA_COPYABLE : PyKCS11.CK_TRUE, + PyKCS11.CKA_DESTROYABLE : PyKCS11.CK_TRUE, + } + + CkoDataTemplate = [ + (PyKCS11.CKA_CLASS, PyKCS11.CKO_DATA), + (PyKCS11.CKA_TOKEN, PyKCS11.CK_FALSE), + (PyKCS11.CKA_PRIVATE, PyKCS11.CK_FALSE), + (PyKCS11.CKA_LABEL, "TestData"), + ] + + # create a CKO_DATA object + ckoData = self.session.createObject(CkoDataTemplate) + self.assertIsNotNone(ckoData) + + attrValues = self.session.getAttributeValue( + ckoData, list(boolAttributes.keys()) + ) + + # check that attributes are of bool type + # and have expected values + for i, attr in enumerate(boolAttributes): + self.assertIsInstance(attrValues[i], bool) + self.assertEqual(attrValues[i], boolAttributes[attr]) + + # clean up + self.session.destroyObject(ckoData) class TestGetSetAttributeValues(unittest.TestCase):