Module x509.attribute
x509.attribute module to mapping X509_ATTRIBUTE to lua object.
Usage:
attr = require('openssl').x509.attribute
    
Functions
| new_attribute (attribute) | Create x509_attribute object | 
Tables
| x509_attribute_param_table | x509_attribute contrust param table. | 
| asn1_type_table | asn1_type object as table | 
| x509_attribute_info_table | x509_attribute infomation table | 
Class x509_attribute
| x509_attribute:info () | get infomation table of x509_attribute. | 
| x509_attribute:dup () | clone then asn1_attribute | 
| x509_attribute:data (idx, attrtype) | get type of x509_attribute | 
| x509_attribute:data (attrtype, data) | set type of x509_attribute | 
| x509_attribute:type ([location]) | get type of x509_attribute. | 
| x509_attribute:object () | get asn1_object of x509_attribute. | 
| x509_attribute:object (obj) | set asn1_object for x509_attribute. | 
Functions
- new_attribute (attribute)
 - 
    Create x509_attribute object
    
Parameters:
- attribute table with object, type and value
 
Returns:
- 
           x509_attribute
        mapping to X509_ATTRIBUTE in openssl
    
 
See also:
 
Tables
- x509_attribute_param_table
 - 
    x509_attribute contrust param table.
    
Fields:
- object string, integer or asn1_object , identify a asn1_object
 - type string or integer , same with type in asn1.new_string
 - value string or asn1_object , value of attribute
 
Usage:
xattr = x509.attribute.new_attribute { object = asn1_object, type = Nid_or_String, value = string or asn1_string value }
 - asn1_type_table
 - 
    asn1_type object as table
    
Fields:
 - x509_attribute_info_table
 - 
    x509_attribute infomation table
    
Fields:
 
Class x509_attribute
          openssl.x509_attribute object
          
    - x509_attribute:info ()
 - 
    get infomation table of x509_attribute.
    
Returns:
- 
           table
        info,  x509_attribute infomation as table
    
 
See also:
 - x509_attribute:dup ()
 - 
    clone then asn1_attribute
    
Returns:
- 
           x509_attribute
        attr clone of x509_attribute
    
 
 - x509_attribute:data (idx, attrtype)
 - 
    get type of x509_attribute
    
Parameters:
- idx integer location want to get type
 - attrtype string attribute type
 
Returns:
- 
           asn1_string
    
 
 - x509_attribute:data (attrtype, data)
 - 
    set type of x509_attribute
    
Parameters:
Returns:
- 
           boolean
        result true for success and others for fail
    
 
 - x509_attribute:type ([location])
 - 
    get type of x509_attribute.
    
Parameters:
- location integer which location to get type, default is 0 (optional)
 
Returns:
- table asn1_type, asn1_type as table info
 - nil nil, fail return nothing
 
See also:
 - x509_attribute:object ()
 - 
    get asn1_object of x509_attribute.
    
Returns:
- 
           asn1_object
        object of x509_attribute
    
 
 - x509_attribute:object (obj)
 - 
    set asn1_object for x509_attribute.
    
Parameters:
- obj asn1_object
 
Returns:
- boolean true for success
 - nil when occure error, and followed by error message