Compare commits
3 commits
ef307f4983
...
c3b50e4ecc
Author | SHA1 | Date | |
---|---|---|---|
c3b50e4ecc | |||
67864e4842 | |||
686c894296 |
3 changed files with 12 additions and 4 deletions
|
@ -5,9 +5,9 @@ Gemini protocol client and server implementation written in Rust with Tokio.
|
|||
|
||||
## TODO
|
||||
- [ ] Write tests for Client
|
||||
- [ ] Check self-signed cert with DANE before trusting it
|
||||
- [ ] Clean up `FileBasedCertVerifier` code
|
||||
- [x] Check self-signed cert with DANE before trusting it
|
||||
- [x] Clean up `FileBasedCertVerifier` code
|
||||
- [ ] Add `SqliteBasedCertVerifier` (?)
|
||||
- [ ] Implement automatic redirection following
|
||||
- [ ] Implement client authorization
|
||||
- [ ] Separate general I/O error into different error types
|
||||
- [ ] Implement server
|
||||
|
|
|
@ -13,8 +13,15 @@ use tokio_rustls::rustls::{
|
|||
#[derive(Debug)]
|
||||
pub struct AllowAllCertVerifier(Arc<CryptoProvider>);
|
||||
|
||||
impl Default for AllowAllCertVerifier {
|
||||
/// Same as [`AllowAllCertVerifier::new()`].
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl AllowAllCertVerifier {
|
||||
/// Constructor for this verifier
|
||||
/// Constructor for this verifier.
|
||||
pub fn new() -> Self {
|
||||
AllowAllCertVerifier(
|
||||
CryptoProvider::get_default()
|
||||
|
|
|
@ -125,6 +125,7 @@ impl KnownHostsFile {
|
|||
/// Write a new trusted cert's fingerprint to the known_hosts file.
|
||||
/// - `fp` is a TLS cert hash in base64 (see [`CertFingerprint::base64`]),
|
||||
/// - `fptype` is a name of hashing algorithm (see [`CertFingerprint::fingerprint_type_str`]).
|
||||
///
|
||||
/// The certificate will not be trusted in the current session unless you call `add_cert_to_hashmap`,
|
||||
/// so use this function only if you need modularity, otherwise just use `add_trusted_cert`.
|
||||
pub async fn add_cert_to_file(
|
||||
|
|
Loading…
Add table
Reference in a new issue