Reputation: 11
I need replicate this OpenSSL command in python code, how can i do it?
openssl cms -sign -in FILE..XML -out FILE2.XML -signer CERT.crt -inkey PKEY.key -nodetach -outform PEM
Thank you!
Upvotes: 1
Views: 133
Reputation: 71
Look at the subprocess module in the standard library:
import subprocess
subprocess.run(["ls", "-l"])
Try to have the make a list containing the command, the flags, and the desired flag values, and send this list as an argument to subprocess.run().
You can get than receive the status code and the output as the function's return value.
Upvotes: 1