[UTC][key-manager][Non-ACR] Relax OCSP check assertions 13/262913/1
authorTomasz Swierczek <t.swierczek@samsung.com>
Mon, 23 Aug 2021 11:22:58 +0000 (13:22 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Mon, 23 Aug 2021 11:22:58 +0000 (13:22 +0200)
Since the OCSP API is deprecated in TCSACR-433, there's no need
for the test to require the server to return GOOD status
for test certificate.

By relaxing this requirement, the test code will not need update once
the certificate gets expired - such query is also proper OCSP query,
only returns different cert status.

Only proper format of response from the server is checked now, which
allows to test response parsing/processing on key-manager side.

Change-Id: Ic91d681678a2ca68ce5225bda2e9664b4a8a41be

tct-suite-vs/Tizen.Securerepository.Tests/testcase/TSCertificateManager.cs

index 85c1e10..0004714 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2016 - 2021 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -456,8 +456,8 @@ namespace Tizen.Security.SecureRepository.Tests
 
             /* TEST CODE */
             var status = CertificateManager.CheckOcsp(retval);
-            Assert.True(status == OcspStatus.Good,
-                "returned ocsp status isn't valid: " + status);
+            Assert.True(status != OcspStatus.InvalidResponse,
+                "returned ocsp response is not valid: " + status);
         }
 
         [Test]