aboutsummaryrefslogtreecommitdiffstats
path: root/vnfsdk_pkgtools/packager/utils.py
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2019-11-21 18:33:20 +0800
committerLianhao Lu <lianhao.lu@intel.com>2019-11-21 18:33:20 +0800
commit6bdd924968ceccf33a86482aa720609d1c156741 (patch)
treebdef91fe375e86f193a9718db6ee1cf50092bf33 /vnfsdk_pkgtools/packager/utils.py
parent9003bbf2d379d446bf1c08ebd11a4c591be097ed (diff)
Support new version of openssl
1. Support new version of openssl >= 1.1.1. 2. Add a blank line between digest and signature section per spec SOL004. Issue-ID: VNFSDK-519 Change-Id: I92873897805ab627a31eb5c09450e33b2f091db5 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'vnfsdk_pkgtools/packager/utils.py')
-rw-r--r--vnfsdk_pkgtools/packager/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnfsdk_pkgtools/packager/utils.py b/vnfsdk_pkgtools/packager/utils.py
index 06143c6..f16a961 100644
--- a/vnfsdk_pkgtools/packager/utils.py
+++ b/vnfsdk_pkgtools/packager/utils.py
@@ -79,7 +79,7 @@ def _run_cmd(cmd, **kwargs):
def sign(msg_file, cert_file, key_file):
- args = ["openssl", "cms", "-sign", "-binary", "-nocerts"]
+ args = ["openssl", "cms", "-sign", "-binary"]
kwargs = {
'-in': os.path.abspath(msg_file),
'-signer': os.path.abspath(cert_file),
@@ -91,9 +91,9 @@ def sign(msg_file, cert_file, key_file):
def verify(msg_file, cert_file, cms, no_verify_cert=False):
- args = ["openssl", "cms", "-verify"]
+ args = ["openssl", "cms", "-verify", "-binary"]
if no_verify_cert:
- args.append("-no_signer_cert_verify")
+ args.append("-noverify")
with tempfile.NamedTemporaryFile(mode='w') as f:
f.write(cms)