blob: 5891be6a7a2501a6b4ade867111f77a64bebc84e [file] [log] [blame]
Karl Zhang3de5ab12021-05-31 11:45:48 +08001/*
Nik Dewallybacae6c2024-07-30 16:58:14 +01002 * Copyright (c) 2019-2024, Arm Limited. All rights reserved.
Karl Zhang3de5ab12021-05-31 11:45:48 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
Nik Dewallybacae6c2024-07-30 16:58:14 +01008#include <string>
9#include <vector>
Karl Zhang3de5ab12021-05-31 11:45:48 +080010
Karl Zhang3de5ab12021-05-31 11:45:48 +080011#include "data_blocks.hpp"
Karl Zhang3de5ab12021-05-31 11:45:48 +080012#include "find_or_create_asset.hpp"
13#include "template_line.hpp"
Karl Zhang3de5ab12021-05-31 11:45:48 +080014#include "psa_call.hpp"
Karl Zhang3de5ab12021-05-31 11:45:48 +080015#include "secure_template_line.hpp"
Karl Zhang3de5ab12021-05-31 11:45:48 +080016
17
18
19/**********************************************************************************
20 Methods of class security_hash_template_line follow:
21**********************************************************************************/
22
23//**************** security_hash_template_line methods ****************
24
25bool security_hash_template_line::copy_template_to_call (psa_call *call)
26{
27 // Copy asset info to call object for creation code -- the entire vector:
28 for (auto as_name : asset_info.asset_name_vector) {
29 /* Also copy into template line object's local vector: */
30 call->asset_info.asset_name_vector.push_back (as_name);
31 }
32 call->asset_info.id_n = asset_info.id_n;
33 // this call is currently limited to name-based
34 call->asset_info.name_specified = true;
35 call->asset_info.asset_ser_no = asset_info.asset_ser_no; // TODO: Does this make sense?
36 call->asset_info.how_asset_found = asset_search::found_active;
37 call->random_asset = random_asset;
38 call->set_data.string_specified = false; // shouldn't matter, but...
39 call->set_data.file_specified = false;
40 call->set_data.file_path.assign("");
41 call->set_data.set("");
42 call->set_data.flags_string.assign ("");
Karl Zhang3de5ab12021-05-31 11:45:48 +080043 return true;
44}
45
46security_hash_template_line::security_hash_template_line (tf_fuzz_info *resources)
47 : security_template_line (resources)
48{
49}
50// Default destructor:
51security_hash_template_line::~security_hash_template_line (void)
52{
53 return; // just to have something to pin a breakpoint onto
54}
55
56// (Default constructor not used)
57
58
59/**********************************************************************************
60 End of methods of class security_hash_template_line.
61**********************************************************************************/