]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py
BaseTools: Update Pkcs7 and RSA2048 tool with shell=True
[mirror_edk2.git] / BaseTools / Source / Python / Pkcs7Sign / Pkcs7Sign.py
index 6412587e4ba52eb4f253fb0aaba3dc8fec384a51..ef79f80eddf39377379a2dfed54b82e6309fadc7 100644 (file)
@@ -203,7 +203,7 @@ if __name__ == '__main__':
     #\r
     # Sign the input file using the specified private key and capture signature from STDOUT\r
     #\r
-    Process = subprocess.Popen('%s smime -sign -binary -signer "%s" -outform DER -md sha256 -certfile "%s"' % (OpenSslCommand, args.SignerPrivateCertFileName, args.OtherPublicCertFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\r
+    Process = subprocess.Popen('%s smime -sign -binary -signer "%s" -outform DER -md sha256 -certfile "%s"' % (OpenSslCommand, args.SignerPrivateCertFileName, args.OtherPublicCertFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\r
     Signature = Process.communicate(input=FullInputFileBuffer)[0]\r
     if Process.returncode <> 0:\r
       sys.exit(Process.returncode)\r
@@ -272,7 +272,7 @@ if __name__ == '__main__':
     #\r
     # Verify signature\r
     #\r
-    Process = subprocess.Popen('%s smime -verify -inform DER -content %s -CAfile %s' % (OpenSslCommand, args.OutputFileName, args.TrustedPublicCertFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\r
+    Process = subprocess.Popen('%s smime -verify -inform DER -content %s -CAfile %s' % (OpenSslCommand, args.OutputFileName, args.TrustedPublicCertFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\r
     Process.communicate(input=args.SignatureBuffer)[0]\r
     if Process.returncode <> 0:\r
       print 'ERROR: Verification failed'\r