2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
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.
18 #ifndef PKCS15OBJECT_H_
19 #define PKCS15OBJECT_H_
21 /* standard library header */
25 /* SLP library header */
28 #include "FileObject.h"
29 #include "PKCS15Path.h"
33 namespace smartcard_service_api
35 class PKCS15Object: public FileObject
38 map<unsigned int, ByteArray> dataList;
41 /* TODO : encapsulate below to asn class */
42 static const unsigned int TAG_SEQUENCE = (unsigned int)0x30;
43 static const unsigned int TAG_OCTET_STREAM = (unsigned int)0x04;
46 PKCS15Object(Channel *channel);
47 PKCS15Object(Channel *channel, ByteArray selectResponse);
50 int decodePath(ByteArray path, PKCS15Path &result);
51 int getPath(unsigned int type, PKCS15Path &result);
52 int getPaths(vector<PKCS15Path> &paths);
54 static ByteArray getOctetStream(const ByteArray &data);
57 } /* namespace smartcard_service_api */
58 #endif /* PKCS15OBJECT_H_ */