Module x509.extension
x509.extension module to mapping X509_EXTENSION to lua object.
Usage:
extension = require('openssl').x509.extension
Functions
new_extension (extension) | Create x509_extension object |
read_extension (data) | read der encoded x509_extension |
support () | get all x509 certificate supported extensions |
support (extension) | check x509_extension object support or not |
support (nid_or_name) | check nid or name support or not |
Tables
x509_extension_param_table | x509_extension contrust param table. |
Class x509_extension
x509_extension.x509_extension_info_table | x509_extension infomation table |
x509_extension:info ([true]) | get infomation table of x509_extension. |
x509_extension:dup () | clone then x509_extension |
x509_extension:export () | export x509_extenion to der encoded string |
x509_extension:object () | get asn1_object of x509_extension. |
x509_extension:object (obj) | set asn1_object for x509_extension. |
x509_extension:critical () | get critical of x509_extension. |
x509_extension:critical (critical) | set critical of x509_extension. |
x509_extension:data () | get data of x509_extension |
x509_extension:data (data) | set type of x509_extension |
Functions
- new_extension (extension)
-
Create x509_extension object
Parameters:
- extension table with object, value and critical
Returns:
-
x509_extension
mapping to X509_EXTENSION in openssl
See also:
- read_extension (data)
-
read der encoded x509_extension
Parameters:
- data string der encoded
Returns:
-
x509_extension
mappling to X509_EXTENSION in openssl
- support ()
-
get all x509 certificate supported extensions
Returns:
-
table
contain all support extension info as table node {lname=…, sname=…, nid=…}
- support (extension)
-
check x509_extension object support or not
Parameters:
- extension x509_extension
Returns:
-
boolean
true for supported, false or not
- support (nid_or_name)
-
check nid or name support or not
Parameters:
- nid_or_name number or string for extension
Returns:
-
boolean
true for supported, false or not
Tables
- x509_extension_param_table
-
x509_extension contrust param table.
Fields:
- critical boolean true set critical
- value string or asn1_string value of x509_extension
- object string or asn1_object object of extension
Usage:
xattr = x509.attrextension.new_extension { object = asn1_object, critical = false, value = string or asn1_string value }
Class x509_extension
openssl.x509_extension object
- x509_extension.x509_extension_info_table
-
x509_extension infomation table
Fields:
- object asn1_object object of x509_extension
- critical boolean true for critical value
- value string octet string
- x509_extension:info ([true])
-
get infomation table of x509_extension.
Parameters:
- true boolean or utf8 for utf8 default (optional)
Returns:
-
table
info, x509_extension infomation as table
See also:
- x509_extension:dup ()
-
clone then x509_extension
Returns:
-
x509_extension
clone of x509_extension
- x509_extension:export ()
-
export x509_extenion to der encoded string
Returns:
- x509_extension:object ()
-
get asn1_object of x509_extension.
Returns:
-
asn1_object
object of x509_extension
- x509_extension:object (obj)
-
set asn1_object for x509_extension.
Parameters:
- obj asn1_object
Returns:
- boolean true for success
- nil when occure error, and followed by error message
- x509_extension:critical ()
-
get critical of x509_extension.
Returns:
-
boolean
true if extension set critical or false
- x509_extension:critical (critical)
-
set critical of x509_extension.
Parameters:
- critical boolean set to self
Returns:
- boolean set critical success return true
- nil fail return nil, and followed by error message
- x509_extension:data ()
-
get data of x509_extension
Returns:
-
asn1_string
- x509_extension:data (data)
-
set type of x509_extension
Parameters:
- data asn1_string set to self
Returns:
- boolean result true for success
- nil for error, and followed by error message