1 /*
2  * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef STANDALONE_CRYPTO_SERVICE_CONTEXT_H
8 #define STANDALONE_CRYPTO_SERVICE_CONTEXT_H
9 
10 #include <service/locator/standalone/standalone_service_context.h>
11 #include <rpc/direct/direct_caller.h>
12 #include <service/crypto/provider/crypto_provider.h>
13 #include <service/secure_storage/backend/secure_storage_client/secure_storage_client.h>
14 #include <service/secure_storage/backend/null_store/null_store.h>
15 
16 class crypto_service_context : public standalone_service_context
17 {
18 public:
19     crypto_service_context(const char *sn, unsigned int encoding);
20     virtual ~crypto_service_context();
21 
22 private:
23 
24     void do_init();
25     void do_deinit();
26 
27     unsigned int m_encoding;
28     struct crypto_provider *m_crypto_provider;
29     struct secure_storage_client m_storage_client;
30     struct null_store m_null_store;
31     struct service_context *m_storage_service_context;
32     struct rpc_caller_session *m_storage_session;
33 };
34 
35 #endif /* STANDALONE_CRYPTO_SERVICE_CONTEXT_H */
36