Module: CPKIFReversiblePathBuilder
Definition in file PKIFReversiblePathBuilder.cpp.
#include "ASN1Helper.h"
#include "BasicChecksUtils.h"
#include "BasicConstraints.h"
#include "BuilderStatistics.h"
#include "BuilderUtils.h"
#include "Certificate.h"
#include "GottaMatch.h"
#include "Name.h"
#include "PathResults.h"
#include "IPKIFCertRepository.h"
#include "IPKIFCertRepositoryUpdate.h"
#include "IPKIFTrustCache.h"
#include "IPKIFCRLRepository.h"
#include "IPKIFNameAndKey.h"
#include "IPKIFSupportsSynonymousSources.h"
#include "IssuedBy.h"
#include "NodeInNodeList.h"
#include "PKIFCertificateNodeEntry.h"
#include "PKIFCertificatePath.h"
#include "PKIFCertStatus.h"
#include "PKIFErrors.h"
#include "PKIFMediators.h"
#include "PKIFNameAndKeyWithScore.h"
#include "PKIFPathException.h"
#include "PKIFPathLogger.h"
#include "PKIFPathSettings.h"
#include "PKIFReversiblePathBuilder.h"
#include "PKIFReversePathState.h"
#include "PKIFTrustRoot.h"
#include "PKIX1Explicit88.h"
#include "ToolkitUtils.h"
#include <sstream>
#include "PKIFDefaultScoring.h"
#include "boost/numeric/conversion/cast.hpp"
#include <iterator>
Go to the source code of this file.
Classes | |
class | NameAndKeyNodeMatch |
Defines | |
#define | NAME_MATCHES_TARGET_ISSUER 5000 |
#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 | |
void | RemoveNotIssuedTo (CPKIFNamePtr &name, CPKIFCertificateNodeList &certList) |
void | RemoveNotIssuedBy (CPKIFNamePtr &name, CPKIFCertificateNodeList &certList) |
bool | RDNsMatch (CACX509V3RelativeDistinguishedName *lhs, CACX509V3RelativeDistinguishedName *rhs) |
bool | scoreCompare (const CPKIFNameAndKeyWithScorePtr &lhs, const CPKIFNameAndKeyWithScorePtr &rhs) |
int | GetNumMatchingRdns (CPKIFNamePtr &name1, CPKIFNamePtr &name2) |
void | ScoreAndSortNodes (CPKIFNameAndKeyWithScoreListPtr &listToSort, CPKIFCertificatePtr &targetCert, IPKIFNameAndKeyPtr &issuerNameAndKey, CPKIFPathSettingsPtr &settings, bool toToSortContainsTrustAnchors) |
#define ALGS_MATCH 100 |
Definition at line 137 of file PKIFReversiblePathBuilder.cpp.
#define BASIC_CONSTRAINTS_PRESENT_AND_SET 75 |
Definition at line 135 of file PKIFReversiblePathBuilder.cpp.
#define HAS_AT_ONE_POLICY 25 |
Definition at line 143 of file PKIFReversiblePathBuilder.cpp.
#define ISSUED_BY_CERT_IN_CACHE 500 |
Definition at line 134 of file PKIFReversiblePathBuilder.cpp.
#define ISSUED_BY_TRUST_ROOT 5000 |
Definition at line 133 of file PKIFReversiblePathBuilder.cpp.
#define KEY_IDS_MATCH 6000 |
Definition at line 138 of file PKIFReversiblePathBuilder.cpp.
#define MATCH_POLICY_WITH_PREV_CERT 25 |
Definition at line 144 of file PKIFReversiblePathBuilder.cpp.
#define MATCH_POLICY_WITH_SETTINGS 25 |
Definition at line 145 of file PKIFReversiblePathBuilder.cpp.
#define NAME_MATCHES_TARGET_ISSUER 5000 |
#define NOT_SELF_ISSUED 50 |
Definition at line 139 of file PKIFReversiblePathBuilder.cpp.
#define NOT_SELF_SIGNED 50 |
Definition at line 140 of file PKIFReversiblePathBuilder.cpp.
#define VAL_PERIOD_OK 75 |
Definition at line 136 of file PKIFReversiblePathBuilder.cpp.
int GetNumMatchingRdns | ( | CPKIFNamePtr & | name1, | |
CPKIFNamePtr & | name2 | |||
) |
Interface: Module
GetNumMatchingRdns returns a integer value indicating the number of relative distinguished name components the two names passed via the name1 and name2 parameters have in common.
Definition at line 176 of file PKIFReversiblePathBuilder.cpp.
References CACASNWRAPPER_CREATE, and RDNsMatch().
Referenced by ScoreAndSortNodes().
bool RDNsMatch | ( | CACX509V3RelativeDistinguishedName * | lhs, | |
CACX509V3RelativeDistinguishedName * | rhs | |||
) |
Interface: Subsystem
This is a helper function that compares two CACX509V3RelativeDistinguishedName objects
lhs | [in] A poiter to CACX509V3RelativeDistinguishedName that will be compared |
rhs | [in] A poiter to CACX509V3RelativeDistinguishedName that will be compared |
Definition at line 860 of file Name.cpp.
References CACASNWRAPPER_CREATE, CompareASN1OIDs(), and CompareRDNStrings().
Referenced by CPKIFName::DescendedFrom(), GetNumMatchingRdns(), and CPKIFName::operator==().
void RemoveNotIssuedBy | ( | CPKIFNamePtr & | name, | |
CPKIFCertificateNodeList & | certList | |||
) |
Interface: Module
This function removes items from the list passed via the certList component if the item is not issued by the entity identified by the name parameter.
Definition at line 79 of file PKIFReversiblePathBuilder.cpp.
References NotIssuedBy::SetRHS().
void RemoveNotIssuedTo | ( | CPKIFNamePtr & | name, | |
CPKIFCertificateNodeList & | certList | |||
) |
Interface: Module
This function removes items from the list passed via the certList component if the item is not issued to the entity identified by the name parameter.
Definition at line 63 of file PKIFReversiblePathBuilder.cpp.
References NotIssuedTo::SetRHS().
void ScoreAndSortNodes | ( | CPKIFNameAndKeyWithScoreListPtr & | listToSort, | |
CPKIFCertificatePtr & | targetCert, | |||
IPKIFNameAndKeyPtr & | issuerNameAndKey, | |||
CPKIFPathSettingsPtr & | settings, | |||
bool | toToSortContainsTrustAnchors | |||
) |
Interface: Module
This function applies a small set of sorting criteria to order the certificate node list passed as nodeList. This function will sort the node list based on analysis of the certificates in the node list and the environment information passed as prevCert, settings, trustCache, numOfCAsBelowCurInPath and iCert.
listToSort | [in/out] Inbound contains unsorted list, outbound contains sorted list |
targetCert | [in] target certificate - must be non-NULL |
issuerNameAndKey | [in] adjacent certificate in the path (i.e., should be the issuer of items in listToSort) |
settings | [in] operative path settings |
toToSortContainsTrustAnchors | [in] boolean that indicates whether or not listToSort contains trust anchors |
Definition at line 227 of file PKIFReversiblePathBuilder.cpp.
References BASIC_CONSTRAINTS_PRESENT_AND_SET, GetNumMatchingRdns(), NAME_MATCHES_TARGET_ISSUER, and scoreCompare().
bool scoreCompare | ( | const CPKIFNameAndKeyWithScorePtr & | lhs, | |
const CPKIFNameAndKeyWithScorePtr & | rhs | |||
) |
Interface: Module
scoreCompare returns true if the value returned by invoking GetScore on the lhs parameter is greater than the value returned by invoking GetScore on the rhs parameter and false otherwise.
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 155 of file PKIFReversiblePathBuilder.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_PATH_MISC.