Skip to content

Commit

Permalink
doc(readme) add documents to revoked and get_extension{,s}
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Aug 9, 2020
1 parent 6a59ed8 commit b1bad6d
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ Table of Contents
+ [csr.new](#csrnew)
+ [csr.istype](#csristype)
+ [csr:get_*, csr:set_*](#csrget_-csrset_)
+ [csr:get_extension](#csrget_extension)
+ [csr:get_extensions](#csrget_extensions)
+ [csr:sign](#csrsign)
+ [csr:verify](#csrverify)
+ [csr:tostring](#csrtostring)
Expand All @@ -120,6 +122,7 @@ Table of Contents
+ [crl:set_extension](#crlset_extension)
+ [crl:get_extension_critical](#crlget_extension_critical)
+ [crl:set_extension_critical](#crlset_extension_critical)
+ [crl:add_revoked](#crladd_revoked)
+ [crl:sign](#crlsign)
+ [crl:verify](#crlverify)
+ [crl:tostring](#crltostring)
Expand Down Expand Up @@ -177,6 +180,9 @@ Table of Contents
+ [store:load_file](#storeload_file)
+ [store:load_directory](#storeload_directory)
+ [store:verify](#storeverify)
* [resty.openssl.x509.revoked](#restyopensslx509revoked)
+ [revoked.new](#revokednew)
+ [revoked.istype](#revokedistype)
* [Functions for stack-like objects](#functions-for-stack-like-objects)
+ [metamethods](#metamethods)
+ [each](#each)
Expand Down Expand Up @@ -1726,6 +1732,30 @@ with naming convension with other functions.

[Back to TOC](#table-of-contents)

### csr:get_extension

**syntax**: *extension, pos, err = csr:get_extension(nid_or_txt, pos?)*

Get X.509 `extension` matching the given [NID] to certificate, returns a
[resty.openssl.x509.extension](#restyopensslx509extension) instance and the found position.

If `last_pos` is defined, the function searchs from that position; otherwise it
finds from beginning. Index is 1-based.

```lua
local ext, pos, err = csr:get_extension("basicConstraints")
```

[Back to TOC](#table-of-contents)

### csr:get_extensions

**syntax**: *extensions, err = csr:get_extensions()*

Return all extensions as a [resty.openssl.x509.extensions](#restyopensslx509extensions) instance.

[Back to TOC](#table-of-contents)

### csr:sign

**syntax**: *ok, err = csr:sign(pkey, digest?)*
Expand Down Expand Up @@ -1896,6 +1926,14 @@ Set critical flag of the X.509 `extension` matching the given [NID] to CRL.

[Back to TOC](#table-of-contents)

### crl:add_revoked

**syntax**: *ok, err = crl:add_revoked(revoked)*

Adds a [resty.openssl.x509.revoked](#restyopensslx509revoked) instance to the CRL.

[Back to TOC](#table-of-contents)

### crl:sign

**syntax**: *ok, err = crl:sign(pkey, digest?)*
Expand Down Expand Up @@ -2537,6 +2575,28 @@ returns `true` only. If verification failed, returns `nil` and error explaining

[Back to TOC](#table-of-contents)

## resty.openssl.x509.revoked

Module to interact with X509_REVOKED

[Back to TOC](#table-of-contents)

### revoked.new

**syntax**: *ch, err = revoked.new(serial_number, time, reason)*

Creates a new `revoked` instance.

[Back to TOC](#table-of-contents)

### revoked.istype

**syntax**: *ok = revoked.istype(table)*

Returns `true` if table is an instance of `revoked`. Returns `false` otherwise.

[Back to TOC](#table-of-contents)

## Functions for stack-like objects

[Back to TOC](#table-of-contents)
Expand Down

0 comments on commit b1bad6d

Please sign in to comment.