• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pkix_CheckType函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pkix_CheckType函数的典型用法代码示例。如果您正苦于以下问题:C++ pkix_CheckType函数的具体用法?C++ pkix_CheckType怎么用?C++ pkix_CheckType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pkix_CheckType函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:rsdoiel,项目名称:Jaxer,代码行数:34,代码来源:pkix_ocspchecker.c


示例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, &copy, plContext),
                PKIX_VERIFYNODEDUPLICATEHELPERFAILED);

        *pNewObject = (PKIX_PL_Object *)copy;

cleanup:

        PKIX_RETURN(VERIFYNODE);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:33,代码来源:pkix_verifynode.c


示例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);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:30,代码来源:pkix_verifynode.c


示例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);
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:30,代码来源:pkix_pl_crl.c


示例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);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:30,代码来源:pkix_resourcelimits.c


示例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);
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:37,代码来源:pkix_pl_certpolicyqualifier.c


示例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);
}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:30,代码来源:pkix_pl_oid.c


示例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);
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:35,代码来源:pkix_pl_date.c


示例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);

}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:35,代码来源:pkix_pl_date.c


示例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);
}
开发者ID:AOSC-Dev,项目名称:nss-purified,代码行数:32,代码来源:pkix_store.c


示例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);
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:37,代码来源:pkix_policynode.c


示例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);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:37,代码来源:pkix_pl_date.c


示例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);
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:33,代码来源:pkix_pl_generalname.c


示例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);
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:39,代码来源:pkix_pl_httpcertstore.c


示例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);
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.external,代码行数:33,代码来源:pkix_pl_aiamgr.c


示例16: pkix_pl_Date_Equals

/*
 * FUNCTION: pkix_pl_Date_Equals
 * (see comments for PKIX_PL_Equals_Callback in pkix_pl_system.h)
 */
