diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-03-28 15:04:13 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-03-29 16:45:24 +0800 |
commit | a5f26fefca2edb7f3b2772966b79351b7edbcc3f (patch) | |
tree | 525f4fe77b50b9ca080795854fff8f1b122a0cb9 /BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | |
parent | 113581e6f32da3b08274ddb626b2c936a091f749 (diff) | |
download | edk2-a5f26fefca2edb7f3b2772966b79351b7edbcc3f.tar.gz edk2-a5f26fefca2edb7f3b2772966b79351b7edbcc3f.tar.bz2 edk2-a5f26fefca2edb7f3b2772966b79351b7edbcc3f.zip |
BaseTools: Update Pkcs7 and RSA2048 tool with shell=True
Pkcs7Sign, Rsa2048Sha256Sign and Rsa2048Sha256GenerateKeys doesn't work
on Linux. It needs to be changed with shell=True.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py')
-rw-r--r-- | BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py index 6412587e4b..ef79f80edd 100644 --- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py +++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py @@ -203,7 +203,7 @@ if __name__ == '__main__': #
# Sign the input file using the specified private key and capture signature from STDOUT
#
- 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)
+ 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)
Signature = Process.communicate(input=FullInputFileBuffer)[0]
if Process.returncode <> 0:
sys.exit(Process.returncode)
@@ -272,7 +272,7 @@ if __name__ == '__main__': #
# Verify signature
#
- 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)
+ 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)
Process.communicate(input=args.SignatureBuffer)[0]
if Process.returncode <> 0:
print 'ERROR: Verification failed'
|