A package for securely importing signed python modules
Build Module:
module_file = 'test/test_module.py'
private_key_file = 'test/private_key.pem'
public_key_file = 'test/public_key.pem'
sig_file = 'test/signature.pem'
signature = secure_build(module_file,
private_key_file,
public_key_file,
sig_file_name=sig_file)
Import Module:
key_file = 'test/public_key.pem'
sig_file = 'test/signature.pem'
module_name = 'test_module'
public_key, signature = get_key_sig(key_file, sig_file)
secure_import(module_name, public_key, signature)
s = test_module.SecureTest()
print(s.test())