Пример #1
0
/*
 * 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
0
/*
 * 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
0
/*
 * 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
0
/*
 * 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
0
/*
 * 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
0
/*
 * 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);
}
/*
 * 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
0
/*
 * 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);
}
/*
 * 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
0
/*
 * FUNCTION: pkix_pl_NssContext_GetCertUsage
 * DESCRIPTION:
 *
 *  This function obtains the platform-dependent SECCertificateUsage  parameter
 *  from the context object pointed to by "nssContext", storing the result at
 *  "pCertUsage".
 *
 * PARAMETERS:
 *  "nssContext"
 *      The address of the context object whose wincx parameter is to be
 *      obtained. Must be non-NULL.
 *  "pCertUsage"
 *      The address where the result is stored. Must be non-NULL.
 * 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.
 */
PKIX_Error *
pkix_pl_NssContext_GetCertUsage(
        PKIX_PL_NssContext *nssContext,
        SECCertificateUsage *pCertUsage)
{
        void *plContext = NULL;

        PKIX_ENTER(CONTEXT, "pkix_pl_NssContext_GetCertUsage");
        PKIX_NULLCHECK_TWO(nssContext, pCertUsage);

        *pCertUsage = nssContext->certificateUsage;

        PKIX_RETURN(CONTEXT);
}
/*
 * 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);
}
/*
 * 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);
}
/*
 * 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);
}
/*
 * 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);
}
/*
 * 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);
}
/*
 * 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);
}
/*
 * FUNCTION: pkix_pl_HttpCertStore_CreateRequestSession
 * DESCRIPTION:
 *
 *  This function takes elements from the HttpCertStoreContext pointed to by
 *  "context" (path, client, and serverSession) and creates a RequestSession.
 *  See the HTTPClient API described in ocspt.h for further details.
 *
 * PARAMETERS:
 *  "context"
 *      The address of the HttpCertStoreContext. 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 HttpCertStore 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_HttpCertStore_CreateRequestSession(
        PKIX_PL_HttpCertStoreContext *context,
        void *plContext)
{
        const SEC_HttpClientFcnV1 *hcv1 = NULL;
        SECStatus rv = SECFailure;
        char *pathString = NULL;

        PKIX_ENTER
                (HTTPCERTSTORECONTEXT,
                "pkix_pl_HttpCertStore_CreateRequestSession");
        PKIX_NULLCHECK_TWO(context, context->serverSession);

        pathString = PR_smprintf("%s", context->path);

        if (context->client->version == 1) {
                hcv1 = &(context->client->fcnTable.ftable1);

                if (context->requestSession != NULL) {
                        PKIX_PL_NSSCALL(HTTPCERTSTORECONTEXT, hcv1->freeFcn,
                                (context->requestSession));
                        context->requestSession = 0;
                }

                PKIX_PL_NSSCALLRV
                        (HTTPCERTSTORECONTEXT, rv, hcv1->createFcn,
                        (context->serverSession,
                        "http",
                        pathString,
                        "GET",
                        PR_TicksPerSecond() * 60,
                        &(context->requestSession)));

                if (rv != SECSuccess) {
                        if (pathString != NULL) {
                                PORT_Free(pathString);
                        }
                        PKIX_ERROR(PKIX_HTTPSERVERERROR);
                }
        } else {
                PKIX_ERROR(PKIX_UNSUPPORTEDVERSIONOFHTTPCLIENT);
        }

cleanup:

        PKIX_RETURN(HTTPCERTSTORECONTEXT);

}
/*
 * FUNCTION: PKIX_ComCertSelParams_GetCertificate
 * (see comments in pkix_certsel.h)
 */
PKIX_Error *
PKIX_ComCertSelParams_GetCertificate(
        PKIX_ComCertSelParams *params,
        PKIX_PL_Cert **pCert,
        void *plContext)
{
        PKIX_ENTER(COMCERTSELPARAMS, "PKIX_ComCertSelParams_GetCertificate");
        PKIX_NULLCHECK_TWO(params, pCert);

        PKIX_INCREF(params->cert);
        *pCert = params->cert;

cleanup:
        PKIX_RETURN(COMCERTSELPARAMS);
}
Пример #19
0
/*
 * FUNCTION: PKIX_ProcessingParams_IsNISTRevocationPolicyEnabled
 * (see comments in pkix_params.h)
 */
