andre@0: /* This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: /* andre@0: * pkix_pl_common.h andre@0: * andre@0: * Common central header file included by all PL source files andre@0: * andre@0: */ andre@0: andre@0: #ifndef _PKIX_PL_COMMON_H andre@0: #define _PKIX_PL_COMMON_H andre@0: andre@0: /* PKIX HEADERS */ andre@0: #include "pkix_tools.h" andre@0: andre@0: /* NSS headers */ andre@0: #include "nss.h" andre@0: #include "secport.h" andre@0: #include "secasn1.h" andre@0: #include "secerr.h" andre@0: #include "base64.h" andre@0: #include "cert.h" andre@0: #include "certdb.h" andre@0: #include "genname.h" andre@0: #include "xconst.h" andre@0: #include "keyhi.h" andre@0: #include "ocsp.h" andre@0: #include "ocspt.h" andre@0: #include "pk11pub.h" andre@0: #include "pkcs11.h" andre@0: #include "pkcs11t.h" andre@0: #include "prio.h" andre@0: andre@0: /* NSPR headers */ andre@0: #include "nspr.h" andre@0: andre@0: /* private PKIX_PL_NSS system headers */ andre@0: #include "pkix_pl_object.h" andre@0: #include "pkix_pl_string.h" andre@0: #ifndef NSS_PKIX_NO_LDAP andre@0: #include "pkix_pl_ldapt.h" andre@0: #endif /* !NSS_PKIX_NO_LDAP */ andre@0: #include "pkix_pl_aiamgr.h" andre@0: #include "pkix_pl_bigint.h" andre@0: #include "pkix_pl_oid.h" andre@0: #include "pkix_pl_x500name.h" andre@0: #include "pkix_pl_generalname.h" andre@0: #include "pkix_pl_publickey.h" andre@0: #include "pkix_pl_bytearray.h" andre@0: #include "pkix_pl_date.h" andre@0: #include "pkix_pl_primhash.h" andre@0: #include "pkix_pl_basicconstraints.h" andre@0: #include "pkix_pl_bytearray.h" andre@0: #include "pkix_pl_cert.h" andre@0: #include "pkix_pl_certpolicyinfo.h" andre@0: #include "pkix_pl_certpolicymap.h" andre@0: #include "pkix_pl_certpolicyqualifier.h" andre@0: #include "pkix_pl_crldp.h" andre@0: #include "pkix_pl_crl.h" andre@0: #include "pkix_pl_crlentry.h" andre@0: #include "pkix_pl_nameconstraints.h" andre@0: #include "pkix_pl_ocsprequest.h" andre@0: #include "pkix_pl_ocspresponse.h" andre@0: #include "pkix_pl_pk11certstore.h" andre@0: #include "pkix_pl_socket.h" andre@0: #ifndef NSS_PKIX_NO_LDAP andre@0: #include "pkix_pl_ldapcertstore.h" andre@0: #include "pkix_pl_ldaprequest.h" andre@0: #include "pkix_pl_ldapresponse.h" andre@0: #endif /* !NSS_PKIX_NO_LDAP */ andre@0: #include "pkix_pl_nsscontext.h" andre@0: #include "pkix_pl_httpcertstore.h" andre@0: #include "pkix_pl_httpdefaultclient.h" andre@0: #include "pkix_pl_infoaccess.h" andre@0: #include "pkix_sample_modules.h" andre@0: andre@0: #define MAX_DIGITS_32 (PKIX_UInt32) 10 andre@0: andre@0: #define PKIX_PL_NSSCALL(type, func, args) \ andre@0: PKIX_ ## type ## _DEBUG_ARG("( Calling %s).\n", #func); \ andre@0: (func args) andre@0: andre@0: #define PKIX_PL_NSSCALLRV(type, lvalue, func, args) \ andre@0: PKIX_ ## type ## _DEBUG_ARG("( Calling %s).\n", #func); \ andre@0: lvalue = (func args) andre@0: andre@0: /* see source file for function documentation */ andre@0: andre@0: PKIX_Error * andre@0: pkix_LockObject( andre@0: PKIX_PL_Object *object, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_UnlockObject( andre@0: PKIX_PL_Object *object, andre@0: void *plContext); andre@0: andre@0: PKIX_Boolean andre@0: pkix_pl_UInt32_Overflows(char *string); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_helperBytes2Ascii( andre@0: PKIX_UInt32 *tokens, andre@0: PKIX_UInt32 numTokens, andre@0: char **pAscii, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_ipAddrBytes2Ascii( andre@0: SECItem *secItem, andre@0: char **pAscii, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_oidBytes2Ascii( andre@0: SECItem *secItem, andre@0: char **pAscii, andre@0: void *plContext); andre@0: andre@0: /* --String-Encoding-Conversion-Functions------------------------ */ andre@0: andre@0: PKIX_Error * andre@0: pkix_UTF16_to_EscASCII( andre@0: const void *utf16String, andre@0: PKIX_UInt32 utf16Length, andre@0: PKIX_Boolean debug, andre@0: char **pDest, andre@0: PKIX_UInt32 *pLength, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_EscASCII_to_UTF16( andre@0: const char *escAsciiString, andre@0: PKIX_UInt32 escAsciiLen, andre@0: PKIX_Boolean debug, andre@0: void **pDest, andre@0: PKIX_UInt32 *pLength, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_UTF16_to_UTF8( andre@0: const void *utf16String, andre@0: PKIX_UInt32 utf16Length, andre@0: PKIX_Boolean null_Term, andre@0: void **pDest, andre@0: PKIX_UInt32 *pLength, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_UTF8_to_UTF16( andre@0: const void *utf8Source, andre@0: PKIX_UInt32 utf8Length, andre@0: void **pDest, andre@0: PKIX_UInt32 *pLength, andre@0: void *plContext); andre@0: andre@0: #endif /* _PKIX_PL_COMMON_H */