From d4cf46404f04994a109baed5e3b3e038d2d1b07b Mon Sep 17 00:00:00 2001 From: Joseph Birr-Pixton Date: Thu, 12 Jan 2023 14:58:52 +0000 Subject: Use the enums exposed in 5dab6ed6 in tests --- rustls/examples/internal/bogo_shim.rs | 4 ++-- rustls/tests/api.rs | 4 ++-- rustls/tests/client_cert_verifier.rs | 4 ++-- rustls/tests/server_cert_verifier.rs | 2 +- 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; -- cgit v1.2.3-70-g09d2