Skip to content

Commit

Permalink
transports/tls-quic: Fix review notes
Browse files Browse the repository at this point in the history
  • Loading branch information
kpp committed Jul 20, 2021
1 parent 56c1cf0 commit cea7fcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions transports/tls-quic/src/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ impl P2pCertificate<'_> {
// self-signature is not valid.
let raw_certificate = self.certificate.tbs_certificate.as_ref();
let signature = self.certificate.signature_value.data;
let self_signed = self.check_signature(signature_scheme, raw_certificate, signature);
if !self_signed {
// check if self signed
if !self.verify_signature(signature_scheme, raw_certificate, signature) {
return false
}
} else {
Expand Down Expand Up @@ -411,7 +411,7 @@ impl P2pCertificate<'_> {
}
/// Verify the `signature` of the `message` signed by the private key corresponding to the public key stored
/// in the certificate.
pub fn check_signature(
pub fn verify_signature(
&self, signature_scheme: rustls::SignatureScheme, message: &[u8], signature: &[u8],
) -> bool {
if let Some(pk) = self.public_key(signature_scheme) {
Expand Down

0 comments on commit cea7fcc

Please sign in to comment.