static PKIX_Error *
pkix_pl_Date_Equals(
        PKIX_PL_Object *firstObject,
        PKIX_PL_Object *secondObject,
        PKIX_Boolean *pResult,
        void *plContext)
{
        PKIX_ENTER(DATE, "pkix_pl_Date_Equals");
        PKIX_NULLCHECK_THREE(firstObject, secondObject, pResult);

        /* test that firstObject is a Date */
        PKIX_CHECK(pkix_CheckType(firstObject, PKIX_DATE_TYPE, plContext),
                PKIX_FIRSTOBJECTNOTDATE);

        /*
         * Since we know firstObject is a Date, if both references are
         * identical, they must be equal
         */
        if (firstObject == secondObject){
                *pResult = PKIX_TRUE;
                goto cleanup;
        }

        *pResult = PKIX_FALSE;
        pkixErrorResult =
            pkix_pl_Date_Comparator(firstObject, secondObject,
                                    pResult, plContext);
        if (pkixErrorResult) {
            PKIX_DECREF(pkixErrorResult);
        }
            
cleanup:

        PKIX_RETURN(DATE);
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:39,代码来源:pkix_pl_date.c


示例17: pkix_pl_CertPolicyMap_Duplicate

/*
 * FUNCTION: pkix_pl_CertPolicyMap_Duplicate
 * (see comments for PKIX_PL_Duplicate_Callback in pkix_pl_system.h)
 */
static PKIX_Error *
pkix_pl_CertPolicyMap_Duplicate(
        PKIX_PL_Object *object,
        PKIX_PL_Object **pNewObject,
        void *plContext)
{
        PKIX_PL_CertPolicyMap *original = NULL;
        PKIX_PL_CertPolicyMap *copy = NULL;

        PKIX_ENTER(CERTPOLICYMAP, "pkix_pl_CertPolicyMap_Duplicate");

        PKIX_NULLCHECK_TWO(object, pNewObject);

        PKIX_CHECK(pkix_CheckType
                (object, PKIX_CERTPOLICYMAP_TYPE, plContext),
                PKIX_OBJECTARGUMENTNOTPOLICYMAP);

        original = (PKIX_PL_CertPolicyMap *)object;

        PKIX_CHECK(pkix_pl_CertPolicyMap_Create
                (original->issuerDomainPolicy,
                original->subjectDomainPolicy,
                &copy,
                plContext),
                PKIX_CERTPOLICYMAPCREATEFAILED);

        *pNewObject = (PKIX_PL_Object *)copy;

cleanup:

        PKIX_RETURN(CERTPOLICYMAP);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:36,代码来源:pkix_pl_certpolicymap.c


示例18: pkix_Logger_Destroy

/*
 * FUNCTION: pkix_Logger_Destroy
 * (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
 */
static PKIX_Error *
pkix_Logger_Destroy(
        PKIX_PL_Object *object,
        void *plContext)
{
        PKIX_Logger *logger = NULL;

        PKIX_ENTER(LOGGER, "pkix_Logger_Destroy");
        PKIX_NULLCHECK_ONE(object);

        /* Check that this object is a logger */
        PKIX_CHECK(pkix_CheckType(object, PKIX_LOGGER_TYPE, plContext),
                    PKIX_OBJECTNOTLOGGER);

        logger = (PKIX_Logger *)object;

        /* We have a valid logger. DecRef its item and recurse on next */

        logger->callback = NULL;
        PKIX_DECREF(logger->context);
        logger->logComponent = (PKIX_ERRORCLASS)NULL;

cleanup:

        PKIX_RETURN(LOGGER);
}
开发者ID:Crawping,项目名称:chromium_extract,代码行数:30,代码来源:pkix_logger.c


示例19: pkix_List_Destroy

/*
 * FUNCTION: pkix_List_Destroy
 * (see comments for PKIX_PL_DestructorCallback in pkix_pl_system.h)
 */
static PKIX_Error *
pkix_List_Destroy(
        PKIX_PL_Object *object,
        void *plContext)
{
        PKIX_List *list = NULL;
        PKIX_List *nextItem = NULL;

        PKIX_ENTER(LIST, "pkix_List_Destroy");
        PKIX_NULLCHECK_ONE(object);

        /* Check that this object is a list */
        PKIX_CHECK(pkix_CheckType(object, PKIX_LIST_TYPE, plContext),
                    PKIX_OBJECTNOTLIST);

        list = (PKIX_List *)object;

        /* We have a valid list. DecRef its item and recurse on next */
        PKIX_DECREF(list->item);
        while ((nextItem = list->next) != NULL) {
            list->next = nextItem->next;
            nextItem->next = NULL;
            PKIX_DECREF(nextItem);
        }      
        list->immutable = PKIX_FALSE;
        list->length = 0;
        list->isHeader = PKIX_FALSE;

cleanup:

        PKIX_RETURN(LIST);
}
开发者ID:AOSC-Dev,项目名称:nss-purified,代码行数:36,代码来源:pkix_list.c


示例20: pkix_Logger_Hashcode

/*
 * FUNCTION: pkix_Logger_Hashcode
 * (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
 */
static PKIX_Error *
pkix_Logger_Hashcode(
        PKIX_PL_Object *object,
        PKIX_UInt32 *pHashcode,
        void *plContext)
{
        PKIX_Logger *logger = NULL;
        PKIX_UInt32 hash = 0;
        PKIX_UInt32 tempHash = 0;

        PKIX_ENTER(LOGGER, "pkix_Logger_Hashcode");
        PKIX_NULLCHECK_TWO(object, pHashcode);

        PKIX_CHECK(pkix_CheckType(object, PKIX_LOGGER_TYPE, plContext),
                    PKIX_OBJECTNOTLOGGER);

        logger = (PKIX_Logger *)object;

        PKIX_HASHCODE(logger->context, &tempHash, plContext,
                PKIX_OBJECTHASHCODEFAILED);

        hash = (((((PKIX_UInt32)((char *)logger->callback - (char *)NULL) + tempHash) << 7) +
                logger->maxLevel) << 7) + (PKIX_UInt32)logger->logComponent;

        *pHashcode = hash;

cleanup:

        PKIX_RETURN(LOGGER);
}
开发者ID:Crawping,项目名称:chromium_extract,代码行数:34,代码来源:pkix_logger.c



注:本文中的pkix_CheckType函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pkt函数代码示例发布时间:2022-05-30
下一篇:
C++ pkgdb_open函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap