Skip to content

Commit

Permalink
remove type CertificateWithNames
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed May 22, 2023
1 parent 4776d5f commit 308f22f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
9 changes: 0 additions & 9 deletions command/src/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,6 @@ message CertificatesByAddress {
repeated CertificateSummary certificate_summaries = 2;
}

// TODO: get rid of this type, use CertificateAndKey instead
// A certificate matching a request by fingerprint,
// and the list of domain names associated
message CertificateWithNames {
required string certificate = 1;
// domain names associated to the fingerprint
repeated string names = 2;
}

// to reply to several certificate queries
message CertificatesWithFingerprints {
// a map of fingerprint -> certificate_and_key
Expand Down
13 changes: 1 addition & 12 deletions command/src/proto/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@ use std::fmt::{Display, Formatter};

use crate::proto::command::TlsVersion;

use super::command::{CertificateAndKey, CertificateWithNames};

impl Display for CertificateWithNames {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
f,
"\thostnames: {}\n\tcertificate: {}",
concatenate_vector(&self.names),
self.certificate
)
}
}
use super::command::CertificateAndKey;

impl Display for CertificateAndKey {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Expand Down
10 changes: 5 additions & 5 deletions lib/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ use sozu_command::{
channel::Channel,
config::Config,
proto::command::{
request::RequestType, response_content::ContentType, ActivateListener, AddBackend, Cluster,
ClusterHashes, ClusterInformations, DeactivateListener, Event, HttpListenerConfig,
HttpsListenerConfig, ListenerType, LoadBalancingAlgorithms, LoadMetric,
MetricsConfiguration, RemoveBackend, ResponseStatus,
TcpListenerConfig as CommandTcpListener, CertificatesWithFingerprints,
request::RequestType, response_content::ContentType, ActivateListener, AddBackend,
CertificatesWithFingerprints, Cluster, ClusterHashes, ClusterInformations,
DeactivateListener, Event, HttpListenerConfig, HttpsListenerConfig, ListenerType,
LoadBalancingAlgorithms, LoadMetric, MetricsConfiguration, RemoveBackend, ResponseStatus,
TcpListenerConfig as CommandTcpListener,
},
ready::Ready,
request::WorkerRequest,
Expand Down

0 comments on commit 308f22f

Please sign in to comment.