scclib
Stable Cloud Computing C++ Library
|
General name. More...
#include <cert.h>
Public Member Functions | |
GeneralName (Type t=Type::directory_name) | |
Create the base sequence. More... | |
void | clear () |
bool | compare (const GeneralName &b) const |
bool | operator== (const GeneralName &b) const |
bool | operator!= (const GeneralName &b) const |
void | parse (BasePtr) |
Parse an input as an implicit element (must have id corresponding to the type above. More... | |
BasePtr | dump () |
Reset the base pointer and dump the element to a context-class element. | |
std::string | str (bool=false) const |
Print contents. More... | |
Public Attributes | |
Type | type |
Value type. | |
BasePtr | base |
std::string | string_val |
std::vector< RelativeDistinguishedName > | name_val |
oid_value | oid_val |
General name.
https://tools.ietf.org/html/rfc5280#page-37.
A general name can have a variety of types. The default is the directory name type.
GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
GeneralName ::= CHOICE { otherName [0] OtherName, rfc822Name [1] IA5String, dNSName [2] IA5String, x400Address [3] ORAddress, directoryName [4] Name, ediPartyName [5] EDIPartyName, uniformResourceIdentifier [6] IA5String, iPAddress [7] OCTET STRING, registeredID [8] OBJECT IDENTIFIER }
OtherName ::= SEQUENCE { type-id OBJECT IDENTIFIER, value [0] EXPLICIT ANY DEFINED BY type-id }
EDIPartyName ::= SEQUENCE { nameAssigner [0] DirectoryString OPTIONAL, partyName [1] DirectoryString }
ORAddress ::= SEQUENCE { built-in-standard-attributes BuiltInStandardAttributes, built-in-domain-defined-attributes BuiltInDomainDefinedAttributes OPTIONAL, – see also teletex-domain-defined-attributes extension-attributes ExtensionAttributes OPTIONAL }
For convenience, string, Name, and OID types are parsed and dumped into the associated value field string_val, name_val or oid_val.
Other types can be manipulated through the base field and are not interpreted.
scc::crypto::GeneralName::GeneralName | ( | Type | t = Type::directory_name | ) |
Create the base sequence.
For other_name, x400_address, edi_party_name, an empty base sequence is created.
void scc::crypto::GeneralName::parse | ( | BasePtr | ) |
Parse an input as an implicit element (must have id corresponding to the type above.
Sets the base pointer to the implicit value.
std::string scc::crypto::GeneralName::str | ( | bool | = false | ) | const |
Print contents.
Debug flag also prints out base element contents.