Created
March 7, 2018 04:28
-
-
Save srialdabaoth/82697d421856bd83bd6c04ef4c43fe95 to your computer and use it in GitHub Desktop.
ssl subprocess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| content="test" | |
| command = [ | |
| "openssl", "smime", | |
| "-binary", | |
| "-sign", | |
| "-certfile", '/home/sri/IdeaProjects/pk2/components/wwdr.pem', | |
| "-signer", '/home/sri/IdeaProjects/pk2/components/com.ndudfield.nfc.pem', | |
| "-in", "manifest.json", | |
| "-out", "signature", | |
| "-outform", 'DER', | |
| ] | |
| process = subprocess.Popen( | |
| command, | |
| stdin=subprocess.PIPE, | |
| stdout=subprocess.PIPE, | |
| stderr=subprocess.PIPE, | |
| ) | |
| stdout, stderr = process.communicate(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment