CKM: Return proper error code from EIV encryption script 86/208786/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 28 Jun 2019 10:15:15 +0000 (12:15 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 28 Jun 2019 10:29:31 +0000 (12:29 +0200)
The encryption script did not report an error if one of pipelined
commands failed.

Add few bash options that will make the script fail with proper error
code in such cases.

Change-Id: I47a9739af93f07d2cb0e20f22087a2c182de6835

src/ckm/privileged/aes_128_cbc_encrypt.sh

index 69a74eec93caea7e87f17478be61ad70fb2534bf..baad9a86b6efe5e92630c7355809383fc2951133 100755 (executable)
@@ -1,4 +1,5 @@
-#!/bin/bash -e
+#!/bin/bash
+set -euo pipefail
 
 if [ "$#" -ne 2 ]
 then