1
1
mirror of https://github.com/wader/fq.git synced 2024-12-24 22:05:31 +03:00

doc: Forgot make doc

This commit is contained in:
Mattias Wadman 2022-02-16 20:13:28 +01:00
parent a180ded28d
commit c95b0d6d19

View File

@ -111,15 +111,17 @@ fq -d raw 'mp4({force: true})' file.mp4
### asn1_ber
Can also decode CER and BER but with no extra validation. Currently does not support specifying a schema.
Supports decoding BER, CER and DER ([X.690]([X.690_1297.pdf)).
Supports `torepr` but without schema support it's not that useful:
- Currently no extra validation is done for CER and DER.
- Does not support specifying a schema.
- Supports `torepr` but without schema all sequences and sets will be arrays.
```
fq -d asn1_ber torepr file.ber
```
There is also `frompem` and `topem` to help working with PEM format:
Functions `frompem` and `topem` can help working with PEM format:
```
fq -d raw 'frompem | asn1_ber | d' cert.pem
@ -130,6 +132,19 @@ If the schema is known and not that complicated it can be reproduced:
```
fq -d asn1_ber 'torepr as $r | ["version", "modulus", "private_exponent", "private_exponen", "prime1", "prime2", "exponent1", "exponent2", "coefficient"] | with_entries({key: .value, value: $r[.key]})' pkcs1.der
```
Can be used to decode nested parts:
```
fq -d asn1_ber '.constructed[1].value | asn1_ber' file.ber
```
References and tools:
- https://www.itu.int/ITU-T/studygroups/com10/languages/X.690_1297.pdf
- https://en.wikipedia.org/wiki/X.690
- https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/
- https://lapo.it/asn1js/
### avro_ocf
Supports reading Avro Object Container Format (OCF) files based on the [1.11.0 specification](https://avro.apache.org/docs/current/spec.html#Object+Container+Files).