github-copilot-sdk 1.0.32-preview.0

Rust SDK for programmatic control of the GitHub Copilot CLI via JSON-RPC.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) Microsoft Corporation. All rights reserved.

//! Client-local TLS 1.3 with macOS certificate policy.

use rustls_platform_verifier::BuilderVerifierExt;
use tokio_rustls::rustls;

pub(crate) fn client_config() -> Result<rustls::ClientConfig, rustls::Error> {
    rustls::ClientConfig::builder_with_provider(std::sync::Arc::new(
        rustls::crypto::aws_lc_rs::default_provider(),
    ))
    .with_safe_default_protocol_versions()?
    .with_platform_verifier()
    .map(|builder| builder.with_no_client_auth())
}