Module: CPKIFDefaultScoring
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>

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 ALGS_MATCH 100 |
Definition at line 79 of file CACDefaultScoring.cpp.
Referenced by CPKIFDefaultScoring::ScoreAndSortNodes().
| #define BASIC_CONSTRAINTS_PRESENT_AND_SET 75 |
Definition at line 77 of file CACDefaultScoring.cpp.
Referenced by ScoreAndSortNodes(), and CPKIFDefaultScoring::ScoreAndSortNodes().
| #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().
| bool KeyIDsMatch | ( | CPKIFAuthorityKeyIdentifierPtr & | akid, | |
| const IPKIFTrustAnchorPtr & | curTA | |||
| ) |
Interface: Subsystem
This is a helper function that compares the AKID and SKID for a match
| 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
| 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
| 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
| 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.
| 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
| 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().
1.5.6