Re: [python-win32] Use TPM from Crypto API

2020-11-23 Thread Antoine FERRON via python-win32
On Nov 22 2020, at 8:14 pm, Tim Roberts wrote: > On Nov 22, 2020, at 4:16 AM, Antoine FERRON via python-win32 > wrote: > > > > Can you confirm that TPM "Microsoft Platform Crypto Provider" requires > > "CNG", and pywin32 is only "CAPI" ca

[python-win32] Use TPM from Crypto API

2020-11-22 Thread Antoine FERRON via python-win32
Hello pywin32 maintainers and enthusiasts, I intend to use a TPM on Windows to generate, store and sign, through the win32 CNG API (NCryptCreatePersistedKey (https://docs.microsoft.com/en-us/windows/win32/api/ncrypt/nf-ncrypt-ncryptcreatepersistedkey) and NCryptSignHash) but within a Python

Re: [python-win32] Unable to detect shutdown

2022-03-09 Thread Antoine FERRON via python-win32
I would recommend that you work with an object from a class, and using def __del__(self): I think when Windows shutdown, it send a stop/quit signal to all processes. When your Python is stopped by the OS, it can stop gracefully, and write the info in the file to backup, before it dies. This

Re: [python-win32] python 3.8 Alternative of py2exe for com server

2022-12-15 Thread Antoine FERRON via python-win32
Hi Matteo, Yes, use pyinstaller. I let py2exe for 4 years I think, and pyinstaller is very helpful to build binary package for end users. I'm using to build binary packages for multiple projects, up to 3.9, no issue, and it gets better and better. I'm not using for your use case, but it should

Re: [python-win32] win32api.pyd will be block by smart app control in win11

2023-04-15 Thread Antoine FERRON via python-win32
Probably you can code sign the pyd with your certificate (valid from Microsoft chain). This looks like the cause is the pyd has no signature, once signed (as a DLL) it should work. That's the same way you sign the exe (if you do so, and I'm advise to do so).