CACDefaultScoring.cpp File Reference


Detailed Description

Subsystem: Certification Path Processing (PKIFPATH)

Module: CPKIFDefaultScoring

Id
CACDefaultScoring.cpp 10602 2009-09-28 19:04:37Z cwallace

Definition in file CACDefaultScoring.cpp.

#include "PKIFDefaultScoring.h"
#include "ToolkitUtils.h"
#include "PKIFCryptUtils.h"
#include "components.h"
#include "GottaMatch.h"
#include "IPKIFCryptoRaw.h"
#include "IPKIFTrustCache.h"
#include "PKIFNameAndKeyWithScore.h"
#include "BasicConstraintsViolation.h"
#include "Certificate.h"
#include "PKIFCertificateNodeEntry.h"
#include "GeneralName.h"
#include "Name.h"
#include "Buffer.h"
#include "SubjectPublicKeyInfo.h"
#include "Validity.h"
#include "PolicyInformation.h"
#include "CertificateNodeListWithSourceInfo.h"
#include "PKIFTime.h"
#include "OID.h"
#include "AuthorityKeyIdentifier.h"
#include "SubjectKeyIdentifier.h"
#include "PolicyInformationSet.h"
#include "PolicyMappings.h"
#include "PolicyMapping.h"
#include "PKIFTrustRoot.h"
#include "PKIFPathSettings.h"
#include "BasicConstraints.h"
#include "KeyUsage.h"
#include <vector>
#include <cstring>

Include dependency graph for CACDefaultScoring.cpp:

Go to the source code of this file.

Defines

#define ISSUED_BY_TRUST_ROOT   5000
#define ISSUED_BY_CERT_IN_CACHE   500
#define BASIC_CONSTRAINTS_PRESENT_AND_SET   75
#define VAL_PERIOD_OK   75
#define ALGS_MATCH   100
#define KEY_IDS_MATCH   6000
#define NOT_SELF_ISSUED   50
#define NOT_SELF_SIGNED   50
#define HAS_AT_ONE_POLICY   25
#define MATCH_POLICY_WITH_PREV_CERT   25
#define MATCH_POLICY_WITH_SETTINGS   25

Functions

bool scoreCompare (const CPKIFCertificateNodeEntryPtr &lhs, const CPKIFCertificateNodeEntryPtr &rhs)
bool scoreCompareNK (const CPKIFNameAndKeyWithScorePtr &lhs, const CPKIFNameAndKeyWithScorePtr &rhs)
bool KeyIDsMatch (CPKIFAuthorityKeyIdentifierPtr &akid, CPKIFCertificatePtr &curCert)
bool KeyIDsMatch (CPKIFAuthorityKeyIdentifierPtr &akid, const IPKIFTrustAnchorPtr &curTA)
bool SomeMatch (CPKIFPolicyInformationSetPtr &fromCert, CPKIFPolicyInformationListPtr &polsFromPrevCert, CPKIFPolicyMappingsPtr &policyMappings)
bool SomeMatch (CPKIFPolicyInformationSetPtr &fromCert, CPKIFPolicyInformationSetPtr &fromPrevCert, CPKIFPolicyMappingsPtr &policyMappings)


Define Documentation

#define ALGS_MATCH   100

Definition at line 79 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define BASIC_CONSTRAINTS_PRESENT_AND_SET   75

#define HAS_AT_ONE_POLICY   25

Definition at line 85 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define ISSUED_BY_CERT_IN_CACHE   500

Definition at line 76 of file CACDefaultScoring.cpp.

#define ISSUED_BY_TRUST_ROOT   5000

Definition at line 75 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define KEY_IDS_MATCH   6000

Definition at line 80 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define MATCH_POLICY_WITH_PREV_CERT   25

Definition at line 86 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define MATCH_POLICY_WITH_SETTINGS   25

Definition at line 87 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define NOT_SELF_ISSUED   50

Definition at line 81 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define NOT_SELF_SIGNED   50

Definition at line 82 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

#define VAL_PERIOD_OK   75

Definition at line 78 of file CACDefaultScoring.cpp.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().


Function Documentation

bool KeyIDsMatch ( CPKIFAuthorityKeyIdentifierPtr &  akid,
const IPKIFTrustAnchorPtr &  curTA 
)

Interface: Subsystem

This is a helper function that compares the AKID and SKID for a match

