Skip to content

Commit

Permalink
Fix copyright and be explicit about tls options.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Nelson <minelson@vmware.com>
  • Loading branch information
absoludity committed Jun 27, 2022
1 parent a67ea8a commit 359b476
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/pinniped-proxy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ async fn main() -> Result<()> {
let addr = ([0, 0, 0, 0], opt.port).into();

let with_tls = opt.proxy_tls_cert != "" && opt.proxy_tls_cert_key != "";
if !with_tls && (opt.proxy_tls_cert != "" || opt.proxy_tls_cert_key != "") {
panic!("If configuring TLS support, you must set both --proxy-tls-cert and --proxy-tls-cert-key");
}

// Run the server for ever. If it returns with an error, return the
// result, otherwise, if it completes, we return Ok.
if with_tls {
info!("Configuring with TLS cert {} and key {}", opt.proxy_tls_cert, opt.proxy_tls_cert_key);
info!("Configuring with TLS cert filepath {} and key filepath {}", opt.proxy_tls_cert, opt.proxy_tls_cert_key);
// For every incoming connection, we make a new hyper `Service` to handle
// all incoming HTTP requests on that connection. This is done by passing a
// closure to the hyper `make_service_fn` which returns our custom `make_svc`
Expand Down
3 changes: 2 additions & 1 deletion cmd/pinniped-proxy/src/tls_config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2020-2022 the Kubeapps contributors.
// Copyright 2022 the Kubeapps contributors.
// SPDX-License-Identifier: Apache-2.0

use tokio_native_tls::native_tls::{Identity, TlsAcceptor};
use anyhow::Result;
use std::fs;
Expand Down

0 comments on commit 359b476

Please sign in to comment.