summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Birr-Pixton <jpixton@gmail.com>2023-01-12 14:58:52 +0000
committerJoseph Birr-Pixton <jpixton@gmail.com>2023-01-12 16:14:22 +0000
commitd4cf46404f04994a109baed5e3b3e038d2d1b07b (patch)
tree638693a2e32d3bd80eababab15783607559b6ec6
parentcba4d0c0f6f5f2c7406628cda34d884db6d602bb (diff)
Use the enums exposed in 5dab6ed6 in tests
-rw-r--r--rustls/examples/internal/bogo_shim.rs4
-rw-r--r--rustls/tests/api.rs4
-rw-r--r--rustls/tests/client_cert_verifier.rs4
-rw-r--r--rustls/tests/server_cert_verifier.rs2
4 files changed, 7 insertions, 7 deletions
diff --git a/rustls/examples/internal/bogo_shim.rs b/rustls/examples/internal/bogo_shim.rs
index fa03404e..6e4de620 100644
--- a/rustls/examples/internal/bogo_shim.rs
+++ b/rustls/examples/internal/bogo_shim.rs
@@ -252,7 +252,7 @@ impl rustls::sign::SigningKey for FixedSignatureSchemeSigningKey {
self.key.choose_scheme(&[])
}
}
- fn algorithm(&self) -> rustls::internal::msgs::enums::SignatureAlgorithm {
+ fn algorithm(&self) -> rustls::SignatureAlgorithm {
self.key.algorithm()
}
}
@@ -576,8 +576,8 @@ fn quit_err(why: &str) -> ! {
}
fn handle_err(err: rustls::Error) -> ! {
- use rustls::internal::msgs::enums::{AlertDescription, ContentType};
use rustls::Error;
+ use rustls::{AlertDescription, ContentType};
use std::{thread, time};
println!("TLS error: {:?}", err);
diff --git a/rustls/tests/api.rs b/rustls/tests/api.rs
index 1e2d5079..5f47cc90 100644
--- a/rustls/tests/api.rs
+++ b/rustls/tests/api.rs
@@ -3145,7 +3145,7 @@ mod test_quic {
assert!(step(&mut server, &mut client).is_err());
assert_eq!(
client.alert(),
- Some(rustls::internal::msgs::enums::AlertDescription::BadCertificate)
+ Some(rustls::AlertDescription::BadCertificate)
);
// Key updates
@@ -3202,7 +3202,7 @@ mod test_quic {
assert_eq!(
server.alert(),
- Some(rustls::internal::msgs::enums::AlertDescription::NoApplicationProtocol)
+ Some(rustls::AlertDescription::NoApplicationProtocol)
);
}
}
diff --git a/rustls/tests/client_cert_verifier.rs b/rustls/tests/client_cert_verifier.rs
index 93e71fc7..5af9c2ac 100644
--- a/rustls/tests/client_cert_verifier.rs
+++ b/rustls/tests/client_cert_verifier.rs
@@ -11,9 +11,9 @@ use crate::common::{
};
use rustls::client::WebPkiVerifier;
use rustls::internal::msgs::base::PayloadU16;
-use rustls::internal::msgs::enums::AlertDescription;
-use rustls::internal::msgs::enums::ContentType;
use rustls::server::{ClientCertVerified, ClientCertVerifier};
+use rustls::AlertDescription;
+use rustls::ContentType;
use rustls::{
Certificate, ClientConnection, DistinguishedNames, Error, ServerConfig, ServerConnection,
SignatureScheme,
diff --git a/rustls/tests/server_cert_verifier.rs b/rustls/tests/server_cert_verifier.rs
index a9b15e04..65d635cc 100644
--- a/rustls/tests/server_cert_verifier.rs
+++ b/rustls/tests/server_cert_verifier.rs
@@ -10,8 +10,8 @@ use crate::common::{
use rustls::client::{
HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier, WebPkiVerifier,
};
-use rustls::internal::msgs::enums::AlertDescription;
use rustls::internal::msgs::handshake::DigitallySignedStruct;
+use rustls::AlertDescription;
use rustls::{Certificate, Error, SignatureScheme};
use std::sync::Arc;