scclib
Stable Cloud Computing C++ Library
Public Types | Public Member Functions | Public Attributes | List of all members
scc::crypto::GeneralName Struct Reference

General name. More...

#include <cert.h>

Collaboration diagram for scc::crypto::GeneralName:
Collaboration graph
[legend]

Public Types

enum class  Type : int {
  other_name = 0 , rfc822_name = 1 , dns_name = 2 , x400_address = 3 ,
  directory_name = 4 , edi_party_name = 5 , uniform_resource_identifier = 6 , ip_address = 7 ,
  registered_id = 8
}
 

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< RelativeDistinguishedNamename_val
 
oid_value oid_val
 

Detailed Description

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.

Definition at line 510 of file cert.h.

Constructor & Destructor Documentation

◆ GeneralName()

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.

Member Function Documentation

◆ parse()

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.

◆ str()

std::string scc::crypto::GeneralName::str ( bool  = false) const

Print contents.

Debug flag also prints out base element contents.


The documentation for this struct was generated from the following file: