-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tls: Avoid circular dependencies (#1334)
The `linkerd-tls` crate has a test dependency on `linkerd-tls-rustls`, which itself depends on `linkerd-tls`. This is an avoidable circular dependency. This change moves all of the TLS testdata from the `linkerd-tls-rustls` crate to the new `linkerd-tls-test-util` crate. The `tls_accept` test is moved from `linkerd-tls` to `linkerd-tls-rustls` so that `linkerd-tls` no longer depends on `linkerd-tls-rustls`.
- Loading branch information
Showing
33 changed files
with
115 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "linkerd-tls-test-util" | ||
version = "0.1.0" | ||
license = "Apache-2.0" | ||
edition = "2018" | ||
publish = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
pub struct Entity { | ||
pub name: &'static str, | ||
pub trust_anchors: &'static [u8], | ||
pub crt: &'static [u8], | ||
pub key: &'static [u8], | ||
} | ||
|
||
pub static DEFAULT_DEFAULT: Entity = Entity { | ||
name: "default.default.serviceaccount.identity.linkerd.cluster.local", | ||
trust_anchors: include_bytes!("testdata/ca1.pem"), | ||
crt: include_bytes!("testdata/default-default-ca1/crt.der"), | ||
key: include_bytes!("testdata/default-default-ca1/key.p8"), | ||
}; | ||
|
||
pub static FOO_NS1: Entity = Entity { | ||
name: "foo.ns1.serviceaccount.identity.linkerd.cluster.local", | ||
trust_anchors: include_bytes!("testdata/ca1.pem"), | ||
crt: include_bytes!("testdata/foo-ns1-ca1/crt.der"), | ||
key: include_bytes!("testdata/foo-ns1-ca1/key.p8"), | ||
}; | ||
|
||
pub static BAR_NS1: Entity = Entity { | ||
name: "bar.ns1.serviceaccount.identity.linkerd.cluster.local", | ||
trust_anchors: include_bytes!("testdata/ca1.pem"), | ||
crt: include_bytes!("testdata/bar-ns1-ca1/crt.der"), | ||
key: include_bytes!("testdata/bar-ns1-ca1/key.p8"), | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.