Skip to content

TLSv1_2 issue #682

Closed
Closed

Description

@bsdunx

I've noticed support for TLSv1_2 has been added but I'm having issues getting it to work, I've played around with the http::client::options to no avail.

terminate called after throwing an instance of 'std::system_error'
what(): tlsv1 alert internal error

Anyone able to offer some guidance on this?

Activity

  1. bsdunx commented on Aug 26, 2016

    @bsdunx
    Author

    I've determined SNI support was required to resolve this issue and that it was recently added to 0.12.0. I am now wondering if there is a more natural way to perform requests.

  2. deanberris commented on Aug 26, 2016

    @deanberris
    Member

    Is there anything that needs to be done aside from what's already there in the library @bsdunx?

  3. bsdunx commented on Aug 26, 2016

    @bsdunx
    Author

    @deanberris It seems to be a bit awkward to use having to specify it on a per-request basis, but I do have it working. It would be great to infer the SNI hostname option from the uri and automatically set the TLS extension on servers that require it. I'm not sure how to cleanly handle this, how do you know it's even required before setting up a client and creating a request?

  4. bsdunx commented on Aug 26, 2016

    @bsdunx
    Author

    The following seems to be working for me on non-SNI hosts and IP addresses
    ``http::client::response get(std::string uri) {
    http::client::request request(uri);

    http::client::options options;
    options.follow_redirects(true).cache_resolved(true)
        .openssl_sni_hostname(request.host());
    
    http::client client = http::client(options);
    return client.get(request);
    

    }

  5. deanberris commented on Aug 26, 2016

    @deanberris
    Member

    I agree, this seems to be making for a good case to have per-request options (cc'ing @glynos who's working on redesigning the API for the client).

    OK to close this now?

  6. bsdunx commented on Aug 26, 2016

    @bsdunx
    Author

    closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions