clique-sibyl-commonlib
Usage
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.6.0" }
Features
Supports four features: rustls-0_20, rustls-0_21, rustls-0_22, rustls-0_23 and wasm.
If you need to enable rustls, specify the corresponding feature based on the version of rustls you intend to use.
Currently, only rustls-0_23 is supported fully. rustls-0_20, rustls-0_21, rustls-0_22 are supported partially. Hence, we recommend using rustls-0_23 if you need to use rustls.
# use rustls-0_23
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.6.0", = "rustls-0_23" }
TLS Config
Support creating TLS config for both client and server.
You can use TLS config without client authentication. Or you can use TLS config with client authentication (also known as "mutual TLS" / "mTLS").
- TLS config without client authentication:
clique_sibyl_commonlib::tls::config::create_tls_server_config_without_client_auth clique_sibyl_commonlib::tls::config::create_tls_client_config_without_client_auth - TLS config with client authentication:
clique_sibyl_commonlib::tls::config::create_tls_server_config_with_client_auth clique_sibyl_commonlib::tls::config::create_tls_client_config_with_client_auth clique_sibyl_commonlib::tls::config::create_mtls_config
This TLS config can help you to verify the attestation in the certificate during TLS handshake.
And you can find examples in ./tests/actix, ./gramine-examples/actix-example, ./gramine-examples/axum-example to see how to integrate this crate with server and client.
Attestation Verifier
You can use clique_sibyl_commonlib::attestation::verify_attestation to verify the attestation.
WASM
Install WASM toolchains:
Build WASM:
# For Node.js CommonJS module
# For web
# For Node.js ESM module
Install node.js:
Test WASM for node.js:
Tests
Examples
You can explore examples located in ./tests/actix, ./gramine-examples/actix-example, ./gramine-examples/axum-example to see how to integrate this crate with Actix server / client, and Axum server / client.