server/bulkcrypto.c, server/tripe.8.in: Handle MAC names containing `/'.
[tripe] / server / bulkcrypto.c
index 0e02f74..365aa17 100644 (file)
@@ -98,7 +98,7 @@ static int gencomp_getalgs(gencomp_algs *a, const algswitch *asw,
   if ((p = key_getattr(kf, k, "mac")) != 0) {
     dstr_reset(&d);
     dstr_puts(&d, p);
-    if ((q = strchr(d.buf, '/')) != 0)
+    if ((q = strrchr(d.buf, '/')) != 0)
       *q++ = 0;
     if ((a->m = gmac_byname(d.buf)) == 0) {
       a_format(e, "unknown-mac", "%s", d.buf, A_END);