]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Extend characters set for PKCS11 URI
authorOleg Popov <admin@livelace.ru>
Sat, 10 Apr 2021 14:21:25 +0000 (17:21 +0300)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 10 Apr 2021 19:24:18 +0000 (20:24 +0100)
There are tokens with dots (and other symbols) in PKCS11 URI:

pkcs11:model=Rutoken%20ECP;manufacturer=Aktiv%20Co.;serial=3xxxxxxb;token=livelace
pkcs11:model=PRO;manufacturer=Aladdin%20R.D.;serial=CC62FB25;token=val%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00;id=%33%32%31%30%33%61%36%37%36%65%32%34%35%62%32%31;type=private

src/shared/pkcs11-util.c

index 4fa1effb2d3be3878ce56f9fde225757596b1a75..aff45ed868c426d1c7f071ea9f22cabba7f5647c 100644 (file)
@@ -31,7 +31,7 @@ bool pkcs11_uri_valid(const char *uri) {
         if (isempty(p))
                 return false;
 
-        if (!in_charset(p, ALPHANUMERICAL "-_?;&%="))
+        if (!in_charset(p, ALPHANUMERICAL ".~/-_?;&%="))
                 return false;
 
         return true;