pkcs11-helper
pkcs11h-data.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2011 Alon Bar-Lev <alon.barlev@gmail.com>
3  * All rights reserved.
4  *
5  * This software is available to you under a choice of one of two
6  * licenses. You may choose to be licensed under the terms of the GNU
7  * General Public License (GPL) Version 2, or the BSD license.
8  *
9  * GNU General Public License (GPL) Version 2
10  * ===========================================
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2
13  * as published by the Free Software Foundation.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program (see the file COPYING.GPL included with this
22  * distribution); if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * BSD License
26  * ============
27  * Redistribution and use in source and binary forms, with or without
28  * modification, are permitted provided that the following conditions are met:
29  *
30  * o Redistributions of source code must retain the above copyright notice,
31  * this list of conditions and the following disclaimer.
32  * o Redistributions in binary form must reproduce the above copyright
33  * notice, this list of conditions and the following disclaimer in the
34  * documentation and/or other materials provided with the distribution.
35  * o Neither the name of the Alon Bar-Lev nor the names of its
36  * contributors may be used to endorse or promote products derived from
37  * this software without specific prior written permission.
38  *
39  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
40  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
42  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
43  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
44  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
45  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
46  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49  * POSSIBILITY OF SUCH DAMAGE.
50  */
51 
67 #ifndef __PKCS11H_DATA_H
68 #define __PKCS11H_DATA_H
69 
71 
72 #if defined(__cplusplus)
73 extern "C" {
74 #endif
75 
77 
82 
89 
91  char *application;
93  char *label;
94 };
95 
109 CK_RV
111  IN const pkcs11h_token_id_t token_id,
112  IN const PKCS11H_BOOL is_public,
113  IN const char * const application,
114  IN const char * const label,
115  IN void * const user_data,
116  IN const unsigned mask_prompt,
117  OUT unsigned char * const blob,
118  IN OUT size_t * const p_blob_size
119 );
120 
133 CK_RV
135  IN const pkcs11h_token_id_t token_id,
136  IN const PKCS11H_BOOL is_public,
137  IN const char * const application,
138  IN const char * const label,
139  IN void * const user_data,
140  IN const unsigned mask_prompt,
141  OUT unsigned char * const blob,
142  IN const size_t blob_size
143 );
144 
155 CK_RV
157  IN const pkcs11h_token_id_t token_id,
158  IN const PKCS11H_BOOL is_public,
159  IN const char * const application,
160  IN const char * const label,
161  IN void * const user_data,
162  IN const unsigned mask_prompt
163 );
164 
170 CK_RV
172  IN const pkcs11h_data_id_list_t data_id_list
173 );
174 
185 CK_RV
187  IN const pkcs11h_token_id_t token_id,
188  IN const PKCS11H_BOOL is_public,
189  IN void * const user_data,
190  IN const unsigned mask_prompt,
191  OUT pkcs11h_data_id_list_t * const p_data_id_list
192 );
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
200 #endif /* __PKCS11H_DATA_H */
CK_RV pkcs11h_data_put(IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN const char *const application, IN const char *const label, IN void *const user_data, IN const unsigned mask_prompt, OUT unsigned char *const blob, IN const size_t blob_size)
Put data object.
CK_RV pkcs11h_data_del(IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN const char *const application, IN const char *const label, IN void *const user_data, IN const unsigned mask_prompt)
Delete data object.
CK_RV pkcs11h_data_get(IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN const char *const application, IN const char *const label, IN void *const user_data, IN const unsigned mask_prompt, OUT unsigned char *const blob, IN OUT size_t *const p_blob_size)
Get data object.
struct pkcs11h_data_id_list_s * pkcs11h_data_id_list_t
Data identifier list.
Definition: pkcs11h-data.h:81
Token identifier.
Definition: pkcs11h-core.h:269
pkcs11h_data_id_list_t next
Definition: pkcs11h-data.h:88
pkcs11-helper core.
char * label
Definition: pkcs11h-data.h:93
CK_RV pkcs11h_data_enumDataObjects(IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN void *const user_data, IN const unsigned mask_prompt, OUT pkcs11h_data_id_list_t *const p_data_id_list)
Get list of data objects.
CK_RV pkcs11h_data_freeDataIdList(IN const pkcs11h_data_id_list_t data_id_list)
Free data object list.
Data identifier list.
Definition: pkcs11h-data.h:86
char * application
Definition: pkcs11h-data.h:91

pkcs11-helper, Copyright (C) Alon Bar-Lev <alon.barlev@gmail.com>OpenSC-Project.org Logo