X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FPkcs7Sign%2FPkcs7Sign.py;fp=BaseTools%2FSource%2FPython%2FPkcs7Sign%2FPkcs7Sign.py;h=11d11700ed9902316a76d2b25df60bd8c4241989;hp=4f79d0f82967019f87f2fa656e96dd050a86a8d2;hb=87d2afd07c822e6d5ab12bc8dc0f0bfa31bea679;hpb=72443dd25014a8b6209895640af36dec33da51e0 diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py index 4f79d0f829..11d11700ed 100644 --- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py +++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py @@ -118,7 +118,7 @@ if __name__ == '__main__': sys.exit(1) Version = Process.communicate() - if Process.returncode <> 0: + if Process.returncode != 0: print('ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH') sys.exit(Process.returncode) print(Version[0]) @@ -208,7 +208,7 @@ if __name__ == '__main__': # 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: + if Process.returncode != 0: sys.exit(Process.returncode) # @@ -277,7 +277,7 @@ if __name__ == '__main__': # 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: + if Process.returncode != 0: print('ERROR: Verification failed') os.remove (args.OutputFileName) sys.exit(Process.returncode)