mirror of https://github.com/ctz/rustls
RootCertStore: remove deprecated subjects()
This commit is contained in:
parent
646788e396
commit
a8d763efd5
|
@ -1,8 +1,6 @@
|
|||
use crate::key;
|
||||
#[cfg(feature = "logging")]
|
||||
use crate::log::{debug, trace};
|
||||
use crate::msgs::handshake::DistinguishedName;
|
||||
use crate::x509;
|
||||
use crate::{CertificateError, Error};
|
||||
|
||||
/// A trust anchor, commonly known as a "Root Certificate."
|
||||
|
@ -86,21 +84,6 @@ impl RootCertStore {
|
|||
self.roots.len()
|
||||
}
|
||||
|
||||
/// Return the Subject Names for certificates in the container.
|
||||
#[deprecated(since = "0.20.7", note = "Use OwnedTrustAnchor::subject() instead")]
|
||||
pub fn subjects(&self) -> Vec<DistinguishedName> {
|
||||
let mut r = Vec::new();
|
||||
|
||||
for ota in &self.roots {
|
||||
let mut name = Vec::new();
|
||||
name.extend_from_slice(&ota.subject);
|
||||
x509::wrap_in_sequence(&mut name);
|
||||
r.push(DistinguishedName::from(name));
|
||||
}
|
||||
|
||||
r
|
||||
}
|
||||
|
||||
/// Add a single DER-encoded certificate to the store.
|
||||
///
|
||||
/// This is suitable for a small set of root certificates that are expected to parse
|
||||
|
|
Loading…
Reference in New Issue