blob: 73fbde3b2941c131e59ce3622fd9930af6bdb01c [file] [log] [blame]
Karl Zhang3de5ab12021-05-31 11:45:48 +08001/*
2 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "class_forwards.hpp"
9
10#include "boilerplate.hpp"
11#include "gibberish.hpp"
12#include "compute.hpp"
13#include "data_blocks.hpp"
14#include "psa_asset.hpp"
15#include "find_or_create_asset.hpp"
16#include "template_line.hpp"
17#include "tf_fuzz.hpp"
18#include "crypto_asset.hpp"
19#include "psa_call.hpp"
20#include "security_call.hpp"
21#include "secure_template_line.hpp"
22#include "sst_call.hpp"
23#include "sst_template_line.hpp"
24#include "sst_asset.hpp"
25#include "crypto_asset.hpp"
26
27
28
29/**********************************************************************************
30 Methods of class security_hash_template_line follow:
31**********************************************************************************/
32
33//**************** security_hash_template_line methods ****************
34
35bool security_hash_template_line::copy_template_to_call (psa_call *call)
36{
37 // Copy asset info to call object for creation code -- the entire vector:
38 for (auto as_name : asset_info.asset_name_vector) {
39 /* Also copy into template line object's local vector: */
40 call->asset_info.asset_name_vector.push_back (as_name);
41 }
42 call->asset_info.id_n = asset_info.id_n;
43 // this call is currently limited to name-based
44 call->asset_info.name_specified = true;
45 call->asset_info.asset_ser_no = asset_info.asset_ser_no; // TODO: Does this make sense?
46 call->asset_info.how_asset_found = asset_search::found_active;
47 call->random_asset = random_asset;
48 call->set_data.string_specified = false; // shouldn't matter, but...
49 call->set_data.file_specified = false;
50 call->set_data.file_path.assign("");
51 call->set_data.set("");
52 call->set_data.flags_string.assign ("");
53 call->exp_data.pf_info_incomplete = true;
54 return true;
55}
56
57security_hash_template_line::security_hash_template_line (tf_fuzz_info *resources)
58 : security_template_line (resources)
59{
60}
61// Default destructor:
62security_hash_template_line::~security_hash_template_line (void)
63{
64 return; // just to have something to pin a breakpoint onto
65}
66
67// (Default constructor not used)
68
69
70/**********************************************************************************
71 End of methods of class security_hash_template_line.
72**********************************************************************************/
73