clique-sibyl-commonlib
Usage
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.3.3" }
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.
# use rustls-0_23
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.3.3", = "rustls-0_23" }
# use rustls-0_20
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.3.3", = "rustls-0_20" }
# use rustls-0_21
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.3.3", = "rustls-0_21" }
# use rustls-0_22
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.3.3", = "rustls-0_22" }
TLS Config
You can create a rustls tls server config like this:
use create_tls_server_config;
let tls_config = create_tls_server_config?;
With this tls server config, you can start a TLS server using server framework like actix-web:
[]
= { = "https://github.com/CliqueOfficial/clique-sibyl-commonlib.git", = "v2.3.2", = "rustls-0_23" }
= { = "4.6.0", = ["rustls-0_23"] }
= "2.9.0"
use create_tls_server_config;
use ;
use env;
async
async
And you can create a rustls tls client config like this:
use create_tls_client_config;
let tls_config = create_tls_client_config;
This tls client config can help you to verify the attestation in the certificate during TLS handshake.
Attestation Verifier
You can use clique_sibyl_commonlib::attestation::verify_attestation to verify the attestation.
WASM
Install WASM toolchains:
Build WASM:
# For node.js
# For ReactJS
Install node.js:
Test WASM for node.js:
Tests
Examples
You can explore examples located in ./tests/actix and ./gramine-examples/actix-example to see how to integrate this crate with both Actix server and client.