wincertstore.CertFile().addstore('CA') needs _ctypes.resize, which is not implemented
After pip install wincertstore
, this code fails:
>>>> import wincertstore
>>>> w = wincertstore.CertFile()
>>>> w.addstore('CA')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "d:\pypy_stuff\pypy3.7-HEAD\site-packages\wincertstore.py", line 411, in addstore
self.addcerts(store.itercerts())
File "d:\pypy_stuff\pypy3.7-HEAD\site-packages\wincertstore.py", line 396, in addcerts
for cert in certs:
File "d:\pypy_stuff\pypy3.7-HEAD\site-packages\wincertstore.py", line 325, in itercerts
enhkey = certCtx.enhanced_keyusage()
File "d:\pypy_stuff\pypy3.7-HEAD\site-packages\wincertstore.py", line 189, in enhanced_keyusage
keyusage = self._get_enhkey(CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG)
File "d:\pypy_stuff\pypy3.7-HEAD\site-packages\wincertstore.py", line 168, in _get_enhkey
resize(enhkey, size.value)
File "d:\pypy_stuff\pypy3.7-HEAD\lib_pypy\_ctypes\dummy.py", line 2, in dummyfunc
raise NotImplementedError("non-implemented ctypes function")
NotImplementedError: non-implemented ctypes function
The relevant CPython code is this. Since we use an ffi buffer, the code is significantly different.
This is used in setuptools but luckily ssl_support
was removed recently, so it may be fine to wait for this change to percolate through the ecosystem.