本文整理汇总了C++中pkix_CheckType函数的典型用法代码示例。如果您正苦于以下问题:C++ pkix_CheckType函数的具体用法?C++ pkix_CheckType怎么用?C++ pkix_CheckType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pkix_CheckType函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pkix_OcspChecker_Destroy
/*
* FUNCTION: pkix_OcspChecker_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_OcspChecker_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
PKIX_OcspChecker *checker = NULL;
PKIX_ENTER(OCSPCHECKER, "pkix_OcspChecker_Destroy");
PKIX_NULLCHECK_ONE(object);
/* Check that this object is a ocsp checker */
PKIX_CHECK(pkix_CheckType
(object, PKIX_OCSPCHECKER_TYPE, plContext),
PKIX_OBJECTNOTOCSPCHECKER);
checker = (PKIX_OcspChecker *)object;
PKIX_DECREF(checker->response);
PKIX_DECREF(checker->validityTime);
PKIX_DECREF(checker->cert);
/* These are not yet ref-counted objects */
/* PKIX_DECREF(checker->passwordInfo); */
/* PKIX_DECREF(checker->responder); */
/* PKIX_DECREF(checker->nbioContext); */
cleanup:
PKIX_RETURN(OCSPCHECKER);
}
示例2: pkix_VerifyNode_Duplicate
/*
* FUNCTION: pkix_VerifyNode_Duplicate
* (see comments for PKIX_PL_Duplicate_Callback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_VerifyNode_Duplicate(
PKIX_PL_Object *object,
PKIX_PL_Object **pNewObject,
void *plContext)
{
PKIX_VerifyNode *original = NULL;
PKIX_VerifyNode *copy = NULL;
PKIX_ENTER(VERIFYNODE, "pkix_VerifyNode_Duplicate");
PKIX_NULLCHECK_TWO(object, pNewObject);
PKIX_CHECK(pkix_CheckType
(object, PKIX_VERIFYNODE_TYPE, plContext),
PKIX_OBJECTNOTVERIFYNODE);
original = (PKIX_VerifyNode *)object;
PKIX_CHECK(pkix_VerifyNode_DuplicateHelper
(original, NULL, ©, plContext),
PKIX_VERIFYNODEDUPLICATEHELPERFAILED);
*pNewObject = (PKIX_PL_Object *)copy;
cleanup:
PKIX_RETURN(VERIFYNODE);
}
示例3: pkix_VerifyNode_Destroy
/*
* FUNCTION: pkix_VerifyNode_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_VerifyNode_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
PKIX_VerifyNode *node = NULL;
PKIX_ENTER(VERIFYNODE, "pkix_VerifyNode_Destroy");
PKIX_NULLCHECK_ONE(object);
PKIX_CHECK(pkix_CheckType(object, PKIX_VERIFYNODE_TYPE, plContext),
PKIX_OBJECTNOTVERIFYNODE);
node = (PKIX_VerifyNode*)object;
PKIX_DECREF(node->verifyCert);
PKIX_DECREF(node->children);
PKIX_DECREF(node->error);
node->depth = 0;
cleanup:
PKIX_RETURN(VERIFYNODE);
}
示例4: pkix_pl_CRL_ToString
/*
* FUNCTION: pkix_pl_CRL_ToString
* (see comments for PKIX_PL_ToStringCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_CRL_ToString(
PKIX_PL_Object *object,
PKIX_PL_String **pString,
void *plContext)
{
PKIX_PL_String *crlString = NULL;
PKIX_PL_CRL *crl = NULL;
PKIX_ENTER(CRL, "pkix_pl_CRL_ToString");
PKIX_NULLCHECK_TWO(object, pString);
PKIX_CHECK(pkix_CheckType(object, PKIX_CRL_TYPE, plContext),
PKIX_OBJECTNOTCRL);
crl = (PKIX_PL_CRL *) object;
PKIX_CHECK(pkix_pl_CRL_ToString_Helper(crl, &crlString, plContext),
PKIX_CRLTOSTRINGHELPERFAILED);
*pString = crlString;
cleanup:
PKIX_RETURN(CRL);
}
示例5: pkix_ResourceLimits_Destroy
/*
* FUNCTION: pkix_ResourceLimits_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_ResourceLimits_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
PKIX_ResourceLimits *rLimits = NULL;
PKIX_ENTER(RESOURCELIMITS, "pkix_ResourceLimits_Destroy");
PKIX_NULLCHECK_ONE(object);
/* Check that this object is a ResourceLimits object */
PKIX_CHECK(pkix_CheckType(object, PKIX_RESOURCELIMITS_TYPE, plContext),
PKIX_OBJECTNOTRESOURCELIMITS);
rLimits = (PKIX_ResourceLimits *)object;
rLimits->maxTime = 0;
rLimits->maxFanout = 0;
rLimits->maxDepth = 0;
rLimits->maxCertsNumber = 0;
rLimits->maxCrlsNumber = 0;
cleanup:
PKIX_RETURN(RESOURCELIMITS);
}
示例6: pkix_pl_CertPolicyQualifier_Hashcode
/*
* FUNCTION: pkix_pl_CertPolicyQualifier_Hashcode
* (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_CertPolicyQualifier_Hashcode(
PKIX_PL_Object *object,
PKIX_UInt32 *pHashcode,
void *plContext)
{
PKIX_PL_CertPolicyQualifier *certPQ = NULL;
PKIX_UInt32 cpidHash = 0;
PKIX_UInt32 cpqHash = 0;
PKIX_ENTER(CERTPOLICYQUALIFIER, "pkix_pl_CertPolicyQualifier_Hashcode");
PKIX_NULLCHECK_TWO(object, pHashcode);
PKIX_CHECK(pkix_CheckType
(object, PKIX_CERTPOLICYQUALIFIER_TYPE, plContext),
PKIX_OBJECTNOTCERTPOLICYQUALIFIER);
certPQ = (PKIX_PL_CertPolicyQualifier *)object;
PKIX_NULLCHECK_TWO(certPQ->policyQualifierId, certPQ->qualifier);
PKIX_HASHCODE(certPQ->policyQualifierId, &cpidHash, plContext,
PKIX_ERRORINOIDHASHCODE);
PKIX_HASHCODE(certPQ->qualifier, &cpqHash, plContext,
PKIX_ERRORINBYTEARRAYHASHCODE);
*pHashcode = cpidHash*31 + cpqHash;
cleanup:
PKIX_RETURN(CERTPOLICYQUALIFIER);
}
示例7: pkix_pl_OID_Hashcode
/*
* FUNCTION: pkix_pl_OID_Hashcode
* (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_OID_Hashcode(
PKIX_PL_Object *object,
PKIX_UInt32 *pHashcode,
void *plContext)
{
PKIX_PL_OID *oid = NULL;
PKIX_ENTER(OID, "pkix_pl_OID_HashCode");
PKIX_NULLCHECK_TWO(object, pHashcode);
PKIX_CHECK(pkix_CheckType(object, PKIX_OID_TYPE, plContext),
PKIX_OBJECTNOTANOID);
oid = (PKIX_PL_OID *)object;
PKIX_CHECK(pkix_hash
((unsigned char *)oid->derOid.data,
oid->derOid.len * sizeof (char),
pHashcode,
plContext),
PKIX_HASHFAILED);
cleanup:
PKIX_RETURN(OID);
}
示例8: pkix_pl_Date_ToString
/*
* FUNCTION: pkix_pl_Date_ToString
* (see comments for PKIX_PL_ToStringCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_Date_ToString(
PKIX_PL_Object *object,
PKIX_PL_String **pString,
void *plContext)
{
PKIX_PL_Date *date = NULL;
SECItem nssTime = {siBuffer, NULL, 0};
SECStatus rv;
PKIX_ENTER(DATE, "pkix_pl_Date_toString");
PKIX_NULLCHECK_TWO(object, pString);
PKIX_CHECK(pkix_CheckType(object, PKIX_DATE_TYPE, plContext),
PKIX_OBJECTNOTDATE);
date = (PKIX_PL_Date *)object;
rv = DER_EncodeTimeChoice(NULL, &nssTime, date->nssTime);
if (rv == SECFailure) {
PKIX_ERROR(PKIX_DERENCODETIMECHOICEFAILED);
}
PKIX_CHECK(pkix_pl_Date_ToString_Helper
(&nssTime, pString, plContext),
PKIX_DATETOSTRINGHELPERFAILED);
cleanup:
if (nssTime.data) {
SECITEM_FreeItem(&nssTime, PR_FALSE);
}
PKIX_RETURN(DATE);
}
示例9: pkix_pl_Date_Hashcode
/*
* FUNCTION: pkix_pl_Date_Hashcode
* (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_Date_Hashcode(
PKIX_PL_Object *object,
PKIX_UInt32 *pHashcode,
void *plContext)
{
PKIX_PL_Date *date = NULL;
PKIX_UInt32 dateHash;
PKIX_ENTER(DATE, "pkix_pl_Date_Hashcode");
PKIX_NULLCHECK_TWO(object, pHashcode);
PKIX_CHECK(pkix_CheckType(object, PKIX_DATE_TYPE, plContext),
PKIX_OBJECTNOTDATE);
date = (PKIX_PL_Date *)object;
PKIX_CHECK(pkix_hash
((const unsigned char *)&date->nssTime,
sizeof(date->nssTime),
&dateHash,
plContext),
PKIX_HASHFAILED);
*pHashcode = dateHash;
cleanup:
PKIX_RETURN(DATE);
}
示例10: pkix_CertStore_Destroy
/*
* FUNCTION: pkix_CertStore_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_CertStore_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
PKIX_CertStore *certStore = NULL;
PKIX_ENTER(CERTSTORE, "pkix_CertStore_Destroy");
PKIX_NULLCHECK_ONE(object);
/* Check that this object is a CertStore object */
PKIX_CHECK(pkix_CheckType(object, PKIX_CERTSTORE_TYPE, plContext),
PKIX_OBJECTNOTCERTSTORE);
certStore = (PKIX_CertStore *)object;
certStore->certCallback = NULL;
certStore->crlCallback = NULL;
certStore->certContinue = NULL;
certStore->crlContinue = NULL;
certStore->trustCallback = NULL;
PKIX_DECREF(certStore->certStoreContext);
cleanup:
PKIX_RETURN(CERTSTORE);
}
示例11: pkix_PolicyNode_Destroy
/*
* FUNCTION: pkix_PolicyNode_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_PolicyNode_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
PKIX_PolicyNode *node = NULL;
PKIX_ENTER(CERTPOLICYNODE, "pkix_PolicyNode_Destroy");
PKIX_NULLCHECK_ONE(object);
PKIX_CHECK(pkix_CheckType(object, PKIX_CERTPOLICYNODE_TYPE, plContext),
PKIX_OBJECTNOTPOLICYNODE);
node = (PKIX_PolicyNode*)object;
node->criticality = PKIX_FALSE;
PKIX_DECREF(node->validPolicy);
PKIX_DECREF(node->qualifierSet);
PKIX_DECREF(node->expectedPolicySet);
PKIX_DECREF(node->children);
/*
* Note: the link to parent is not reference-counted. See comment
* in pkix_PolicyNode_AddToParent for more details.
*/
node->parent = NULL;
node->depth = 0;
cleanup:
PKIX_RETURN(CERTPOLICYNODE);
}
示例12: pkix_pl_Date_ToString
/*
* FUNCTION: pkix_pl_Date_ToString
* (see comments for PKIX_PL_ToStringCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_Date_ToString(
PKIX_PL_Object *object,
PKIX_PL_String **pString,
void *plContext)
{
PKIX_PL_String *dateString = NULL;
PKIX_PL_Date *date = NULL;
SECItem *nssTime = NULL;
char *asciiDate = NULL;
PKIX_ENTER(DATE, "pkix_pl_Date_toString");
PKIX_NULLCHECK_TWO(object, pString);
PKIX_CHECK(pkix_CheckType(object, PKIX_DATE_TYPE, plContext),
PKIX_OBJECTNOTDATE);
date = (PKIX_PL_Date *)object;
nssTime = &date->nssTime;
PKIX_CHECK(pkix_pl_Date_ToString_Helper
(nssTime, &dateString, plContext),
PKIX_DATETOSTRINGHELPERFAILED);
*pString = dateString;
cleanup:
PKIX_FREE(asciiDate);
PKIX_RETURN(DATE);
}
示例13: pkix_pl_GeneralName_ToString
/*
* FUNCTION: pkix_pl_GeneralName_ToString
* (see comments for PKIX_PL_ToStringCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_GeneralName_ToString(
PKIX_PL_Object *object,
PKIX_PL_String **pString,
void *plContext)
{
PKIX_PL_String *nameString = NULL;
PKIX_PL_GeneralName *name = NULL;
PKIX_ENTER(GENERALNAME, "pkix_pl_GeneralName_toString");
PKIX_NULLCHECK_TWO(object, pString);
PKIX_CHECK(pkix_CheckType(object, PKIX_GENERALNAME_TYPE, plContext),
PKIX_OBJECTNOTGENERALNAME);
name = (PKIX_PL_GeneralName *)object;
PKIX_CHECK(pkix_pl_GeneralName_ToString_Helper
(name, &nameString, plContext),
PKIX_GENERALNAMETOSTRINGHELPERFAILED);
*pString = nameString;
cleanup:
PKIX_RETURN(GENERALNAME);
}
示例14: pkix_pl_HttpCertStoreContext_Destroy
/*
* FUNCTION: pkix_pl_HttpCertStoreContext_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
*/
static PKIX_Error *
pkix_pl_HttpCertStoreContext_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
const SEC_HttpClientFcnV1 *hcv1 = NULL;
PKIX_PL_HttpCertStoreContext *context = NULL;
PKIX_ENTER
(HTTPCERTSTORECONTEXT, "pkix_pl_HttpCertStoreContext_Destroy");
PKIX_NULLCHECK_ONE(object);
PKIX_CHECK(pkix_CheckType
(object, PKIX_HTTPCERTSTORECONTEXT_TYPE, plContext),
PKIX_OBJECTNOTANHTTPCERTSTORECONTEXT);
context = (PKIX_PL_HttpCertStoreContext *)object;
hcv1 = (const SEC_HttpClientFcnV1 *)(context->client);
if (context->requestSession != NULL) {
(*hcv1->freeFcn)(context->requestSession);
context->requestSession = NULL;
}
if (context->serverSession != NULL) {
(*hcv1->freeSessionFcn)(context->serverSession);
context->serverSession = NULL;
}
if (context->path != NULL) {
PORT_Free(context->path);
context->path = NULL;
}
cleanup:
PKIX_RETURN(HTTPCERTSTORECONTEXT);
}
示例15: pkix_pl_AIAMgr_Destroy
/*
* FUNCTION: pkix_pl_AIAMgr_Destroy
* (see comments for PKIX_PL_DestructorCallback in pkix_pl_pki.h)
*/
static PKIX_Error *
pkix_pl_AIAMgr_Destroy(
PKIX_PL_Object *object,
void *plContext)
{
PKIX_PL_AIAMgr *aiaMgr = NULL;
PKIX_ENTER(AIAMGR, "pkix_pl_AIAMgr_Destroy");
PKIX_NULLCHECK_ONE(object);
PKIX_CHECK(pkix_CheckType(object, PKIX_AIAMGR_TYPE, plContext),
PKIX_OBJECTNOTAIAMGR);
aiaMgr = (PKIX_PL_AIAMgr *)object;
/* pointer to cert cache */
/* pointer to crl cache */
aiaMgr->method = 0;
aiaMgr->aiaIndex = 0;
aiaMgr->numAias = 0;
PKIX_DECREF(aiaMgr->aia);
PKIX_DECREF(aiaMgr->location);
PKIX_DECREF(aiaMgr->results);
PKIX_DECREF(aiaMgr->client.ldapClient);
cleanup:
PKIX_RETURN(AIAMGR);
}