aboutsummaryrefslogtreecommitdiff
path: root/bpkg/auth.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-09-11 22:53:37 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-09-12 14:08:23 +0300
commitc289f73d6fdc9f86b90e0986ba3b0da0c29e7927 (patch)
tree22ffa690dd1ef9f53cbf12923ec27a5eb2b0f70d /bpkg/auth.cxx
parent4c93cc56234f34947c94710a7d6940ef327089d4 (diff)
Match certificate fingerprints case-insensitively
Diffstat (limited to 'bpkg/auth.cxx')
-rw-r--r--bpkg/auth.cxx13
1 files changed, 7 insertions, 6 deletions
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 () <<