[pkg-opensc-commit] [engine-pkcs11] 112/152: Ignore type= and object-type= attributes in PKCS#11 URIs

Eric Dorland eric at moszumanska.debian.org
Mon Oct 19 03:11:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository engine-pkcs11.

commit dc5ffebff8cc5ea677aef98159d2c617f8b46d84
Author: David Woodhouse <David.Woodhouse at intel.com>
Date:   Thu Dec 18 14:56:18 2014 +0000

    Ignore type= and object-type= attributes in PKCS#11 URIs
    
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 src/engine_pkcs11.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/engine_pkcs11.c b/src/engine_pkcs11.c
index 6c68f7f..4bf5ae8 100644
--- a/src/engine_pkcs11.c
+++ b/src/engine_pkcs11.c
@@ -476,6 +476,14 @@ static int parse_pkcs11_uri(const char *uri, PKCS11_TOKEN **p_tok,
 		} else if (!strncmp(p, "id=", 3)) {
 			p += 3;
 			rv = parse_uri_attr(p, end - p, (void *)&id, id_len);
+		} else if (!strncmp(p, "type=", 5) || !strncmp(p, "object-type=", 12)) {
+                        p = strchr(p, '=') + 1;
+
+                        if ((end - p == 4 && !strncmp(p, "cert", 4)) ||
+                            (end - p == 7 && !strncmp(p, "private", 7))) {
+                                /* Actually, just ignore it */
+                        } else
+                                rv = 0;
 		} else {
 			rv = 0;
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/engine-pkcs11.git



More information about the pkg-opensc-commit mailing list