aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-08 20:17:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-08 20:17:57 +0300
commit9bbbeaab56d8c3820bc5a48547562d168ab9b9a3 (patch)
tree8cd1effee9827f303ccb524915662dde59b3f55a
parent0bda1e43269af186e0b61280410e4630d67c5fcb (diff)
Fix repository certificate path matching
-rw-r--r--bpkg/auth.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx
index ddbb284..2a4b056 100644
--- a/bpkg/auth.cxx
+++ b/bpkg/auth.cxx
@@ -655,7 +655,7 @@ namespace bpkg
// Make sure that the repository canonical name hostname matches the
// certificate hostname (that can contain a subdomain wildcard), and its
- // optional /prefix/path (will call it just path down the road) part is a
+ // optional prefix/path (will call it just path down the road) part is a
// subpath of the certificate name path.
//
// Split a name into the host and path parts.
@@ -664,7 +664,9 @@ namespace bpkg
{
size_t p (name.find ('/'));
return make_pair (name.substr (0, p),
- p != string::npos ? path (name.substr (p)) : path ());
+ p != string::npos
+ ? path (name.substr (p + 1))
+ : path ());
};
pair<string, path> c (split (cert.name));