summaryrefslogtreecommitdiff
path: root/tests/app_event_operators.h
diff options
context:
space:
mode:
authorJanusz Kozerski <j.kozerski@samsung.com>2015-06-26 11:58:59 +0200
committerJanusz Kozerski <j.kozerski@samsung.com>2015-07-10 11:06:57 +0200
commit1bf0726b3028ddfaae0cdd70e46b416335da39a0 (patch)
tree3c4fff7b35b783a219f763315d4da94ef88137ad /tests/app_event_operators.h
parentaa31c0517333688b611ba453b08138960b53244e (diff)
downloadcert-checker-1bf0726b3028ddfaae0cdd70e46b416335da39a0.tar.gz
cert-checker-1bf0726b3028ddfaae0cdd70e46b416335da39a0.tar.bz2
cert-checker-1bf0726b3028ddfaae0cdd70e46b416335da39a0.zip
Refactor DB and app_t structure - preparation for OCSP checking.
New version of DB is needed to keep separately certificates from each signatrue. Because application can be signed by more than one signature we need to keep all certificates from all signatures in separate lists to make building certificates' chains easier. * Add operators (==, !=, <) for app_t structre * Add operators (==, !=) for event_t structure * Add tests for operators * Remove check_id from app_t structure Change-Id: I966dd81420618325d1afa55bcbc656291ccb4238
Diffstat (limited to 'tests/app_event_operators.h')
-rw-r--r--tests/app_event_operators.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/app_event_operators.h b/tests/app_event_operators.h
new file mode 100644
index 0000000..3e96d28
--- /dev/null
+++ b/tests/app_event_operators.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2011 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * @file app_test_class.h
+ * @author Janusz Kozerski (j.kozerski@samsung.com)
+ * @version 1.0
+ * @brief Implementation of app_test class (from app_t)
+ */
+
+#include <cchecker/app.h>
+#include <cchecker/queue.h>
+
+#ifndef CCHECKER_APP_TEST_CLASS_H
+#define CCHECKER_APP_TEST_CLASS_H
+
+namespace CCHECKER {
+
+void sort(app_t &app);
+bool operator ==(const app_t &app1, const app_t &app2);
+bool operator !=(const app_t &app1, const app_t &app2);
+bool operator < (const app_t &app1, const app_t &app2);
+
+bool operator ==(const event_t &event1, const event_t &event2);
+bool operator !=(const event_t &event1, const event_t &event2);
+
+} // CCHECKER
+
+#endif //CCHECKER_APP_TEST_CLASS_H