The code uses the very generic pem.Key which can also be a pubic key.
We should use a more specific value like pem.RSAPrivateKey or a bit more generic pem.PrivateKey
Right now, txacme, only supports RSA keys.
But mabye in the future we will add more key types.
Targeted code
|
pem.Key(key.private_bytes( |
Maybe, instead of direct instantiation of pem.RSAPrivateKey we can use pem.parse()
pem.parse() is already used for loading the certificates
So it makes sense to use the same mechanism to load the private key.
The code uses the very generic
pem.Keywhich can also be a pubic key.We should use a more specific value like pem.RSAPrivateKey or a bit more generic
pem.PrivateKeyRight now, txacme, only supports RSA keys.
But mabye in the future we will add more key types.
Targeted code
txacme/src/txacme/service.py
Line 211 in ac382ff
Maybe, instead of direct instantiation of
pem.RSAPrivateKeywe can usepem.parse()pem.parse()is already used for loading the certificatesSo it makes sense to use the same mechanism to load the private key.