Module: CPKIFName
Definition in file Name.cpp.
#include "Name.h"
#include "Buffer.h"
#include "ASN1Helper.h"
#include "PKIX1Explicit88.h"
#include "ToolkitUtils.h"
#include "OID.h"
#include "DistributionPointName.h"
Go to the source code of this file.
Defines | |
#define | _UPPER 0x1 |
#define | _LOWER 0x2 |
#define | _DIGIT 0x4 |
#define | _SPACE 0x8 |
#define | _PUNCT 0x10 |
#define | _CONTROL 0x20 |
#define | _BLANK 0x40 |
#define | _HEX 0x80 |
Functions | |
CPKIFOIDPtr | g_oidCN (new CPKIFOID("2.5.4.3")) |
CPKIFOIDPtr | g_oidC (new CPKIFOID("2.5.4.6")) |
CPKIFOIDPtr | g_oidO (new CPKIFOID("2.5.4.10")) |
CPKIFOIDPtr | g_oidOU (new CPKIFOID("2.5.4.11")) |
bool | FindAttributeName (const CPKIFOIDPtr &oid, char *oidBuf) |
bool | CharIsSpace (char c) |
std::string | trim_right (const std::string &source, const std::string &t=allSpaces) |
std::string | trim_left (const std::string &source, const std::string &t=allSpaces) |
std::string | trim (const std::string &source, const std::string &t=allSpaces) |
bool | CompareRDNStrings (const char *lhsStr, const char *rhsStr) |
bool | CompareASN1OIDs (ASN1OBJID *lhs, ASN1OBJID *rhs) |
bool | RDNsMatch (CACX509V3RelativeDistinguishedName *lhs, CACX509V3RelativeDistinguishedName *rhs) |
Variables | |
char | allSpaces [] = {0x09,0x0A,0x0B,0x0C,0x0D,0x20} |
const int | CharTableSize = 128 |
#define _SPACE 0x8 |
bool CharIsSpace | ( | char | c | ) |
Interface: Subsystem
This is a helper function that determines if a character is a space.
c | [in]Character that will be checked |
Definition at line 664 of file Name.cpp.
References _SPACE.
Referenced by CompareRDNStrings().
bool CompareASN1OIDs | ( | ASN1OBJID * | lhs, | |
ASN1OBJID * | rhs | |||
) |
Interface: Subsystem
This is a helper function that compares two oids
lhs | [in] A pointer to ASN1OBJID that will be compared |
rhs | [in] A pointer to ASN1OBJID that will be compared |
Definition at line 837 of file Name.cpp.
Referenced by RDNsMatch().
bool CompareRDNStrings | ( | const char * | lhsStr, | |
const char * | rhsStr | |||
) |
Interface: Subsystem
This is helper function that compares two RDN strings, ignoring leading or trailing white space.
lhsStr | [in] A NULL terminated string that will be compared |
rhsStr | [in] A NULL terminated string that will be compared |
Definition at line 736 of file Name.cpp.
References CharIsSpace(), and strnicmp.
Referenced by RDNsMatch().
bool FindAttributeName | ( | const CPKIFOIDPtr & | oid, | |
char * | oidBuf | |||
) |
Interface: Subsystem
This is helper fuction that looks up common RDN attribute types based on OID. The buffer passed as oidBuf is assumed to be at least MAXOID bytes in size, despite the fact that it doesn't contain an OID value.
oid | [in] A reference to a pointer to CPKIFOID object that contains oids that is used to find the name |
oidBuf | [out] Buffer that contains the attribute name |
Definition at line 299 of file Name.cpp.
References g_oidC(), g_oidCN(), g_oidO(), and g_oidOU().
Referenced by CPKIFName::GetRDNs(), and CPKIFName::ToString().
CPKIFOIDPtr g_oidC | ( | new | CPKIFOID"2.5.4.6" | ) |
Referenced by FindAttributeName().
CPKIFOIDPtr g_oidCN | ( | new | CPKIFOID"2.5.4.3" | ) |
Referenced by FindAttributeName().
CPKIFOIDPtr g_oidO | ( | new | CPKIFOID"2.5.4.10" | ) |
Referenced by FindAttributeName().
CPKIFOIDPtr g_oidOU | ( | new | CPKIFOID"2.5.4.11" | ) |
Referenced by FindAttributeName().
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==().
std::string trim | ( | const std::string & | source, | |
const std::string & | t = allSpaces | |||
) | [inline] |
Interface: Subsystem
This is a helper function that trims a string
source | [in] String to be trimmed |
t | [in] String that contains all spaces |
Definition at line 720 of file Name.cpp.
References trim_left(), and trim_right().
std::string trim_left | ( | const std::string & | source, | |
const std::string & | t = allSpaces | |||
) | [inline] |
std::string trim_right | ( | const std::string & | source, | |
const std::string & | t = allSpaces | |||
) | [inline] |
const int CharTableSize = 128 |