2 * Copyright (c) 2012 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.
21 /* standard library header */
23 /* SLP library header */
26 #include "smartcard-types.h"
28 #include "AccessControlList.h"
30 #endif /* __cplusplus */
33 namespace smartcard_service_api
35 class GPSEACL: public AccessControlList
41 static ByteArray OID_GLOBALPLATFORM;
43 int loadAccessControl(PKCS15DODF *dodf);
44 int loadRules(ByteArray path);
45 int loadAccessConditions(ByteArray aid, ByteArray path);
48 GPSEACL(Channel *channel);
55 } /* namespace smartcard_service_api */
56 #endif /* __cplusplus */
62 #endif /* __cplusplus */
64 typedef void *gp_se_acl_h;
66 gp_se_acl_h gp_se_acl_create_instance(channel_h channel);
67 int gp_se_acl_load_acl(gp_se_acl_h handle);
68 int gp_se_acl_update_acl(gp_se_acl_h handle);
69 void gp_se_acl_release_acl(gp_se_acl_h handle);
70 bool gp_se_acl_is_authorized_access(gp_se_acl_h handle, unsigned char *aidBuffer, unsigned int aidLength, unsigned char *certHashBuffer, unsigned int certHashLength);
71 void gp_se_acl_destroy_instance(gp_se_acl_h handle);
75 #endif /* __cplusplus */
77 #endif /* GPSEACL_H_ */