]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Update PCR even if measurement does not equal reference value
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 20 Dec 2013 23:39:40 +0000 (00:39 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 20 Dec 2013 23:40:45 +0000 (00:40 +0100)
src/libpts/pts/components/ita/ita_comp_ima.c

index 02470f5f5b29cbb8b8c699e34c4499a8d071d2cd..1531f7a5805bffb638f82ca7912e9770031d1151 100644 (file)
@@ -683,7 +683,7 @@ METHOD(pts_component_t, verify, status_t,
                                        status = this->pts_db->check_comp_measurement(this->pts_db,
                                                                                measurement, this->bios_cid, this->kid,
                                                                                ++this->seq_no, pcr, algo);
-                                       if (status != SUCCESS)
+                                       if (status == FAILED)
                                        {
                                                return status;
                                        }
@@ -803,7 +803,7 @@ METHOD(pts_component_t, verify, status_t,
                }
                if (pcrs->set(pcrs, pcr, pcr_after))
                {
-                       return SUCCESS;
+                       return status;
                }
        }
        else
@@ -811,7 +811,7 @@ METHOD(pts_component_t, verify, status_t,
                pcr_after = pcrs->extend(pcrs, pcr, measurement);
                if (pcr_after.ptr)
                {
-                       return SUCCESS;
+                       return status;
                }
        }
        return FAILED;