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 69a74ee..baad9a8 100755 (executable)
@@ -1,4 +1,5 @@
-#!/bin/bash -e
+#!/bin/bash
+set -euo pipefail
 
 if [ "$#" -ne 2 ]
 then