pingora_core/protocols/tls/
digest.rs

1// Copyright 2024 Cloudflare, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! TLS information from the TLS connection
16
17/// The TLS connection information
18#[derive(Clone, Debug)]
19pub struct SslDigest {
20    /// The cipher used
21    pub cipher: &'static str,
22    /// The TLS version of this connection
23    pub version: &'static str,
24    /// The organization of the peer's certificate
25    pub organization: Option<String>,
26    /// The serial number of the peer's certificate
27    pub serial_number: Option<String>,
28    /// The digest of the peer's certificate
29    pub cert_digest: Vec<u8>,
30}