PKIX_Error *
PKIX_ProcessingParams_IsNISTRevocationPolicyEnabled(
        PKIX_ProcessingParams *params,
        PKIX_Boolean *pEnabled,
        void *plContext)
{

        PKIX_ENTER(PROCESSINGPARAMS,
                    "PKIX_ProcessingParams_IsNISTRevocationPolicyEnabled");
        PKIX_NULLCHECK_TWO(params, pEnabled);

        *pEnabled = params->isCrlRevocationCheckingEnabledWithNISTPolicy;

        PKIX_RETURN(PROCESSINGPARAMS);
}
Пример #20
0
/*
 * FUNCTION: PKIX_ValidateResult_GetTrustAnchor
 *      (see comments in pkix_result.h)
 */
PKIX_Error *
PKIX_ValidateResult_GetTrustAnchor(
        PKIX_ValidateResult *result,
        PKIX_TrustAnchor **pTrustAnchor,
        void *plContext)
{
        PKIX_ENTER(VALIDATERESULT, "PKIX_ValidateResult_GetTrustAnchor");
        PKIX_NULLCHECK_TWO(result, pTrustAnchor);

        PKIX_INCREF(result->anchor);
        *pTrustAnchor = result->anchor;

cleanup:
        PKIX_RETURN(VALIDATERESULT);
}
/*
 * FUNCTION: PKIX_ComCertSelParams_GetPolicy (see comments in pkix_certsel.h)
 */
PKIX_Error *
PKIX_ComCertSelParams_GetPolicy(
        PKIX_ComCertSelParams *params,
        PKIX_List **pPolicy, /* List of PKIX_PL_OID */
        void *plContext)
{
        PKIX_ENTER(COMCERTSELPARAMS, "PKIX_ComCertSelParams_GetPolicy");
        PKIX_NULLCHECK_TWO(params, pPolicy);

        PKIX_INCREF(params->policies);
        *pPolicy = params->policies;

cleanup:
        PKIX_RETURN(COMCERTSELPARAMS);
}
Пример #22
0
/*
 * FUNCTION: PKIX_ValidateResult_GetPolicyTree
 *      (see comments in pkix_result.h)
 */
PKIX_Error *
PKIX_ValidateResult_GetPolicyTree(
        PKIX_ValidateResult *result,
        PKIX_PolicyNode **pPolicyTree,
        void *plContext)
{
        PKIX_ENTER(VALIDATERESULT, "PKIX_ValidateResult_GetPolicyTree");
        PKIX_NULLCHECK_TWO(result, pPolicyTree);

        PKIX_INCREF(result->policyTree);
        (*pPolicyTree) = result->policyTree;

cleanup:
        PKIX_RETURN(VALIDATERESULT);
}
Пример #23
0
/*
 * FUNCTION: PKIX_Logger_GetLoggerContext (see comments in pkix_util.h)
 */
PKIX_Error *
PKIX_Logger_GetLoggerContext(
        PKIX_Logger *logger,
        PKIX_PL_Object **pLoggerContext,
        void *plContext)
{
        PKIX_ENTER(LOGGER, "PKIX_Logger_GetLoggerContex");
        PKIX_NULLCHECK_TWO(logger, pLoggerContext);

        PKIX_INCREF(logger->context);
        *pLoggerContext = logger->context;

cleanup:
        PKIX_RETURN(LOGGER);
}
/*
 * FUNCTION: PKIX_ComCertSelParams_GetSerialNumber
 * (see comments in pkix_certsel.h)
 */
PKIX_Error *
PKIX_ComCertSelParams_GetSerialNumber(
        PKIX_ComCertSelParams *params,
        PKIX_PL_BigInt **pSerialNumber,
        void *plContext)
{
        PKIX_ENTER(COMCERTSELPARAMS, "PKIX_ComCertSelParams_GetSerialNumber");
        PKIX_NULLCHECK_TWO(params, pSerialNumber);

        PKIX_INCREF(params->serialNumber);
        *pSerialNumber = params->serialNumber;

cleanup:
        PKIX_RETURN(COMCERTSELPARAMS);
}
Пример #25
0
/*
 * FUNCTION: PKIX_ProcessingParams_GetDate (see comments in pkix_params.h)
 */