Returns:
A Boolean indicating whether the curTA’s subject key identifier matches the akid parameter value.
Parameters:
akid  [in] The authority key id to compare
curTA  [in] TA from which SKID will be obtained

Definition at line 200 of file CACDefaultScoring.cpp.

References CPKIFGeneralName::DIRECTORYNAME, KeyIDsMatch(), LOG_STRING_DEBUG, stricmp, and TOOLKIT_PATH_MISC.

bool KeyIDsMatch ( CPKIFAuthorityKeyIdentifierPtr &  akid,
CPKIFCertificatePtr &  curCert 
)

Interface: Subsystem

This is a helper function that compares the AKID and SKID for a match

Returns:
A Boolean indicating whether the curCert’s subject key identifier matches the akid parameter value.
Parameters:
akid  [in] The authority key id to compare
curCert  [in] Certificate from which SKID will be obtained

Definition at line 133 of file CACDefaultScoring.cpp.

References CPKIFGeneralName::DIRECTORYNAME, LOG_STRING_DEBUG, stricmp, and TOOLKIT_PATH_MISC.

Referenced by _GetCRLIssuersCert(), CheckKIDsAndSignatures(), KeyIDsMatch(), KeyIDCompare::operator()(), and CPKIFDefaultScoring::ScoreAndSortNodes().

bool scoreCompare ( const CPKIFCertificateNodeEntryPtr lhs,
const CPKIFCertificateNodeEntryPtr rhs 
)

Interface: Subsystem

This is a helper function the compares the builder score on two CPKIFCertificateNodeEntry objects

Returns:
True if lhs is greater then rhs, false otherwise
Parameters:
lhs  [in] Reference to smart pointer to a CPKIFCertificateNodeEntry object containing the lhs
rhs  [in] Reference to smart pointer to a CPKIFCertificateNodeEntry object containing the rhs

Definition at line 95 of file CACDefaultScoring.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_PATH_MISC.

Referenced by _GetCRLIssuersCert(), ScoreAndSortNodes(), and CPKIFDefaultScoring::ScoreAndSortNodes().

bool scoreCompareNK ( const CPKIFNameAndKeyWithScorePtr &  lhs,
const CPKIFNameAndKeyWithScorePtr &  rhs 
)

Interface: Subsystem

This is a helper function the compares the builder score on two CPKIFNameAndKeyWithScorePtr objects

Returns:
True if lhs is greater then rhs, false otherwise
Parameters:
lhs  [in] Reference to smart pointer to a CPKIFCertificateNodeEntry object containing the lhs
rhs  [in] Reference to smart pointer to a CPKIFCertificateNodeEntry object containing the rhs

Definition at line 114 of file CACDefaultScoring.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_PATH_MISC.

Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().

bool SomeMatch ( CPKIFPolicyInformationSetPtr &  fromCert,
CPKIFPolicyInformationSetPtr &  fromPrevCert,
CPKIFPolicyMappingsPtr &  policyMappings 
)

Interface: Subsystem

This is a helper function that compares policy information for some match.

Returns:
None
Parameters:
fromCert  [in]A pointer to a reference to CPKIFPolicyInformationSet object containing the policies from certificate
fromPrevCert  [in]A pointer to a reference to CPKIFPolicyInformationSet object containing the policies from the previous certificate
policyMappings  [in]A pointer to a reference to CPKIFPolicyInformationSet object

Definition at line 384 of file CACDefaultScoring.cpp.

References SomeMatch().

bool SomeMatch ( CPKIFPolicyInformationSetPtr &  fromCert,
CPKIFPolicyInformationListPtr &  polsFromPrevCert,
CPKIFPolicyMappingsPtr &  policyMappings 
)

Interface: Subsystem

This is a helper function that compares policy information for some match

Returns:
True if some match was found, false otherwise
Parameters:
fromCert  [in]A pointer to a reference to CPKIFPolicyInformationSet object containing the policies from certificate
polsFromPrevCert  [in]A pointer to a reference to CPKIFPolicyInformationSet object containing the policies from the previous certificate
policyMappings  [in]A pointer to a reference to CPKIFPolicyInformationSet object

Definition at line 306 of file CACDefaultScoring.cpp.

References g_anyPolicy, and GottaMatch< T >::SetRHS().

Referenced by _GetCRLIssuersCert(), CheckPolicies(), CPKIFDefaultScoring::ScoreAndSortNodes(), and SomeMatch().


Generated on Mon Nov 15 11:16:13 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6