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;
43 enum class ControlCommand : int {
52 // for backward compatibility append new at the end
55 enum class LogicCommand : int {
61 CREATE_KEY_PAIR_ECDSA,
70 // for backward compatibility append new at the end
73 // (client side) Alias = (service side) Label::Name
74 COMMON_API extern char const * const LABEL_NAME_SEPARATOR;
75 COMMON_API extern char const * const LABEL_SYSTEM_DB;
76 typedef std::string Name;
77 typedef std::vector<std::pair<Label, Name> > LabelNameVector;
81 struct COMMON_API PolicySerializable : public Policy, ISerializable {
82 PolicySerializable() {};
83 explicit PolicySerializable(const Policy &policy) : Policy(policy) {}
84 explicit PolicySerializable(IStream &stream) {
85 Deserialization::Deserialize(stream, password);
86 Deserialization::Deserialize(stream, extractable);
88 void Serialize(IStream &stream) const {
89 Serialization::Serialize(stream, password);
90 Serialization::Serialize(stream, extractable);
94 struct COMMON_API PKCS12Serializable : public PKCS12Impl, ISerializable {
96 explicit PKCS12Serializable(const PKCS12 &);
97 explicit PKCS12Serializable(IStream &);
99 const KeyShPtr &privKey,
100 const CertificateShPtr &cert,
101 const CertificateShPtrVector &chainCerts);
102 void Serialize(IStream &) const;
105 struct COMMON_API CryptoAlgorithmSerializable : public CryptoAlgorithm, ISerializable {
106 DECLARE_EXCEPTION_TYPE(Exception, Base);
107 DECLARE_EXCEPTION_TYPE(Exception, UnsupportedParam);
109 CryptoAlgorithmSerializable();
110 explicit CryptoAlgorithmSerializable(const CryptoAlgorithm &);
111 explicit CryptoAlgorithmSerializable(IStream &);
113 void Serialize(IStream &) const;