Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit aa45bbd

Browse files
committed
Reword names of functions related to signature verification of certificates
1 parent 99789fc commit aa45bbd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/playready/src/certificate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'a, 'b> Certificate<'a, 'b> {
7777
.map(|c| c.key.as_slice())
7878
}
7979

80-
fn verify(&self, public_key: &[u8]) -> Result<(), crate::Error> {
80+
fn verify_signature(&self, public_key: &[u8]) -> Result<(), crate::Error> {
8181
let attribute = self
8282
.parsed
8383
.attributes
@@ -326,8 +326,8 @@ impl CertificateChain {
326326
}
327327
}
328328

329-
/// Performs signature verification of certificates.
330-
pub fn verify_certificates(&self) -> Result<(), crate::Error> {
329+
/// Performs signature verification of all certificates.
330+
pub fn verify_signatures(&self) -> Result<(), crate::Error> {
331331
if self.parsed.certificates.is_empty() {
332332
return Err(crate::Error::CertificateMissingError);
333333
}
@@ -338,7 +338,7 @@ impl CertificateChain {
338338
let bcert = &self.parsed.certificates[i];
339339

340340
let cert = Certificate::new(Cow::Borrowed(&bcert.val), Cow::Borrowed(&bcert.raw));
341-
cert.verify(&issuer_key)?;
341+
cert.verify_signature(&issuer_key)?;
342342

343343
match cert.issuer_key() {
344344
Some(key) => issuer_key.copy_from_slice(key),

crates/playready/src/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Device {
127127

128128
/// Performs signature verification of certificates bundled in [`CertificateChain`].
129129
pub fn verify_certificates(&self) -> Result<(), crate::Error> {
130-
self.cert_chain.verify_certificates()
130+
self.cert_chain.verify_signatures()
131131
}
132132

133133
/// Creates and provisions device from certificate chain and group key.
@@ -163,7 +163,7 @@ impl Device {
163163
&group_key,
164164
)?;
165165

166-
cert_chain.verify_certificates()?;
166+
cert_chain.verify_signatures()?;
167167

168168
Ok(Self {
169169
group_key: Some(group_key),

0 commit comments

Comments
 (0)