PKIX_Error *
PKIX_ProcessingParams_GetDate(
        PKIX_ProcessingParams *params,
        PKIX_PL_Date **pDate,
        void *plContext)
{
        PKIX_ENTER(PROCESSINGPARAMS, "PKIX_ProcessingParams_GetDate");
        PKIX_NULLCHECK_TWO(params, pDate);

        PKIX_INCREF(params->date);
        *pDate = params->date;

cleanup:
        PKIX_RETURN(PROCESSINGPARAMS);
}
Пример #26
0
/*
 * FUNCTION: PKIX_ProcessingParams_GetPolicyQualifiersRejected
 *      (see comments in pkix_params.h)
 */
PKIX_Error *
PKIX_ProcessingParams_GetPolicyQualifiersRejected(
        PKIX_ProcessingParams *params,
        PKIX_Boolean *pRejected,
        void *plContext)
{
        PKIX_ENTER(PROCESSINGPARAMS,
                "PKIX_ProcessingParams_GetPolicyQualifiersRejected");

        PKIX_NULLCHECK_TWO(params, pRejected);

        *pRejected = params->qualifiersRejected;

        PKIX_RETURN(PROCESSINGPARAMS);
}
/*
 * FUNCTION: PKIX_ComCertSelParams_GetIssuer
 * (see comments in pkix_certsel.h)
 */
PKIX_Error *
PKIX_ComCertSelParams_GetIssuer(
        PKIX_ComCertSelParams *params,
        PKIX_PL_X500Name **pIssuer,
        void *plContext)
{
        PKIX_ENTER(COMCERTSELPARAMS, "PKIX_ComCertSelParams_GetIssuer");
        PKIX_NULLCHECK_TWO(params, pIssuer);

        PKIX_INCREF(params->issuer);
        *pIssuer = params->issuer;

cleanup:
        PKIX_RETURN(COMCERTSELPARAMS);
}
Пример #28
0
/*
 * FUNCTION: PKIX_ProcessingParams_IsExplicitPolicyRequired
 * (see comments in pkix_params.h)
 */
PKIX_Error *
PKIX_ProcessingParams_IsExplicitPolicyRequired(
        PKIX_ProcessingParams *params,
        PKIX_Boolean *pRequired,
        void *plContext)
{
        PKIX_ENTER(PROCESSINGPARAMS,
                "PKIX_ProcessingParams_IsExplicitPolicyRequired");

        PKIX_NULLCHECK_TWO(params, pRequired);

        *pRequired = params->initialExplicitPolicy;

        PKIX_RETURN(PROCESSINGPARAMS);
}
Пример #29
0
/*
 * FUNCTION: pkix_Error_Hashcode
 * (see comments for PKIX_PL_HashcodeCallback in pkix_pl_system.h)
 */
static PKIX_Error *
pkix_Error_Hashcode(
        PKIX_PL_Object *object,
        PKIX_UInt32 *pResult,
        void *plContext)
{
        PKIX_ENTER(ERROR, "pkix_Error_Hashcode");
        PKIX_NULLCHECK_TWO(object, pResult);

        /* XXX Unimplemented */
        /* XXX Need to make hashcodes equal when two errors are equal */
        *pResult = (PKIX_UInt32)object;

        PKIX_RETURN(ERROR);
}
Пример #30
0
/*
 * FUNCTION: PKIX_ProcessingParams_IsPolicyMappingInhibited
 * (see comments in pkix_params.h)
 */
PKIX_Error *
PKIX_ProcessingParams_IsPolicyMappingInhibited(
        PKIX_ProcessingParams *params,
        PKIX_Boolean *pInhibited,
        void *plContext)
{
        PKIX_ENTER(PROCESSINGPARAMS,
                "PKIX_ProcessingParams_IsPolicyMappingInhibited");

        PKIX_NULLCHECK_TWO(params, pInhibited);

        *pInhibited = params->initialPolicyMappingInhibit;

        PKIX_RETURN(PROCESSINGPARAMS);
}