本文整理汇总了C++中PKIX_NULLCHECK_TWO函数的典型用法代码示例。如果您正苦于以下问题:C++ PKIX_NULLCHECK_TWO函数的具体用法?C++ PKIX_NULLCHECK_TWO怎么用?C++ PKIX_NULLCHECK_TWO使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PKIX_NULLCHECK_TWO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PKIX_PL_ByteArray_GetLength
/*
* FUNCTION: PKIX_PL_ByteArray_GetLength (see comments in pkix_pl_system.h)
*/
PKIX_Error *
PKIX_PL_ByteArray_GetLength(
PKIX_PL_ByteArray *byteArray,
PKIX_UInt32 *pLength,
void *plContext)
{
PKIX_ENTER(BYTEARRAY, "PKIX_PL_ByteArray_GetLength");
PKIX_NULLCHECK_TWO(byteArray, pLength);
*pLength = byteArray->length;
PKIX_RETURN(BYTEARRAY);
}
示例2: PKIX_ComCertSelParams_GetLeafCertFlag
/*
* FUNCTION: PKIX_ComCertSelParams_GetLeafCertFlag
* (see comments in pkix_certsel.h)
*/
PKIX_Error*
PKIX_ComCertSelParams_GetLeafCertFlag(
PKIX_ComCertSelParams *params,
PKIX_Boolean *pLeafFlag,
void *plContext)
{
PKIX_ENTER(COMCERTSELPARAMS, "PKIX_ComCertSelParams_GetLeafCertFlag");
PKIX_NULLCHECK_TWO(params, pLeafFlag);
*pLeafFlag = params->leafCertFlag;
PKIX_RETURN(COMCERTSELPARAMS);
}
示例3: PKIX_ComCertSelParams_GetVersion
/*
* FUNCTION: PKIX_ComCertSelParams_GetVersion
* (see comments in pkix_certsel.h)
*/
PKIX_Error *
PKIX_ComCertSelParams_GetVersion(
PKIX_ComCertSelParams *params,
PKIX_UInt32 *pVersion,
void *plContext)
{
PKIX_ENTER(COMCERTSELPARAMS, "PKIX_ComCertSelParams_GetVersion");
PKIX_NULLCHECK_TWO(params, pVersion);
*pVersion = params->version;
PKIX_RETURN(COMCERTSELPARAMS);
}
示例4: PKIX_ProcessingParams_GetUseAIAForCertFetching
/*
* FUNCTION: PKIX_ProcessingParams_GetUseAIAForCertFetching
* (see comments in pkix_params.h)
*/
PKIX_Error *
PKIX_ProcessingParams_GetUseAIAForCertFetching(
PKIX_ProcessingParams *params,
PKIX_Boolean *pUseAIA, /* list of TrustAnchor */
void *plContext)
{
PKIX_ENTER(PROCESSINGPARAMS, "PKIX_ProcessingParams_GetUseAIAForCertFetching");
PKIX_NULLCHECK_TWO(params, pUseAIA);
*pUseAIA = params->useAIAForCertFetching;
PKIX_RETURN(PROCESSINGPARAMS);
}
示例5: pkix_pl_Object_Hashcode_Default
/*
* FUNCTION: pkix_pl_Object_Hashcode_Default
* DESCRIPTION:
*
* Default Object_Hashcode callback. Creates the a hashcode value using the
* address of the Object pointed to by "object" and stores the result at
* "pValue".
*
* XXX This isn't great since addresses are not uniformly distributed.
*
* PARAMETERS:
* "object"
* Address of Object to compute hashcode for. Must be non-NULL.
* "pValue"
* Address where PKIX_UInt32 will be stored. Must be non-NULL.
* "plContext"
* Platform-specific context pointer.
* THREAD SAFETY:
* Thread Safe (see Thread Safety Definitions in Programmer's Guide)
* RETURNS:
* Returns NULL if the function succeeds.
* Returns a Fatal Error if the function fails in an unrecoverable way.
*/
static PKIX_Error *
pkix_pl_Object_Hashcode_Default(
PKIX_PL_Object *object,
PKIX_UInt32 *pValue,
void *plContext)
{
PKIX_ENTER(OBJECT, "pkix_pl_Object_Hashcode_Default");
PKIX_NULLCHECK_TWO(object, pValue);
*pValue = (PKIX_UInt32)((char *)object - (char *)NULL);
PKIX_RETURN(OBJECT);
}
示例6: pkix_pl_Date_GetPRTime
/*
* FUNCTION: pkix_pl_Date_GetPRTime
* DESCRIPTION:
*
* Translates into a PRTime the Date embodied by the Date object pointed to
* by "date", and stores it at "pPRTime".
*
* PARAMETERS
* "date"
* Address of Date whose PRTime representation is desired. Must be
* non-NULL.
* "pPRTime"
* Address where PRTime value will be stored. Must be non-NULL.
* "plContext" - Platform-specific context pointer.
* THREAD SAFETY:
* Thread Safe (see Thread Safety Definitions in Programmer's Guide)
* RETURNS:
* Returns NULL if the function succeeds.
* Returns a Date Error if the function fails in a non-fatal way.
* Returns a Fatal Error if the function fails in an unrecoverable way.
*/
PKIX_Error *
pkix_pl_Date_GetPRTime(
PKIX_PL_Date *date,
PRTime *pPRTime,
void *plContext)
{
PKIX_ENTER(DATE, "PKIX_PL_Date_GetPRTime");
PKIX_NULLCHECK_TWO(date, pPRTime);
*pPRTime = date->nssTime;
PKIX_RETURN(DATE);
}
示例7: pkix_pl_CertPolicyMap_ToString
/*
* FUNCTION: pkix_pl_CertPolicyMap_ToString
* (see comments for PKIX_PL_ToStringCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_CertPolicyMap_ToString(
PKIX_PL_Object *object,
PKIX_PL_String **pString,
void *plContext)
{
PKIX_PL_CertPolicyMap *certMap = NULL;
PKIX_PL_String *format = NULL;
PKIX_PL_String *outString = NULL;
PKIX_PL_String *issuerString = NULL;
PKIX_PL_String *subjectString = NULL;
PKIX_ENTER(CERTPOLICYMAP, "pkix_pl_CertPolicyMap_ToString");
PKIX_NULLCHECK_TWO(object, pString);
PKIX_CHECK(pkix_CheckType(object, PKIX_CERTPOLICYMAP_TYPE, plContext),
PKIX_OBJECTNOTCERTPOLICYMAP);
certMap = (PKIX_PL_CertPolicyMap *)object;
PKIX_TOSTRING
(certMap->issuerDomainPolicy,
&issuerString,
plContext,
PKIX_OBJECTTOSTRINGFAILED);
PKIX_TOSTRING
(certMap->subjectDomainPolicy,
&subjectString,
plContext,
PKIX_OBJECTTOSTRINGFAILED);
/* Put them together in the form issuerPolicy=>subjectPolicy */
PKIX_CHECK(PKIX_PL_String_Create
(PKIX_ESCASCII, "%s=>%s", 0, &format, plContext),
PKIX_ERRORINSTRINGCREATE);
PKIX_CHECK(PKIX_PL_Sprintf
(&outString, plContext, format, issuerString, subjectString),
PKIX_ERRORINSPRINTF);
*pString = outString;
cleanup:
PKIX_DECREF(format);
PKIX_DECREF(issuerString);
PKIX_DECREF(subjectString);
PKIX_RETURN(CERTPOLICYMAP);
}
示例8: pkix_List_Hashcode
/*
* FUNCTION: pkix_List_Hashcode
* (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_List_Hashcode(
PKIX_PL_Object *object,
PKIX_UInt32 *pHashcode,
void *plContext)
{
PKIX_List *list = NULL;
PKIX_PL_Object *element = NULL;
PKIX_UInt32 hash = 0;
PKIX_UInt32 tempHash = 0;
PKIX_UInt32 length, i;
PKIX_ENTER(LIST, "pkix_List_Hashcode");
PKIX_NULLCHECK_TWO(object, pHashcode);
PKIX_CHECK(pkix_CheckType(object, PKIX_LIST_TYPE, plContext),
PKIX_OBJECTNOTLIST);
list = (PKIX_List *)object;
if (!list->isHeader){
PKIX_ERROR(PKIX_INPUTLISTMUSTBEHEADER);
}
length = list->length;
for (i = 0; i < length; i++){
PKIX_CHECK(PKIX_List_GetItem(list, i, &element, plContext),
PKIX_LISTGETITEMFAILED);
if (!element){
tempHash = 100;
} else {
PKIX_CHECK(PKIX_PL_Object_Hashcode
(element, &tempHash, plContext),
PKIX_LISTHASHCODEFAILED);
}
hash = 31 * hash + tempHash;
PKIX_DECREF(element);
}
*pHashcode = hash;
cleanup:
PKIX_DECREF(element);
PKIX_RETURN(LIST);
}
示例9: PKIX_ComCertSelParams_GetKeyUsage
/*
* FUNCTION: PKIX_ComCertSelParams_GetKeyUsage
* (see comments in pkix_certsel.h)
*/
PKIX_Error *
PKIX_ComCertSelParams_GetKeyUsage(
PKIX_ComCertSelParams *params,
PKIX_UInt32 *pKeyUsage,
void *plContext)
{
PKIX_ENTER(COMCERTSELPARAMS,
"PKIX_ComCertSelParams_GetKeyUsage");
PKIX_NULLCHECK_TWO(params, pKeyUsage);
*pKeyUsage = params->keyUsage;
PKIX_RETURN(COMCERTSELPARAMS);
}
示例10: PKIX_PL_BasicConstraints_GetPathLenConstraint
/*
* FUNCTION: PKIX_PL_BasicConstraints_GetPathLenConstraint
* (see comments in pkix_pl_pki.h)
*/
PKIX_Error *
PKIX_PL_BasicConstraints_GetPathLenConstraint(
PKIX_PL_CertBasicConstraints *basicConstraints,
PKIX_Int32 *pPathLenConstraint,
void *plContext)
{
PKIX_ENTER(CERTBASICCONSTRAINTS,
"PKIX_PL_BasicConstraintsGetPathLenConstraint");
PKIX_NULLCHECK_TWO(basicConstraints, pPathLenConstraint);
*pPathLenConstraint = basicConstraints->pathLen;
PKIX_RETURN(CERTBASICCONSTRAINTS);
}
示例11: PKIX_PL_BasicConstraints_GetCAFlag
/*
* FUNCTION: PKIX_PL_BasicConstraints_GetCAFlag
* (see comments in pkix_pl_pki.h)
*/
PKIX_Error *
PKIX_PL_BasicConstraints_GetCAFlag(
PKIX_PL_CertBasicConstraints *basicConstraints,
PKIX_Boolean *pResult,
void *plContext)
{
PKIX_ENTER(CERTBASICCONSTRAINTS,
"PKIX_PL_BasicConstraintsGetCAFlag");
PKIX_NULLCHECK_TWO(basicConstraints, pResult);
*pResult = basicConstraints->isCA;
PKIX_RETURN(CERTBASICCONSTRAINTS);
}
示例12: PKIX_RevocationChecker_GetRevCallback
/*
* FUNCTION: PKIX_RevocationChecker_GetCheckCallback
* (see comments in pkix_checker.h)
*/
PKIX_Error *
PKIX_RevocationChecker_GetRevCallback(
PKIX_RevocationChecker *checker,
PKIX_RevocationChecker_RevCallback *pCallback,
void *plContext)
{
PKIX_ENTER
(REVOCATIONCHECKER, "PKIX_RevocationChecker_GetRevCallback");
PKIX_NULLCHECK_TWO(checker, pCallback);
*pCallback = checker->checkCallback;
PKIX_RETURN(REVOCATIONCHECKER);
}
示例13: PKIX_ComCertSelParams_GetBasicConstraints
/*
* FUNCTION: PKIX_ComCertSelParams_GetBasicConstraints
* (see comments in pkix_certsel.h)
*/
PKIX_Error *
PKIX_ComCertSelParams_GetBasicConstraints(
PKIX_ComCertSelParams *params,
PKIX_Int32 *pMinPathLength,
void *plContext)
{
PKIX_ENTER(COMCERTSELPARAMS,
"PKIX_ComCertSelParams_GetBasicConstraints");
PKIX_NULLCHECK_TWO(params, pMinPathLength);
*pMinPathLength = params->minPathLength;
PKIX_RETURN(COMCERTSELPARAMS);
}
示例14: PKIX_ComCertSelParams_GetMatchAllSubjAltNames
/*
* FUNCTION: PKIX_ComCertSelParams_GetMatchAllSubjAltNames
* (see comments in pkix_certsel.h)
*/
PKIX_Error *
PKIX_ComCertSelParams_GetMatchAllSubjAltNames(
PKIX_ComCertSelParams *params,
PKIX_Boolean *pMatch,
void *plContext)
{
PKIX_ENTER(COMCERTSELPARAMS,
"PKIX_ComCertSelParams_GetMatchAllSubjAltNames");
PKIX_NULLCHECK_TWO(params, pMatch);
*pMatch = params->matchAllSubjAltNames;
PKIX_RETURN(COMCERTSELPARAMS);
}
示例15: pkix_pl_CertBasicConstraints_Hashcode
/*
* FUNCTION: pkix_pl_CertBasicConstraints_Hashcode
* (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_CertBasicConstraints_Hashcode(
PKIX_PL_Object *object,
PKIX_UInt32 *pHashcode,
void *plContext)
{
PKIX_PL_CertBasicConstraints *certB = NULL;
PKIX_Boolean isCA = PKIX_FALSE;
PKIX_Int32 pathLen = 0;
PKIX_Int32 hashInput = 0;
PKIX_UInt32 cbcHash = 0;
PKIX_ENTER(CERTBASICCONSTRAINTS,
"pkix_pl_CertBasicConstraints_Hashcode");
PKIX_NULLCHECK_TWO(object, pHashcode);
PKIX_CHECK(pkix_CheckType
(object, PKIX_CERTBASICCONSTRAINTS_TYPE, plContext),
PKIX_OBJECTNOTCERTBASICCONSTRAINTS);
certB = (PKIX_PL_CertBasicConstraints *)object;
/*
* if CA == TRUE
* hash(pathLen + 1 - PKIX_UNLIMITED_PATH_CONSTRAINT)
* if CA == FALSE, hash(0)
*/
isCA = certB->isCA;
if (isCA) {
pathLen = certB->pathLen;
hashInput = pathLen + 1 - PKIX_UNLIMITED_PATH_CONSTRAINT;
}
PKIX_CHECK(pkix_hash
((const unsigned char *)&hashInput,
sizeof (hashInput),
&cbcHash,
plContext),
PKIX_HASHFAILED);
*pHashcode = cbcHash;
cleanup:
PKIX_RETURN(CERTBASICCONSTRAINTS);
}