我试图基于示例here为AWS Cloudfront生成签名的url。在线
private_key = serialization.load_pem_private_key(
key_file.read(),
password=None,
backend=default_backend()
)
我得到错误UnsupportedAlgorithm: This backend does not support this key serialization.
完整跟踪如下:
在阅读文档时,它表示发生异常的原因如下:
cryptography.exceptions.UnsupportedAlgorithm – the serialized key is of a type that is not supported by the backend or if
the key is encrypted with a symmetric cipher that is not supported by the backend.
给定的PEM文件以-----BEGIN RSA PRIVATE KEY-----
开头,以-----END RSA PRIVATE KEY-----
结尾。在
我正在使用googleappenginesdk开发这个应用程序。在
我需要帮助理解这个错误信息和如何使它工作。在
不幸的是,python加密库不能与googleappengine(GAE)一起使用,因为这个库需要有C扩展,而不能在GAE中安装C扩展。您只能使用纯python包。在
相关问题 更多 >
编程相关推荐