O'Reilly logo

Network Programming with Rust by Abhishek Chanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Letsencrypt using Rust

Currently, there is one crate that allows access to letsencrypt using Rust. The CLI tool called acme-client can interact with the API to obtain or revoke a certificate or run validations of ownership. The binary is backed by a crate called acme-client that enables programmatic interaction with the API. Let's see how this can be used to secure an HTTP server running on Rocket. Remember, for this to work, letsencrypt will need to reach the server. Thus, this needs to be publicly accessible over the internet.

The first step is to install the CLI tool using Cargo:

$ cargo install acme-client

For our example, we will run our rocket blog over TLS. While Rocket does support TLS out of the box, it is not enabled by default. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required