Package contrail :: Package security :: Package onlineca :: Package client :: Module openssl_utils :: Class X509SubjectName
[hide private]

Class X509SubjectName

source code


Class to handle X.509 subject names

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
serialize(self, *args, **kwargs)
Serialize subject name iterable into a string
source code
OpenSSL.crypto.X509Name
as_openssl_x509_subject_name(self)
Returns: this object as an OpenSSL package equivalent type
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
from_string(cls, dn, separator=None) source code
 
parse(cls, dn, separator=None)
Parse string distinguished name into a dictionary for fields.
source code
 
Serialize(cls, dn, separator='/', sort=True)
Classmethod implementation - Serialize subject name iterable into a string
source code
Class Variables [hide private]
  SHORT_NAME_LOOKUP = {'commonName': 'CN', 'countryName': 'C', '...
  SLASH_PARSER_RE_STR = '/(countryName|userid|streetAddress|emai...
  SLASH_PARSER_RE = re.compile(r'/(countryName|userid|streetAddr...
  COMMA_PARSER_RE_STR = '[,]?\\s*(countryName|userid|streetAddre...
  COMMA_PARSER_RE = re.compile(r',?\s*(countryName|userid|street...
  VALID_SEPARATORS = ('/', ',')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

parse(cls, dn, separator=None)
Class Method

source code 

Parse string distinguished name into a dictionary for fields. Where multiple entries exist for a field, values are set as a tuple

as_openssl_x509_subject_name(self)

source code 
Returns: OpenSSL.crypto.X509Name
this object as an OpenSSL package equivalent type

Class Variable Details [hide private]

SHORT_NAME_LOOKUP

Value:
{'commonName': 'CN',
 'countryName': 'C',
 'domainComponent': 'DC',
 'emailAddress': 'EMAILADDRESS',
 'localityName': 'L',
 'organisation': 'O',
 'organisationalUnitName': 'OU',
 'stateOrProvinceName': 'ST',
...

SLASH_PARSER_RE_STR

Value:
'/(countryName|userid|streetAddress|emailAddress|domainComponent|local\
ityName|organisationalUnitName|organisation|commonName|stateOrProvince\
Name|C|UID|STREET|EMAILADDRESS|DC|L|OU|O|CN|ST)='

SLASH_PARSER_RE

Value:
re.compile(r'/(countryName|userid|streetAddress|emailAddress|domainCom\
ponent|localityName|organisationalUnitName|organisation|commonName|sta\
teOrProvinceName|C|UID|STREET|EMAILADDRESS|DC|L|OU|O|CN|ST)=')

COMMA_PARSER_RE_STR

Value:
'[,]?\\s*(countryName|userid|streetAddress|emailAddress|domainComponen\
t|localityName|organisationalUnitName|organisation|commonName|stateOrP\
rovinceName|C|UID|STREET|EMAILADDRESS|DC|L|OU|O|CN|ST)='

COMMA_PARSER_RE

Value:
re.compile(r',?\s*(countryName|userid|streetAddress|emailAddress|domai\
nComponent|localityName|organisationalUnitName|organisation|commonName\
|stateOrProvinceName|C|UID|STREET|EMAILADDRESS|DC|L|OU|O|CN|ST)=')