Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
95 views
in Technique[技术] by (71.8m points)

python - py-hsm: compiling "libhsm.dll" on windows

I have to write a Python application that sends requests to a Hardware Security Module (Utimaco CryptoServer PCIe) and I think that py-hsm is a good solution: https://pypi.org/project/py-hsm/

Unfortunately, that Python library requires "libhsm.dll" installed on windows but the dll's documentation does not specify how to recompile it: https://github.com/bentonstark/libhsm.

When I tried to recompile the source code of "libhsm" library with Visual Studio 2013 on Windows 10, I've had such errors in "p11hsm.cpp":

error C2070: 'char []': illegal sizeof operand

error C3861: 'LoadLibrary': identifier not found

error C2133: 'lib_path_null' : unknown size

error C2133: 'pMechanismList' : unknown size

error C2466: cannot allocate an array of constant size 0

Even the author explained here that "libhsm" needs to be recompiled by a newly created project: https://github.com/bentonstark/libhsm/issues/3

Could anybody give me some hints? I really appreciate your help!

question from:https://stackoverflow.com/questions/65905205/py-hsm-compiling-libhsm-dll-on-windows

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...