1 /*
2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3  *
4  * SPDX-License-Identifier: MPL-2.0
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0.  If a copy of the MPL was not distributed with this
8  * file, you can obtain one at https://mozilla.org/MPL/2.0/.
9  *
10  * See the COPYRIGHT file distributed with this work for additional
11  * information regarding copyright ownership.
12  */
13 
14 #ifndef PK11_INTERNAL_H
15 #define PK11_INTERNAL_H 1
16 
17 /*! \file pk11/internal.h */
18 
19 #include <pk11/pk11.h>
20 
21 ISC_LANG_BEGINDECLS
22 
23 const char *
24 pk11_get_lib_name(void);
25 
26 void *
27 pk11_mem_get(size_t size);
28 
29 void
30 pk11_mem_put(void *ptr, size_t size);
31 
32 CK_SLOT_ID
33 pk11_get_best_token(pk11_optype_t optype);
34 
35 isc_result_t
36 pk11_numbits(CK_BYTE_PTR data, unsigned int bytecnt, unsigned int *bits);
37 
38 CK_ATTRIBUTE *
39 pk11_attribute_first(const pk11_object_t *obj);
40 
41 CK_ATTRIBUTE *
42 pk11_attribute_next(const pk11_object_t *obj, CK_ATTRIBUTE *attr);
43 
44 CK_ATTRIBUTE *
45 pk11_attribute_bytype(const pk11_object_t *obj, CK_ATTRIBUTE_TYPE type);
46 
47 ISC_LANG_ENDDECLS
48 
49 #endif /* PK11_INTERNAL_H */
50