Skip to content

How to disable SSL certificate verification in sdk_s3? #650

Answered by azzamsa
azzamsa asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to solve this with the following approach:

// [dependencies]
// tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
// aws-sdk-s3 = "0.21.0"
//  aws-types = "0.51.0"
// http = "0.2.8"
// aws-smithy-client = "0.51.0"
// hyper-rustls = "0.23.0"
// rustls = { version = "0.20.6", features = ["dangerous_configuration"] }
// webpki-roots = "0.22.5"

use aws_sdk_s3::Client;
use aws_smithy_client::hyper_ext;
use aws_types::region::Region;
use http::Uri;
use std::sync::Arc;

pub struct NoCertificateVerification {}

impl rustls::client::ServerCertVerifier for NoCertificateVerification {
    fn verify_server_cert(
        &self,
        _end_entity: &rustls::Certificate,

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nyurik
Comment options

Answer selected by jmklix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants