Skip to content
/ plt Public

Presentation Language Tool

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

openmls/plt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Presentation Language Tool

A simple tool to parse the TLS/MLS presentation language for research and learning purposes.

Usage

Currently, this tool generates a dependency graph of all structs and enums defined in a given <file> and outputs a graph in either GML or GV format.

plt <file> [gml|gv]

You can try this out by running ...

cargo run -- assets/draft-ietf-mls-protocol.tls

... and using a GML viewer such as yEd. (Don't forget to apply an auto-layout.)

Warning

This tool is not thoroughly tested and might produce invalid GML/GV output. Use at your own risk!

Example

The following definition ...

struct {    
    CredentialType credential_type;    
    select (Credential.credential_type) {    
        case basic:    
            opaque identity<V>;    
    
        case x509:    
            Certificate chain<V>;    
    };    
} Credential;

... is parsed into ...

Struct(
    Struct {
        name: "Credential",
        items: [
            Field(
                Field {
                    type: "CredentialType",
                    name: "credential_type",
                    range: None,
                    optional: false,
                    default: None,
                },
            ),
            Select(
                Select {
                    over: "Credential.credential_type",
                    cases: [
                        Case {
                            left: "basic",
                            right: Fields(
                                [
                                    Field {
                                        type: "opaque",
                                        name: "identity",
                                        range: Some(
                                            Variable,
                                        ),
                                        optional: false,
                                        default: None,
                                    },
                                ],
                            ),
                        },
// ...
                    ],
                },
            ),
        ],
    },
)

License

Licensed under either of ...

... at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Presentation Language Tool

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages