From c289f73d6fdc9f86b90e0986ba3b0da0c29e7927 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 11 Sep 2020 22:53:37 +0300 Subject: Match certificate fingerprints case-insensitively --- bpkg/auth.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bpkg/auth.cxx') diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx index e661ad0..0693abc 100644 --- a/bpkg/auth.cxx +++ b/bpkg/auth.cxx @@ -61,14 +61,14 @@ namespace bpkg p /= "."; - // If this is a remote location then use the canonical name prefix. For - // a local location this doesn't always work. Consider: + // If this is a remote location then use the canonical name prefix. For a + // local location this doesn't always work. Consider: // // .../pkg/1/build2.org/common/hello // - // In this case we will end with an empty canonical name (because of - // the special pkg/1 treatment). So in case of local locations we will - // use the location rather than the name prefix. + // In this case we will end with an empty canonical name (because of the + // special pkg/1 treatment). So in case of local locations we will use the + // location rather than the name prefix. // if (rl.remote ()) return repository_location ( @@ -527,7 +527,8 @@ namespace bpkg return cert_auth {move (cert), true}; } - if (dependent_trust && *dependent_trust == cert->fingerprint) + if (dependent_trust && + icasecmp (*dependent_trust, cert->fingerprint) == 0) { if (verb >= 2) info << "certificate for repository " << rl.canonical_name () << -- cgit v1.1