]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix "ocsp: Digest must be before -cert or -serial"
authorleishaoting <leist.fnst@cn.fujitsu.com>
Tue, 19 Dec 2017 06:40:44 +0000 (14:40 +0800)
committerJouni Malinen <j@w1.fi>
Sun, 24 Dec 2017 19:40:21 +0000 (21:40 +0200)
When executing ./start.sh with OpenSSL 1.1.0f, an OCSP operation fails.

Put "-sha256" ahead of "-serial" to fix this.

~# openssl version
OpenSSL 1.1.0f  25 May 2017
~# openssl ocsp -reqout /lkp/benchmarks/hwsim/tests/hwsim/logs/current/ocsp-req.der -issuer /lkp/benchmarks/hwsim/tests/hwsim/auth_serv/ca.pem -serial 0xD8D3E3A6CBE3CD12 -no_nonce -sha256
ocsp: Digest must be before -cert or -serial
ocsp: Use -help for summary.
~# openssl ocsp -reqout /lkp/benchmarks/hwsim/tests/hwsim/logs/current/ocsp-req.der -issuer /lkp/benchmarks/hwsim/tests/hwsim/auth_serv/ca.pem -sha256 -serial 0xD8D3E3A6CBE3CD12 -no_nonce

Signed-off-by: leishaoting <leist.fnst@cn.fujitsu.com>
tests/hwsim/start.sh

index e7fb14889186d5f370b065c14d22f6183ccab013..fe46212737f37289805c795c612a95afda60c936 100755 (executable)
@@ -165,7 +165,7 @@ for i in unknown revoked; do
 done
 
 openssl ocsp -reqout $LOGDIR/ocsp-req.der -issuer $DIR/auth_serv/ca.pem \
-    -serial 0xD8D3E3A6CBE3CD12 -no_nonce -sha256 >> $LOGDIR/ocsp.log 2>&1
+    -sha256 -serial 0xD8D3E3A6CBE3CD12 -no_nonce >> $LOGDIR/ocsp.log 2>&1
 for i in "" "-unknown" "-revoked"; do
     openssl ocsp -index $DIR/auth_serv/index$i.txt \
        -rsigner $DIR/auth_serv/ca.pem \