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
40 static ByteArray OID_GLOBALPLATFORM;
42 int loadAccessControl(Channel *channel, PKCS15DODF *dodf);
43 int loadRules(Channel *channel, ByteArray path);
44 int loadAccessConditions(Channel *channel, ByteArray aid, ByteArray path);
50 int loadACL(Channel *channel);
54 } /* namespace smartcard_service_api */
55 #endif /* __cplusplus */
61 #endif /* __cplusplus */
63 typedef void *gp_se_acl_h;
65 gp_se_acl_h gp_se_acl_create_instance();
66 int gp_se_acl_load_acl(gp_se_acl_h handle, channel_h channel);
67 int gp_se_acl_update_acl(gp_se_acl_h handle, channel_h channel);
68 void gp_se_acl_release_acl(gp_se_acl_h handle);
69 bool gp_se_acl_is_authorized_access(gp_se_acl_h handle, unsigned char *aidBuffer, unsigned int aidLength, unsigned char *certHashBuffer, unsigned int certHashLength);
70 void gp_se_acl_destroy_instance(gp_se_acl_h handle);
74 #endif /* __cplusplus */
76 #endif /* GPSEACL_H_ */