1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
20 int setup_nss_functions(void *nss_handle
, void *nssutil_handle
,
23 #define NSS_WRAPPER(name, return_type, args...) \
24 typedef return_type (*name##_t)(args); \
25 extern name##_t f_##name;
27 NSS_WRAPPER(NSS_Initialize
, SECStatus
, const char *, const char *, const char *,
28 const char *, uint32_t)
29 NSS_WRAPPER(NSS_Shutdown
, void, void)
30 NSS_WRAPPER(PK11SDR_Encrypt
, SECStatus
, SECItem
*, SECItem
*, SECItem
*, void *)
31 NSS_WRAPPER(PK11SDR_Decrypt
, SECStatus
, SECItem
*, SECItem
*, void *)
32 NSS_WRAPPER(SECITEM_ZfreeItem
, void, SECItem
*, PRBool
)
33 NSS_WRAPPER(PR_ErrorToString
, char *, PRErrorCode
, PRLanguageCode
)
34 NSS_WRAPPER(PR_GetError
, PRErrorCode
, void)
35 NSS_WRAPPER(PR_Free
, PRErrorCode
, char *)
36 NSS_WRAPPER(PL_Base64Encode
, char *, const char *, uint32_t, char *)
37 NSS_WRAPPER(PL_Base64Decode
, char *, const char *, uint32_t, char *)
38 NSS_WRAPPER(PL_strfree
, void, char *)
39 NSS_WRAPPER(PK11_GetInternalKeySlot
, PK11SlotInfo
*, void)
40 NSS_WRAPPER(PK11_NeedUserInit
, PRBool
, PK11SlotInfo
*)
41 NSS_WRAPPER(PK11_InitPin
, SECStatus
, PK11SlotInfo
*, const char *, const char *)