python-pkcs11 icon indicating copy to clipboard operation
python-pkcs11 copied to clipboard

Update dependencies and fix Windows compatibility on Python 3.12

Open joseavegaa opened this issue 1 year ago • 1 comments

This is follow-up of the now closed PR #174. This new PR tries to update the PKCS#11 specification to the latest published version and brings compatibility to Python 3.12 on Windows.

The specific changes of this PR are:

  • Update PKCS#11 Specification to version 3.1, published by OASIS Standard on 2023-07-23.
  • Removed deprecated references to Py_UNICODE* and replaced them by wchar_t as suggested by PEP-624.
  • Added compatibility to Python 3.12 in Windows by removing the Py_UNICODE* references.
  • Bump package version to 0.8.0.
  • Fixes #159
  • Fixes #165

The package has been tested on new virtual environments using Python 3.12 on Windows 11 with the asepkcs.dll (Athena Smartcard System ASE Card).

joseavegaa avatar Sep 30 '24 05:09 joseavegaa

To be transparent about the maintenance situation: I don't have any access to HSMs. I'm not sure about @kislyuk?

This means that any changes cannot currently be tested with real HSMs.

mathiasertl avatar Sep 30 '24 07:09 mathiasertl

@mathiasertl I can't promise anything ongoing, but I might be able to run the tests on Linux against AWS CloudHSMv2, if that would be of any use? Someone would have to note down exactly how to run the tests though! (I'd rather not try to work it out, get it wrong, and invalidate the results.)

is-alnilam avatar Nov 12 '24 17:11 is-alnilam

Any update on this pull request? I'd really love to see 0.8.0 being released and finally being able to use python 3.12 on my windows box.

XobrekX avatar Dec 05 '24 08:12 XobrekX

I guess this means it won't work with Python 3.13 also?

haagensen avatar Dec 07 '24 00:12 haagensen

I guess so.

mathiasertl avatar Dec 09 '24 19:12 mathiasertl

This PR has minor changes requested, if they are implemented I can merge this.

Note however that I don't think I can upload releases to PyPI at the moment. @kislyuk do you have upload permissions by now?

mathiasertl avatar Dec 09 '24 19:12 mathiasertl

I do not. @danni can you please invite me to the python-pkcs11 package on PyPI?

kislyuk avatar Dec 09 '24 23:12 kislyuk

Yes I can do that. Same username?

danni avatar Dec 10 '24 00:12 danni

Yes, my PyPI username is identical to my GitHub one.

On Mon, Dec 9, 2024 at 16:26 Danielle Madeley @.***> wrote:

Yes I can do that. Same username?

— Reply to this email directly, view it on GitHub https://github.com/pyauth/python-pkcs11/pull/183#issuecomment-2529907316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGSOPNR2R54YTHQ6MG5J6L2EYYKNAVCNFSM6AAAAABPCOW5AOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRZHEYDOMZRGY . You are receiving this because you were mentioned.Message ID: @.***>

kislyuk avatar Dec 10 '24 03:12 kislyuk

My username is mati: https://pypi.org/user/mati/

mathiasertl avatar Dec 15 '24 08:12 mathiasertl

Any updates on when this might get merged in?

wrichardsonafmil avatar Jan 14 '25 13:01 wrichardsonafmil

Tested under 3.13 and it's ok. Please upload the releases to PyPI 🙏

gilweis avatar Apr 14 '25 05:04 gilweis

Hi! Are there any updates on this PR and if it will get merge? It adds support for the latest versions of Python, which is something that I really need.

joseavegaa avatar May 02 '25 13:05 joseavegaa

@mathiasertl have your blocking comments been addressed?

kislyuk avatar May 02 '25 14:05 kislyuk

@mathiasertl - You can test via an HSM simulator. I typically use the Utimaco simulator which you can get for free you just have to make an account on their site. They have a traditional one called Cryptoserver (latest version is 6.1) and a post quantum one. The simulators work on Windows or Linux (with Linux you don't need to install anything, simply have JDK, copy files, and run script - supports both OpenJDK and Oracle Java framework. - https://utimaco.com/data-protection/simulators-and-trials. I would like this update as well, have a tool working in Linux but cannot make an easy deployable version to Windows...

xues-d avatar May 08 '25 19:05 xues-d

Please merge this PR. tnx!

gilweis avatar May 27 '25 04:05 gilweis

FYI, the Windows linking issue was fixed in #202, and the build flow was taken care of by #204. I made another PR #205 just now to cover the header file upgrade + some related maintenance (that PR already accounts for the feedback given in this thread).

So I'm going to close this PR as obsolete, if you don't mind :).

MatthiasValvekens avatar Jun 19 '25 19:06 MatthiasValvekens