2 * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
17 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
18 * @author Zofia Abramowska (z.abramowska@samsung.com)
20 * @brief This file contains list of all protocols suported by Central
28 #include <ckm/ckm-type.h>
29 #include <pkcs12-impl.h>
31 #include <dpl/exception.h>
32 #include <dpl/serialization.h>
33 #include <symbol-visibility.h>
34 #include <data-type.h>
38 COMMON_API extern char const * const SERVICE_SOCKET_ECHO;
39 COMMON_API extern char const * const SERVICE_SOCKET_CKM_CONTROL;
40 COMMON_API extern char const * const SERVICE_SOCKET_CKM_STORAGE;
41 COMMON_API extern char const * const SERVICE_SOCKET_OCSP;
42 COMMON_API extern char const * const SERVICE_SOCKET_ENCRYPTION;
44 enum class ControlCommand : int {
55 enum class LogicCommand : int {
71 enum class EncryptionCommand : int {
76 // (client side) Alias = (service side) Label::Name
77 COMMON_API extern char const * const LABEL_NAME_SEPARATOR;
78 COMMON_API extern char const * const LABEL_SYSTEM_DB;
79 typedef std::string Name;
80 typedef std::vector<std::pair<Label, Name> > LabelNameVector;
84 struct COMMON_API PolicySerializable : public Policy, ISerializable {
85 PolicySerializable() {};
86 explicit PolicySerializable(const Policy &policy) : Policy(policy) {}
87 explicit PolicySerializable(IStream &stream) {
88 Deserialization::Deserialize(stream, password);
89 Deserialization::Deserialize(stream, extractable);
91 void Serialize(IStream &stream) const {
92 Serialization::Serialize(stream, password);
93 Serialization::Serialize(stream, extractable);
97 struct COMMON_API PKCS12Serializable : public PKCS12Impl, ISerializable {
99 explicit PKCS12Serializable(const PKCS12 &);
100 explicit PKCS12Serializable(IStream &);
102 const KeyShPtr &privKey,
103 const CertificateShPtr &cert,
104 const CertificateShPtrVector &chainCerts);
105 void Serialize(IStream &) const;
108 struct COMMON_API CryptoAlgorithmSerializable : public CryptoAlgorithm, ISerializable {
109 DECLARE_EXCEPTION_TYPE(Exception, Base);
110 DECLARE_EXCEPTION_TYPE(Exception, UnsupportedParam);
112 CryptoAlgorithmSerializable();
113 explicit CryptoAlgorithmSerializable(const CryptoAlgorithm &);
114 explicit CryptoAlgorithmSerializable(IStream &);
116 void Serialize(IStream &) const;